Question

Need help with handling user responses in WhatsApp bot

  • 9 May 2024
  • 1 reply
  • 9 views

Hello everyone,

I'm currently working on a WhatsApp bot where users can select options from buttons or a list. However, I'm encountering an issue when users respond with something other than the provided options. Specifically, I'm struggling with how to handle the situation when a user inputs an unexpected response, without causing an infinite loop.

Here's the scenario: I've implemented buttons or a list of options for users to choose from. But if a user responds with something different, how can I prompt them to choose one of the available options without getting stuck in a loop? When i use “next step”, it creates an infinite loop.

I've considered adding a response to handle unexpected inputs, but I'm concerned that this might create an infinite loop if the user continues to input unexpected responses.

Has anyone encountered a similar issue or have any suggestions on how to effectively handle this situation?


1 reply

Userlevel 6
Badge +4

You need to add a bunch of logic…

When they enter some other text, the Default reply will trigger. There you’ll need to know where they’re at in your flow, and build it so that they are returned to the stage they were at.

It’s a complex build, but it’s doable. If you want assistance building this feel free to book a call here: https://gusboregio.com/es

Reply