This is a tutorial series that's cumulative in nature. To start from the beginning, start here.

During an automated voice conversation, there are times in the flow when you might want to transfer the call to one of your supported messaging channels. In this tutorial, you do just this.

Step 27: Get an SMS number from Twilio

To start, you need a Twilio trial phone number that you can use to send SMS messages from Conversational Cloud to the consumer (you).

See our Twilio SMS quick start guide in the Knowledge Center for instructions on this step.

Generally speaking, in this step, you:

  1. Create a Twilio account.
  2. Get a virtual trial toll-free phone number from Twilio for sending and receiving SMS messages.

    You might need to verify the number and accept “emergency calling terms and conditions” as a part of this step. Verification by Twilio can take 2-3 weeks, so there’s a considerable waiting period at this point before proceeding.

    As the Twilio SMS quick start guide states, take note of the Twilio account SID, auth token, and phone number; you’ll need these later on.

    Twilio trial numbers are good for 30 days. Once the number expires, you can request a new one. All calls and SMS messages include a note indicating that the number is a trial number.

  3. Configure the request URL for the number. The URL varies by region.

    Configuring the request URL for a specific region

Step 28: Activate SMS in Conversational Cloud

In this step, you activate the SMS channel in Conversational Cloud.

  1. In Conversational Cloud, on the menu on the left side of the page, click Manage > Channel Setup.
  2. Locate the SMS card, and click Get Started.

    The SMS card with the Get Started button

  3. Click Next.
  4. Enter the Twilio account SID, auth token, and phone number. (You recorded these earlier.)

    The Twilio SMS configuration dialog where you enter the SID, auth token, and phone number

  5. Click Done.

    There’s one more important step here…

  6. Contact your LivePerson representative and ask them to enable the SMS channel in our backend systems. We need to flip a few extra switches.

    There's no need to specify a Target Skill here below in Channel Setup.

    The SMS Channel Setup Wizard, with a callout to the Target Skill field that doesn't need to be configured

    If you were to specify a target skill above, the skill would be overridden by the skill key in the JSON payload in the Transfer to Messaging interaction in the bot anyway. You configure the Transfer to Messaging interaction in the bot later on in this tutorial.

Step 29: Create a skill and assign it to yourself

  1. On the menu on the left side of the page, click Manage > Users & Skills.
  2. Select your name in the list of users.
  3. Scroll down to the bottom and, for Skills, enter “human.” When prompted, select the link to create the skill.

    Creating the skill

  4. Click Save.

    This creates the “human” skill and assigns it to your user.

Step 30: Create the Transfer to Messaging credential

  1. On the menu on the left side of the page, and select Automate > Conversation Builder.
  2. On the dashboard page that lists all of your bots, select Bot Accounts from the menu in the upper-left corner.
  3. Select your organization name (number).
  4. Select Credentials from the menu in the upper-left corner.
  5. Click Add Credential in the upper-right corner.
  6. Specify the following:

    • Name: Enter “myC2MCredential.”
    • Authentication type: Select “Transfer to Messaging.”
  7. Click Next.
  8. Specify the following:

    • Client ID: Enter the client ID that you received from your LivePerson representative (step 4).
    • Client secret: Enter the client secret that you received from your LivePerson representative (step 4).
  9. Click Save.

Step 31: Configure the C2M system

In this step, you configure the LivePerson Connect To Messaging (C2M) system.

  1. On the left navigation menu, click Engage > Connect to Messaging.
  2. If this is your first time accessing the system, click Get Started in the lower-left corner.
  3. Click Settings in the upper-right corner. (If you don’t see this option, try refreshing the browser window.)

    Next you enable the messaging channel that you intend to use, in this case, SMS.

  4. Select Channels on the left.
  5. Verify the SMS channel is turned on (enabled). If it isn’t, turn it on, and save the change.

    Turning on the SMS channel

    Next you turn on the C2M system check that determines whether the consumer’s number is a landline or a mobile number.

  6. Select Device Check on the left, and turn on the toggle. Click Save.

    Turning on the mobile device check

    Next you enable the skill to which you’ll be transferring the conversation.

  7. Select Routing on the left, select the “human” skill, and click Save.

    Enabling the human skill

    Next you create an API handoff. This is the group of configuration settings to use when the Voicebot calls the API that checks the device’s eligibility to receive messages. You leave the Settings area to do this.

  8. Select API Handoffs from the menu in the upper-left corner.
  9. Click New Handoff.

    The New Handoff button on the API handoffs page

  10. Specify the following:

    • Title: Enter “transferToMessaging.”
    • LookBack Period: Leave as is.
    • Select and Set Channel Priority: Ensure SMS is first in the list and is turned on.
  11. Click Next.
  12. Do the following:

    • Send From: Ensure your Twilio phone number is selected.
    • Message Preview: Enter the first message to send to the consumer on behalf of the agent. Enter, “Hi there! I’m the agent picking up your conversation with Anna, our pharmacy bot. To continue conversing via message, please reply to this message.”

    Configuring the Transfer to Messaging handoff

  13. Click Next, and then click Save.

    The fully configured handoff, just prior to saving it

  14. Record the handoff ID, as you’ll need this later.

    The saved handoff, with a callout to the handoff ID

