
Next, we’re going to want to handle the appointment confirmation by making a request back to our servers. Our widget should look like this, with No Matches, 1, and 2 dangling from the bottom: Just as with the first Transition, we’re going to tap New, then select Condition Matches., then set the value equal to 2 in the sidebar and save. Next, we’ll need a condition for if the user has pressed 2 to cancel the appointment. Save the new transition and it will appear on the widget. We’re going to set this value to 1, to confirm the appointment. In the right sidebar, find the new Transition that you just created, and select Equal To from the dropdown. Select Condition Matches to create a new Transition. Tap the red New at the bottom of the Split widget to reveal the Transition On. Next, we’ll need to declare the choices we’re looking for in those text replies - the digits 1 and 2. In this case, we’re concerned with the user’s reply, so we’ll select confirm_appt and then inbound.Body from the dropdown on the right-side panel (yours may have a different name if your Send & Wait For Reply widget is not called confirm_appt).

Drag it onto the canvas and connect it to the dangling Reply dot from our Send & Wait For Reply widget.įirst, we’ll need to configure the variable we’re testing. We’ll need some logic that will help us know which choice the user would like to make. We’re expecting the user to reply to this text message to confirm or cancel their appointment. Please reply 1 to confirm and 2 to cancel.” Studio supports the Liquid template language, which is a fancy way of saying “a way to help you load dynamic content throughout your flow.” We’re telling Studio that we’d like it to dynamically interpret the text between the two curly braces based on something - in this case, the appointment_time value from our request. In this case, we’re going to use a value (time) from our API call, so the message body is going to be “Your appointment is coming up on. We can use this widget to send an SMS to the user with a prompt to reply to. We’ll start by dragging a Send & Wait For Reply widget onto the canvas, and connecting it to the REST API trigger by dragging the red dot to the grey dot in the corner of the new widget.
HOW TO TURN OFF IMESSAGE REMINDERS HOW TO
See the REST API section of the Studio User Guide to learn how to make these calls. In this case, our trigger is going to be a REST API call. You’ll notice that the canvas comes with a widget already in place - that’s the Trigger widget, which kicks off our flow when the trigger we specify is fired. You can name your flow anything you like we’re calling ours Appointment Reminder.
/iPhone_Notifications-ca6fdb75eb274a1191c69c7e53f357aa.jpg)
We’ll start with a fresh Twilio Studio flow log into your Twilio account and navigate to the Studio Dashboard, then tap the + icon to create a new flow.
