DoSomethingArchive / gambit-content

:black_joker: Content API for Gambit
MIT License
2 stars 5 forks source link

Support Yes/No reply to Campaign Signup Broadcasts #651

Closed aaronschachter closed 8 years ago

aaronschachter commented 8 years ago

Update 11/4/2016 Implement by creating a new mData, which posts to /v1/chatbot?broadcast=true. When the chatbot route receives a req.query.broadcast, inspect the incoming message as Yes or No. If yes, post a Signup for whatever Campaign the CAMPAIGNBOT_BROADCAST_CAMPAIGN config var is set to. We only send Signup Broadcasts twice a month, so we can get away with simply changing out the config var value when we need to send a new one.

Original issue Signups for Campaign 123 are currently triggered by a member texting in Campaign 123's Keyword, which posts to chatbot?campaign=123. Our broadcast messages asking members to Signup for a campaign will prompt them to text back the Campaign's keyword to begin.

Posting to our chatbot endpoint with a campaign defined posts the User's Signup to Phoenix (if it didn't exist already) for the Campaign and the member receives the corresponding confirmation message: (either menu_signedup or menu_completed if they've already completed on web). Gambit also sets the user's current_campaign to the Campaign ID so it knows which Campaign they're responding for upon subsequent posts without a campaign query parameter (when our CAMPAIGNBOT_MOBILECOMMONS_OIP posts back to /chatbot without ?campaign=123.

This issue is for adding support to asking the member to confirm with Yes/No before creating the Signup for the Campaign. This would allow us to send Mobile Commons broadcasts that ask "Do you want to signup for Campaign 123"?

Could be handled by adding an action parameter, something like:

We'd need to spec how to handle No responses.

I also wonder if we'd want to add YES/NO confirmation to Keyword usage in general. It could be seen as an extra step ("Yes, I want to do campaign 123, its why I texted in DOGS") but could potentially prevent a lot of confusion -- ("no, I don't want to signup campaign 123, i was just mentioning my dogs in my caption while reporting back to campaign 567")

cc @jamjensen @classicfreddie

mshmsh5000 commented 8 years ago

So this is a UX & policy question for now? I'd love to understand how much of the YES/NO flow, as we've historically used it, is compliance, how much is idiomatic MoCo flow, and how much is our own UX decision.

aaronschachter commented 8 years ago

Sounds right to me @mshmsh5000! It's come up a few times in O'Doyle jams, I wanted to create an issue to track next steps and/or ideas for implementing.

aaronschachter commented 8 years ago

From @classicfreddie in Slack -- we currently support this with our legacy-MobileCommonCampaign-as-a-DSCampaign-Run implementation:

-We send a broadcast with the first message asking “Do you want to do this? Yes or No” -We save their response to their profile using a customfield (so ex. books2016) -Members who text the keyword are automatically subscribed to the campaign that the keyword lives in -The day after broadcast we create a filtered group: include: book2016 has ‘yes’, exclude people who texted the keyword -This allows us to see the total # of people who said yes, the total # of people who texted the keyword -From the group we can manually subscribe those users into the campaign, and we can even subscribe to a specific opt in path which will auto send them the contents of that OIP

One way Gambot could potentially handle this (that I'm not fond of) is creating a mData for each DS Campaign that requires a YES/No Signup broadcast. This mData would post to the URL's outlined above. The reason I'm not found of it is because we're creating copies and copies of mData's, opening the opportunities for errors and making it difficult to bulk change (see https://github.com/DoSomething/gambit/wiki/Chatbot#mdata)

aaronschachter commented 8 years ago

What is the desired behavior if member responds to the broadcast with a no? @classicfreddie @justkika @jamjensen @mikefantini

Are there any compliance issues we need to consider, per @mshmsh5000's comment?

aaronschachter commented 8 years ago

(13) CHATBOT: As a member, I want to reply Y or NO to a broadcast

aaronschachter commented 8 years ago

Adding this spec for implementation ideas.

aaronschachter commented 8 years ago

@jamjensen did a test run on with the staging Campaign Signup Broadcast mData, and confirmed it signed us up with current Yes/No logic.

Changes to the current Yes/No logic will be handled in #717 -- closing this as resolved. @jamjensen to test on production with staff first, then DS ambassadors.