2
votes

How can Twilio Autopilot chatbot initiate a session with a user without the user greeting the bot?

I've tried exploring using Twilio Studio to kick off the conversation, but our application requires that the first interaction in the sequence must be a Collection Action. I can't seem to kick off that Collection Action without the user having greeted the bot.

An example would be that every day we would message the user with a question: "How many bananas did you eat today?". The user would then respond and Autopilot would parse the data and send to our system. The question can't be hardcoded in Studio because it will be dynamically generated on a daily basis. The question must be a Collection Action.

1
You can no longer use the latest version of Twilio Studio. Please see this answer on how to initiate a conversation with a cURL request and the Twilio REST API. You can of course edit the task to be the Collect Flow as the initial task. stackoverflow.com/questions/60728177/… - lizziepika

1 Answers

3
votes

Twilio developer evangelist here.

Welcome to StackOverflow!

You can initiate a session with the user without the user greeting the bot by connecting the trigger widget's Rest API trigger event to either a make outgoing call or send message widget, as shown below. enter image description here

Then, if the call is answered or the message is sent, you can connect those actions to the Send to Autopilot widget.

enter image description here

Lastly, under the config section of your Send to Autopilot widget, put in the Collection task you want to run when the outbound call or message is initiated by your Twilio client and not the user.

enter image description here

Let me know if this helps :D