Setting up the IVA for SMS/MMS (Twilio)
Ensure that users can interact with your Pega Intelligent Virtual Assistant™ (IVA) by sending SMS or MMS messages from a mobile phone. As a result, you make your business services available to users on a convenient messaging platform as a chatbot, helping to address their important business needs. You need to set up a Twilio account for the phone number that is used by your application as a chatbot.For example, for a financial bank application, customers can send SMS messages to your chatbot to obtain the current balance on their savings account.
- Configure Digital Messaging channel security settings. For more information, see Configuring Digital Messaging channel security.
- If you do not have an IVA for Digital Messaging, create a Digital Messaging channel. For more information, see Creating a Digital Messaging channel.
- If you do not have a Twilio account for the mobile phone number that you plan to use with your Pega Platform application, create a Twilio account. Twilio will generate a unique identifier and authorization token for your Twilio account. For more information, refer to the Twilio portal.
For relevant training materials, see the Configuring Digital Messaging Manager module on Pega Academy.
- In the navigation pane of App Studio, click Channels.
- In the Current channel interfaces section, click the icon that represents your existing Digital Messaging channel.
- In the Digital Messaging channel, click the Connection tab.
- Click Manage connections.
- In the Digital Messaging Manager window, click Add Connection, and then click the SMS icon.
- On the New Twilio SMS page, in the Name field, enter a name for your Twilio account.
- In the Number field, enter the phone number, including the country code, for your Twilio account.
- In the Account SID field, enter the identifier for your
Twilio account.Twilio generates a unique identifier when you create a Twilio account.
- In the Auth token field, enter the authorization token
for your Twilio account.Twilio generates an authorization token when you create a Twilio account.
- In the Add country list, select a country code for which
you allow to send messages to your application, and then click
Note: Ensure that you align the options you select in this list with the geographic permissions for your Twilio number. In the Twilio portal, you can search for SMS Geographic Permissions to configure the locations for the permitted inbound messaging. For example:
The following figure shows sample configuration settings for SMS/MMS:
Result: The system displays information that the selected country code was successfully updated.
- Optional: To add more country codes, repeat step 10.
- Click Save.
Result: The system displays information that the new SMS account was successfully registered.
- In the Webhook section, highlight and copy the generated
webhook URL for Twilio.
For example: The webhook URL that the system generates looks like this: https://incoming.sample.pega.digital/twilio
- Optional: To display all of your configured accounts for messaging platforms in the Digital Messaging Manager window, click Home.
- Close the browser window, and then in the Digital Messaging channel, click Save.
- Access your account on the Twilio portal, click Manage Numbers, and then click Active Numbers.
- In the Messaging section, in the field next to the
A Message Comes In webhook section, paste the webhook
URL that you copied in step 13. This action ensures that when your Twilio phone number receives inbound SMS or MMS messages, Twilio forwards the messages to the IVA channel.
Previous topic Setting up the IVA for Facebook Messenger Next topic Setting up a Twilio account for a mobile number