Introduction
What is SAS® Customer Intelligence (CI) 360?
SAS® Customer Intelligence 360 enables you to get answers from your digital channels, and then take the most effective actions. Marketers can use everything they know about a customer to enable more relevant, targeted and individualized communications on all marketing touch points.
What is Twilio Voice App?
With Twilio Voice App, you can quickly make and receive voice calls in your application using multiple APIs like PHP, Node, Python, Ruby, Java, .Net (C#). We will use Java API to perform this integration.
Pre-requisites
Go to Twilio Account and Sign-Up.
Login the Twilio Account and
Information to be collected from Twilio Voice App Dashboard: Calling Number, Account SID and Auth Token.
This information will be used in Twilio Voice App – Java API.
Refer http://demo.twilio.com/docs/voice.xml for understand the XML file which will be used for Voice Message.
To create custom Voice Message, refer the above sample XML URL and prepare the new XML in same manner. Keep that custom XML file on Web Server so that Twilio Voice App can access it while executing the Java API.
Process Flow
Customer will click on the particular “Event Trigger Link” on web portal.
SAS® CI 360 will capture the event from web portal.
SAS® CI 360 Event Access Point will be called as soon as the event captured.
SAS® CI 360 Agent Framework will execute the Twilio Voice App Java API which connects to the Twilio Gateway Server to make the required call to customer.
A voice all will be made to the customer with appropriate message.
Implementation for SAS® CI 360 Integration with Twilio Voice App (Java API)
- Logon to SAS® Customer Intelligence 360
- Go to Configuration > General Page > Access Page
- Create New Access Point for Twilio App
- Go to Configuration > General Page > Access Page
- Select Twilio Agent to download
- A Zip file will be downloaded
Image 1: Creating and Downloading Access Point
- Navigate to the directory where Agent Framework is downloaded.
- Unzip the downloaded the Agent Framework.
- Navigate to the directory where you unzipped Agent Framework Zip file “\sdk\sample”.
- Edit the SampleAgent.java file to add the Twilio Voice App Java API so that call will get triggered to customer as the action on a click event on web portal.
- You can include Twilio Voice App Java API in SampleAgent.java file where as shown in the below screenshot (Image 2).
- Navigate to directory “\sdk\” and refer the following readme text file – “README_SampleAgent.txt”.
- Follow all the steps mentioned in “Section 1” in “README_SampleAgent.txt” file.
Image 2: Editing “SampleAgent.java” file
- Navigate to directory “\sdk\” and refer the following readme text file – “README_SampleAgent.txt”.
- Refer the steps mentioned in “Section 2” in “README_SampleAgent.txt”
- Open a Command Prompt and navigate to the directory where you have created sample agent (refer “README_SampleAgent.txt” > Section 1 > Step No. 6)
- Run the following command in the same session of Command Prompt:
mvn exec: java -Dci360.gatewayHost= -Dci360.tenantID= -Dci360.clientSecret= -Dlogback.configurationFile=logback.xml -Dexec.mainClass=”sample.SampleAgent” -s “/conf/settings.xml”
Following are the parameter description for the above command:
- Dci360.gatewayHost – CI 360 Hostname
- Dci360.tenanID – tenant ID which is generated after creating New Access Point.
- Dci360.clientSecret – client secret which is generated after creating New Access Point (refer Image 1).
After running the on premises Agent Framework and successful connection it will show “Event Stream Connected” in log on Command Prompt as shown in the below screenshot (Image 3).
Image 3: Successful Agent Framework Connection
- Open the web portal and click on the “Event Trigger Link” to trigger the event.
- After event generation, a JSON will get created on Command Prompt as shown in below screenshot (refer Image 4).
- Agent Framework will call the customer automatically through Twilio Voice App as an event action.
Image 4: JSON creation on Command Prompt
References
Twilio Voice App
For more information, please contact us