Flow Designs: Customer Engagement using Khoros and SMS text messaging
Engaging customers where they are is an important aspect of the customer care experience. SMS text messages is an easy way to start a conversation with customers.
Some use cases are:
- Send a notification, like a delivery update
- Deflect a phone call to text messaging
- Bulk send a message to customers
What you need
To build an SMS experience, you need:
- A Khoros instance that is connected to a phone number
- A registered bot user within the Khoros instance
- A Flow account and organization
Getting started
To start sending outbound messages:
-
Connecting Flow with Khoros
- Open your Flow project.
- Go to the Integration section.
- Add a new Khoros integration within the customer service section.
- Choose a bot name.
- Provide the bot username and password (contact Khoros Support to create a bot user for your Khoros instance).
- Add your company key (check the Khoros developer settings to find the name).
- Choose the correct region (contact Khoros Support if you do not know the region of your instance).
- Choose SMS as the channel.
- Add the phone number connected to Khoros as the external ID.
- Add the same phone number in the phone number field.
- Add [email protected] as the contact email address.
See the installation documentation for more information.
-
Configure the Flow REST API
Using the REST API you can make a direct broadcast call to Flow using a customer phone number (MSISN) that would trigger a specific flow.
Then, you can send text messages to customers through the Khoros SMS integration.
- Go to the organization settings screen.
- Choose “API Keys”. If you do not see this item, you do not have sufficient permissions for the organization.
- Contact the owner of the Flow organization.
- Create a new API key (choose the default settings).
- Go back to the project and open up the integration overview.
- Add a new REST API integration.
- Choose the API key from the drop-down menu and click Save.
- Copy the REST API token and store it to use later.
- Creating a Flow to trigger
Add a new flow and make it start with an event. For example, name the event: Send SMS.
Below the event, drag and drop a text reply. Add some text like: "This is a test message".
Save the flow and test it.
Testing
You can test the broadcast using a CURL command to make a call to the REST API.
The following is an example of a CURL command:
curl --location --request POST '<https://api.flow.ai/rest/v1/broadcast/instant>'
--header 'Content-Type: application/json'
--header 'Authorization: sk_ab12abcd9876543210abcdefgh012345'
--data-raw '{
"audience": [{
"name": "John Doe",
"phoneNumber": "+1234567890"
}],
"channel": {
"channelName": "khoros",
"externalId": "+0987654321"
},
"payload": {
"type": "event",
"eventName": "Send SMS"
}
}
Replace the information:
Name | Description |
---|---|
API_TOKEN | REST API token copied in step 2 |
CUSTOMER_NAME | Name of the customer (or anonymous) |
CUSTOMER_MSISDN | Valid phone number in international format |
KHOROS_EXTERNAL_ID | Khoros external ID (phone number) |
EVENT_NAME | Event name of the flow to trigger |
curl --location --request POST '<https://api.flow.ai/rest/v1/broadcast/instant>'
--header 'Content-Type: application/json'
--header 'Authorization: API_TOKEN'
--data-raw '{
"audience": [{
"name": "CUSTOMER_NAME",
"phoneNumber": "CUSTOMER_MSISDN"
}],
"channel": {
"channelName": "khoros",
"externalId": "KHOROS_EXTERNAL_ID"
},
"payload": {
"type": "event",
"eventName": "EVENT_NAME"
}
}
'
Troubleshooting
- Check the notification overview in the top right for any errors.
- Check the Flow chat logs, choose “All messages” to view any inbound and outbound REST API calls.
Updated 11 months ago