1. Home
  2. Docs
  3. Tutorials
  4. Connecting LivePerson with Amazon Alexa, Google Home, and a chatbot

Connecting LivePerson with Amazon Alexa, Google Home, and a chatbot

Being able to serve customers automatically using a chatbot or a voice assistant such as Amazon Alexa or the Google home is great, however, what will you do when our bot can’t handle the customer’s intent or message? To handle the cases where your bot does not understand, or can’t handle the user’s request, Conversation.one provides you the ability to handover the user to a human agent, using an integrated LivePerson – Alexa, Google Home, and a chatbot deployment.

Add a bot to LivePerson

We will start by configuring LiveEngage to work with a bot. Please follow the steps below:

  • Add a new user, and set the type to “Bot”

  • Set the bot details: Login Name, Email, Nickname, and Name (you can fill the other details as well)

  • Select “Password” as the login method, and fill in a password

  • Assign the bot an “Agent” profile, set the “Max number of live chats” to “Unlimited”, set “Max number of messaging conversations” to “999”. Assign the bot a “bot” skill (you might need to create it)

That’s it! The bot user is ready. Let’s move to the next step to integrate the LivePerson bot with Conversation.one

If you do not have the option to select “Bot” as a user type, you will need to contact your LivePerson account manager.

Create a conversational app

A Conversation.one application represents your conversational interface through Amazon Alexa, Google Home or a chatbot bot. To create an app:

  1. Log in to Conversation.one dashboard. If you don’t already have an account, sign up for free.
  2. Click “Create New App” on the navigation bar. If it’s your first application, you will be redirected to the “Create New App” wizard automatically.
  3. Select your industry and enter your company’s name. For the purpose of this tutorial, select “Retail” for the industry, and enter “My Store” as your company’s name. Click “Next” to continue.
  4. Select the devices you want to support with your app. For this demo select Amazon Alexa, and LivePerson. Click “Next” again to continue.
  5. Your new application is ready. Click on “Customize” to further develop your app.

Test your bot and customize it

Now that your app is configured, you can try the pre-made retail template.

In the chat console on the right, type in a request. This can be for example “What is your address?”. After you type the request, hit “Send”.

The chatbot will answer with the demo business address, “Our address is 1 Market St, San Francisco, CA 94105”.

You can learn how to create and customize a Conversation.one app in “Building Your First Conversational App” tutorial.

Connecting the Conversational application to LivePerson

Conversation.one offers automatic pre-integration with LivePerson. All we need to do now is connect the new chatbot we have created, with LivePerson. Follow the steps below to complete the process:

  • Open your app’s configuration page on the Conversation.one dashboard

  • Select the LivePerson settings by clicking on “Staging” at the top and then “LivePerson” on the left-side menu

  • Fill in your LivePerson account number. Then, add the bot’s login name and password that you configured in step #1

  • Click “Save”. If everything is configured correctly, the LivePerson Agent status will automatically change to “Online”

Try it out

Now that Conversation.one is connected to LivePerson, you can try talking to the chatbot through the LivePerson widget.

Open the chat widget. The chatbot will start with a short greeting. Type in your request on the chat console. You can write for example: “What is your address?” Then, hit “Send”.

The chatbot will answer with the demo business address, “Our address is 1 Market St, San Francisco, CA 94105”.

 

Hand over to a live-agent

While chatbot can cover a large variety of user cases, from simple F.A.Q. to complex data collection, there are still cases where you would need to hand over a client session to a live agent. In this tutorial, we will offer customers who asked for their order status to get connected to an agent. The method of handing over to an agent depends, naturally, on the communication channel. If the user contacted the business using the LivePerson widget, the hand over will be done seamlessly, on other cases such as Amazon Alexa or Google Home, we will demonstrate an over-the-phone hand over.

Some of the information in this guide is more developer-centric, but don’t be discouraged. If you follow the steps as they’re outlined, you will be able to deploy a hand-over-functionality in a snap!
  • On the Conversation.one editor, click on the “Order Related” folder and then choose the intent “OrderStatus”

  • Scroll down to the “Response” area and click “Add” response. A pop-up will open. Select a “Code – Program your own action” reponse

  • Add the following code to the text box, and click “Update”
res.say("<p>Do you have any further questions? Do you want me to connect you to a representative?</p>");
sdk.conversationHelper.setYesIntentHandler(context, req, res, 'Representative', true);
  • Go back to the main interaction screen and click “Add new intent”

  • On the text box below the question “What you will the user ask your bot”, enter “Representative” and click “Next”

  • Once again, select “Code – Program your own action” as your response

  • Add the following code to the text box and click on “Finish”
if (req.getChannel() == "liveperson") {
  res.say("Sure! I'm connecting you now.");
  req.setRedirectToAgent("420922614");
} else {
  if (!req.slot("PhoneNumber")) {
    sdk.conversationHelper.askForEntity(context, req, res, [
      [{
        "name": "PhoneNumber",
        "target": "PhoneNumber"
      }]
    ], "To continue, please provide your phone number", "For example you can say, my phone number is (646) 869-2931.");
    return;

  }
  var phoneNumber = req.slot("PhoneNumber").replace(/\D+/g, '');;
  if (phoneNumber.length === 10) {
    phoneNumber = "1" + phoneNumber;
  }

  res.say("A representetive will call you soon!");
  sdk.twilloCall(phoneNumber, "+16468692931");

  if (req.getChannel() == "alexa") {
    req.shouldEndSession(true);
  }
}
Make sure to use your live agents Skill ID when redirecting to an agent using “req.setRedirectToAgent”.
  • Go back to the main interaction screen once again and click “Add new intent”

  • Enter “Enter Phone Number” under “What you will the user ask your bot” and click “Next”

  • Select “Code – Program your own action” as your response

  • Add the following code and click “Finish”
return sdk.conversationHelper.FillEntity([{
        "name": "PhoneNumber"
    }], context, req, res);
  • On this new intent, click on “Entities” and add a new entity named “PhoneNumber” with type “Phone Number”

  • Edit the “User Says” sample “Enter Phone Number” by deleting the original text, and entering “{PhoneNumber}”

  • Click “Save” and wait until the model training is completed

Try it out

Now that your chatbot can hand over to a live agent, let’s try to run a full support cycle.

In the chat console on the right, type in the request “what’s the status of my order?”. After you type the request, hit “Send”.

The chatbot will answer with the demo answer, “example response for What’s the status of my order” and will offer the user to get connected with an agent “Do you have any further questions? Do you want me to connect you to a representative?

Answer “Yes”, and the chatbot will inform you that you are being transferred to an agent.

In the LivePerson dashboard, the agent will be notified that a new user is waiting

Once accepted, the agent can see the user’s conversation with the bot and take it from this point

Now the agent can continue the conversation with the user

And the user will be notified that he is now talking with a human agent

 

What’s next?

You can try the handover on other channels, such as Amazon Alexa and Google Home.

Feel free to contact us, we are happy to help and answer any questions you may have.

Was this article helpful to you? Yes No 1

How can we help?