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.
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:
- 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:
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:
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.