Step 32: Configure the bot

  1. Return the Pharmacy Bot in Conversation Builder.
  2. Create a new dialog named “Transfer to Messaging.”
  3. In the dialog starter, click + Pattern, and enter the following patterns:

    • agent
    • help

    Adding the patterns to the dialog starter

  4. Click Save.

    The Transfer to Messaging dialog starter with the two patterns for agent and help added

  5. Beneath the dialog starter, add a Transfer to Messaging integration interaction.

    The default state of the Transfer to Messaging interaction

  6. For Credential, select the “myC2MCredential.” And save the interaction.
  7. Under Post body, click + Add JSON. Use the template that’s available to make things quicker here.
  8. In the left panel, copy the JSON for the SMS channel, and paste it into the middle panel.

    Specifying the JSON for the post body

  9. Update the JSON as follows:

    • Replace the value for “consumerPhoneNumber” with your own mobile phone number. (Ordinarily, you’d use a variable here, but for this tutorial, you want the SMS messages to be sent to your own mobile phone.)
    • Replace the value for “handoffId” with the ID of the API handoff that you created in the C2M system.
    • Replace the skill with the name of the skill you created, in this case, “human”.
    • Replace the value for “ivrNumber” with the phone number that you assigned to the Voice bot, prepended with “ + “. (The IVR number is the number from which the call was transferred.)
    • Delete the rest of the JSON, keeping just the closing brace.

    The JSON should look like this:

     {
       "consumerPhoneNumber": "+18601234567",
       "handoffId": "H123456789",
       "skill": "human",
       "ivrNumber": "+18601234567"
     }
    

    For example:

    An example of the required JSON

    ivrNumber isn't required. Only consumerPhoneNumber, handoffId, and skill are required. But specifying the ivrNumber means that Voice bot's phone number is shown as the number from which the call was transferred. This is nice to show, so specify that too.

    Now let’s create the dialogs that will handle the success and failure flows.

  10. Create a new dialog named “Token Failure.”
  11. In the Token Failure dialog, delete the dialog starter. Add a Speech statement that says, “Oops! Something went wrong when sending the SMS message. Try again at a later time.” Name the interaction “Ack token failure” (Acknowledge token failure). And set the statement’s next action to redirect the flow to the “Anything else” dialog.

    The Token Failure statement interaction

  12. Create a new dialog named “Eligibility Failure.”
  13. In the Eligibility Failure dialog, delete the dialog starter. Add a Speech statement that says, “I’m sorry. The device tied to your phone number isn’t capable of receiving a message.” Name the interaction “Ack eligibility failure.” And set the statement’s next action to redirect the flow to the “Anything else” dialog.

    The Eligibility Failure statement interaction

    A better dialog flow would be to ask the consumer if they have an alternate number that can be used. The Eligibility Failure dialog could then perform the transfer using the alternate number. But for the purposes of this tutorial, this simple flow works fine.

  14. Create a new dialog named “Invite Success.”
  15. In the Invite Success dialog, delete the dialog starter. Add a Speech statement that says, “We’ve just sent you a message. We’ll close this voice call now and continue over messaging. Good-bye!” Name the interaction “Ack invite success.” And set the statement’s next action to “Close Conversation.”

    The Invite Success statement interaction

  16. Create a new dialog named “Invite Failure.”
  17. In the Invite Failure dialog, delete the dialog starter. Add a Speech statement that says, “I’m sorry. We can’t send you a message at this time. Try again later.” Name the interaction “Ack invite failure.” And set the statement’s next action to redirect the flow to the “Anything else” dialog.

    The Invite Failure statement interaction

  18. Return to the Transfer to Messaging dialog. In the Transfer to Messaging interaction, update the four rules so that each redirects the flow appropriately to one of the four dialogs that you just created. Save the interaction.

    The fully configured Transfer to Messaging interaction

Step 33: Test the experience

  1. Start a conversation with the voice bot.
  2. Trigger the dialog flow that transfers the conversation to messaging.
  3. Once you receive the initial SMS message on your phone, reply to the message as the consumer.
  4. In Conversational Cloud, accept the conversation, and respond as the agent.

The agent's view of the messaging conversation

The consumer's view of the messaging conversation

The consumer's view of more of the messaging conversation

What's next?

Continue on to the next tutorial in the series.