Hooking up Inbound SMS Conversation
  • Updated on 05 Mar 2019
  • 2 minutes to read
  • Print
  • Dark
    Light

Hooking up Inbound SMS Conversation

  • Print
  • Dark
    Light

Using a Telephony service like Twilio or Plivo, Decision can respond to inbound SMS messages. This document explains how to configure Decisions to respond to a received message.

Example
If you haven't already done so, Register the Telephony Service in Portal and create a Telephony Handler .

In your Telephony Handler folder, edit the [Name of Telephony Handler] SMS Flow . This flow has an SMSRequest input data. This variable will contain all the data received from an inbound SMS request. Here is what that data looks like.
2018-01-29_153233.png

To create a simple response to an inbound SMS, in the Flow Designer's startup window expand   All Steps [Catalog] > Communication > Telephony > SMS, select the SMS Response step, and click Add to place it onto your model.
Hooking-Up-Inbound-SMS-Conversation.png

Click on the SMS Response step to view its properties. This step automatically reads the data from the SMSRequest input data, so no mapping is necessary to configure which number it should reply to and from.

Below is a description of these properties:

SMS Response Text : Text in this field will be sent in the reply message.

Wait for reply : If you would like this step to wait for a follow up reply, you can check the Wait for reply check box and enter a time span for which to wait. Any SMS message received from the original sender's number within the configured time span will be treated as a reply to your message. If the time span expires, the step will take the Timeout path and any message received from the sender's number will be treated as a new message.

Process only valid replies : Checking this option gives you a text box where you can configure valid replies. Any replies received that don't match the valid replies will cause the step to exit via the Unexpected Response path. Any replies received that do match an expected reply will cause the step to exit via the SMS Received path. You can also check the Process valid replies as paths check box which will create a path for every valid reply and cause the step to exit via that specific reply path when a valid reply is received.
2018-01-29_153757.png

To create a more interactive SMS response flow, you can string together numerous SMS Response steps that reply with different messages based on the messages received. Also, since this is a Decisions flow, all the other steps are available which would allow you to send emails, create approvals and interact with DB tables based on the messages received.

Was this article helpful?