A Developers Blog: LiveEngage - Use The Web App SDK To Send Chat Lines To The Agent Console

This blog has moved to GitHub, and you should be redirected shortly...

Thursday, November 19, 2015

LiveEngage - Use The Web App SDK To Send Chat Lines To The Agent Console

The purpose of this tutorial is to show you how to use the Web Application SDK to send chat lines from your own web application.

The Web Application SDK is a client-side package that can be used to communicate with the LivePerson Agent Workspace. In order to use the SDK, your web application needs to be able to open inside an iFrame, and your application must be hosted over SSL. You can read more about the SDK here: Web App SDK PDF

For this tutorial, we are going to use create a simple web page that will send a "Hello World!" chat line to the agent console.

Let's get started:

1. The first thing we will want to do is create a basic HTML template for our web application. Create an index.html file in your favorite editor and add the following code:

2. The next thing we need to do is reference the SDK code in your web application. To do this, you need to add the following code to the head element of your HTML page:

3. Next, you need to add the following JavaScript right before your closing body element of your HTML page:

For the code we just added, we declared a variable that is set to the SDK, and then we initialized it, which allows to communicate with the agent console. By doing this, we are able to send data to the chat input line of the agent console, and we are able to pull information about the chat from the agent console.

Lastly we defined a variable that contains the data we want to send to the chat input line, and then we sent the data.

4. Your final index.html page should look like this:


5. Now that we have our web application ready to go, you just need to host it on a secure site. Once this is done, we need to add the widget inside LiveEngage. You can read more about that here: Add Widget To LiveEngage

Summary: This tutorial showed you how to use the Web Application SDK to send a chat line to the agent console. and how to add the your web application as a widget inside the agent console.

I hope you enjoyed this tutorial. If you have any questions or comments, please feel free to post them below.

Labels: , , ,

2 Comments:

At July 29, 2016 at 5:11 PM , Blogger Unknown said...

Our organization is still coming up to speed with the various tools provided with Liveperson and one of our challenges today for our service representatives is that they will have multiple windows open for our CRM and LivePerson Chat. We would like to find the most effective solution for integrating the liveperson chat session within our CRM application. Wasn't sure if an iframe was necessary or if we could truly utilize one of the APIs (agent, chat, etc.) from Liveperson to achieve our objective. Any thoughts would be greatly appreciated.

 
At July 30, 2016 at 8:18 PM , Blogger Scott Westover said...

Hi J Davis,

Unfortunately, a lot of the old APIs that were available on the old platform, are not available on the new LiveEngage platform yet. When your representatives are taking chats, are they looking at information in the CRM, or are you looking to store the chat transcript in the CRM when the chat is completed?

If you need to access your CRM while during the chat, if it is web based, you can add an Iframe inside LiveEngage that will load your CRM if it can open in an Iframe.

If you are looking to just store the transcripts in the CRM, you could leverage the Engagement History API to do this.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home