Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onboarding new incoming messages #27

Open
wants to merge 1 commit into
base: DEV_cv-1.1
Choose a base branch
from

Conversation

mcverter
Copy link

@mcverter mcverter commented May 1, 2020

No description provided.

Copy link

@TheRealAlexV TheRealAlexV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be good to have here as well is a non-technical explanation of how this system works. From looking at the code I see that it works in the following way:

  1. User sends a text to spoke.
  2. spoke replies back with onboarding_text.
  3. User is added to onboarding_campaign_id.

A few things that are unclear on how they are handled:

  1. For a contact to be valid in spoke, it needs the following fields:
    Firstname, Lastname, Cell, and Zipcode at a minimum.
    I don't see in the code where the onboarding process asks for these fields or gets this data somehow.

  2. To comply with privacy laws, a user needs to explicitly tell us that we are allowed to text them. To do this when a user messages us, spoke should reply back with a text message like:
    "Thanks for contacting us! Is it okay for a volunteer to text you? They won't see your phone number or personal information.

Respond with YES to keep receiving texts, or NO to Opt-Out."

The user than needs to respond with YES to be added to the campaign or NO to be added to the Opt-Out.

I don't see anywhere that this is happening. See the original issue for details:
#6

Comment on lines +486 to +490
ONBOARDING_ASSIGNMENT_ID: num({
desc:
"Assignment ID used by api/lib/twilio-incoming to onboard new contacts",
default: undefined
}),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a suggestion, rather a question: Do you know what twilio/api/lib uses this for?

ie. I'm not sure what ID I would put here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the requirement of an assignment ID because of the following code:

When a message is received, an email is sent to the campaign user and this requires an assignment_id

This is a touches on a more general question about what are all the side effects for incoming/outgoing messages. If particular behaviors are expected, you should test that those also happen.

default: undefined
}),
ONBOARDING_TEXT: str({
desc: "User ID used by api/lib/twilio-incoming to onboard new contacts",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description for this is wrong.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

desc: "User ID used by api/lib/twilio-incoming to onboard new contacts",
default: undefined
}),
ONBOARDING_USER_ID: num({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be the userid of a blank dummy user created within spoke?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I am not totally clear on this. The messages table has a user_id on it, as does the assignments table. I assumed that this was the organization-level user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants