0

I'm sending text suggestions for my users using Twilio. A user can respond with a "Confirm", "Decline" or send a freetext response, which I then parse and make changes accordingly (using a Make HTTP request widget), and send the new suggestion back to the user.

Is there a way to create a "while" loop for this process? every time the user doesn't respond with a "Confirm"/"Decline" - send its input to the make request widget.

Thanks in advance!

Yehuda
  • 73
  • 7

1 Answers1

1

You could do a while look by combining a Set Variables Widget with a Split Based On... Widget. Similarly to what is shown in this diagram: enter image description here

However, I think in your case the no reply outlet of the Send & Wait For Reply Widget should do the job as well.

You can configure a timeout to wait for the response, after which we will assume "No Reply" and transition accordingly. You can use this to send a followup reminder message, trigger an outgoing voice call, or update your database with no response.

IObert
  • 2,118
  • 1
  • 10
  • 17
  • Thanks, but it's not exactly my use case.. I'm trying to get the user's feedback until they'll either "approve" or "decline". i started testing out with 2 "Set variables" widgets (one for the initial user SMS reply, and one for the user's reply after I make changes). doing this is allowing me to have some sort of a loop. i do wish there was a simpler solution though – Yehuda Jul 24 '23 at 14:22
  • I'm afraid this is the tradeoff you have to do with No Code Tools like Studio. You can do it without writing and hosting a single line of code but it might take a few widgets. – IObert Jul 24 '23 at 14:44