-
Notifications
You must be signed in to change notification settings - Fork 17
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
Automatic Reply Handling #1526
Comments
@hiemanshu This is a lot smaller in scope than #1516 but what it looks like to the user could depend on the changes described there, so I'm curious whether you think this should wait for #1516 to be completed in terms of working on front end changes. Edit: I realize you explicitly said you're not touching the interactions section so I actually now think working on these issues shouldn't bump into each other. Let me know if you think otherwise! |
@ajohn25 a few questions to confirm understanding and a few suggestions: Question: the overall approach being proposed is that response keywords would be associated with a child interaction step such that inbound messages in response to the parent interaction step's question would a) automatically mark that question response and b) send the next script automatically (if a script exists for the child step), is that right?
Question: the goal here is to support automated sending of non-root interaction steps, is that right?
Suggestion: I think its own table is better than an array column. We've been bitten a few times by Question: can you say more about the problem that |
@bchrobot 👍🏾 on all questions and suggestions above - will update the design doc description to clarify
Convo for example below:
At step 4, if we were only looking at the inbound text and current level in the script tree, Spoke would try to handle it as a response to the volunteer ask which was never sent to the contact. If we reference The alternative without adding an extra column to |
Where is the volunteer ask in the example? |
Mixing up examples in my head 🤦🏾♂️ Edited above to add the volunteer ask in the strikethrough instead, but the idea is that once a texter starts making edits we can't rely on following the script anymore |
@ajohn25 Let's do a 2.5 minute delay. |
Got it, so this is tracking going off script. Sounds like two things then:
Can a conversation "recover" from either case? E.g. the texter later selects a question response and sends the populated script without any edits |
I think no to recovering, it feels safe to say once we exit the script we can't safely loop back into it. I would reverse 1 + 2 in the sense that 99% of the time a user would only be able to send non-initials if the contact did 2. The 1% being if an admin goes into message review and sends something, since texters shouldn't be seeing the convo once the initial is sent while
|
That sounds good to me! |
Overview
Allow users to set up campaigns so that common inbound messages that occur as a response to any step in the interaction step tree can be automatically handled.
Response keywords are associated with a child interaction step such that inbound messages in response to the parent interaction step's question:
a) automatically mark that question response
b) send the next script automatically (if a script exists for the child step)
Context
For some organizations, many inbound messages that are handled by texters currently do not actually require much thought to respond to, and can be automatically parsed and handled by Spoke automatically.
Goals and Non-Goals
Goals:
retry-interaction-step
andmessage-sending.js
to allow for sendingscript_options
that are not the root step.Non-Goals:
auto_reply_trigger
at the current level in the script treeMilestones
Separate PRs for each of the following:
Existing Solution
Users handle all replies manually.
Proposed Solution
Schema Changes:
Add a
auto_reply_trigger
table to store the words to respond to for each interaction step.Add a
is_auto_reply_eligible boolean DEFAULT true
column tocampaign_contact
to keep track of which conversations can be auto replied to. Once an inbound message that is not contained inauto_reply_trigger
for the current level in the script tree comes in for a campaign contact, we set this column to false.Back End Changes:
Add
interactionStepId
toRetryInteractionStepPayload
When this value is passed in, we select a message from thescript_options
for the interaction step.For any contacts that
is_auto_reply_eligible
check inmessage-sending.js
for any response words for any interaction step for the campaign.2-3 min delay when scheduling the time to send the response.
Front End Changes:
Add "response words" (or better phrase for this) as another field in the Interactions Section
Access to this feature is controlled by a new envvar
ENABLE_AUTO_REPLIES
Alternative Solutions
Predetermine a common list of response words as we've done in #1110 Since we will have to store the pairs of keywords and interaction steps to send in response in the database anyway, predetermining a common list does not save much work overall, and limits more flexible use of this feature.
Testability, Monitoring and Alerting
Write test cases as part of this PR.
Cross-Team Impact
Will require documentation updates.
Open Questions
Detailed Scoping and Timeline
The text was updated successfully, but these errors were encountered: