There are a few steps that you need to complete to achieve this.
- Create a Data Extension to store the text reponses. Include two fields; 'MobileNumber' and
'Response'. MobileNumber should be the Primary Key.
- Add an SMS Activity to your Journey, create an outbound message and assign a Next Keyword (you will need to create one in MobileConnect that is not used by any other message).
- In MobileConnect, create a text response message that uses the Next Keyword that you defined in the previous step. Include a response message and AMPscript UpsertData function to insert the reply into the Data Extension you created in step 1. Refer to example code below.
- Add the DE from step 1 to your Contact Model (in Contact Builder). You will need to create a one-to-one relationship to an existing Attribute Set which has the Mobile Number for the Contact. Join the Mobile Number to the MobileNumber field in your DE.
- In your Journey, create a Decision Split Activity using Contact Data and choose the DE you created in Step 1 to route the Contact down a path based on if the field contains 'yes' or 'no'.
I've created a video of a similar scenario which you can watch here.
Sample Text Response Message
%%[
var @response, @validResponse
set @response = [MSG(0).NOUNS]
if IndexOf(@response,'yes')>0 or IndexOf(@response,'no')>0 then
set @validResponse = true
endif
if @validResponse == true then
UpsertData('SMS Responses', 1, 'MobileNumber', MOBILE_NUMBER, 'Response', @response)
]%%
Thank you for responding!
%%[ else ]%%
Your response is invalid. Please reply 'yes' or 'no'.
%%[ endif ]%%