How WhatsApp bot works - part 5

In some use case, you want to stop a bot’s flow from executing.

For example in a case where you ask something and wait for the user’s response.

In Twilio Studio, After a waiting timeout without a response from the user, the flow will show the same message as before, and it never ends i.e. the message will show then wait for the specified timeout and then show again if you connect the transition back to the same block (sometimes there is a need to do it especially when you MUST collect certain information from the user).
The flow will end only after 30 days, which is too much time.

Now there is a solution for that, the Twilio Studio API enables the option to stop the flow’s execution. So in the scenario as describes above, an API call will be initiated to end the bot’s flow.

Now, more about variables and ending the bot’s flow…

Whenever you need to use conditional logic in your bot’s flow, you’ll need to use variables.

A variable is a place holder, and you’ll need it to store information and use it later in your bot’s flow.

At the end of the bot’s flow, you’ll need to have all of the information you collected during the conversation with the user like, for example: email, phone number, name, interest, etc…

When the bot’s flow ends, you’ll want to send all of the information that you stored inside variables, to Integromat or Zapier, where you’ll use it to do what ever you need, like, for  example, store the person’s details in a CRM, register the user to a mailing list, tag the user according to his\her interests, etc…

Scroll to Top