This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Agents in LiveChat
Overview
The following operations allow you to work with agents. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with agents, see Sample configuration.
Operation | Description |
|---|---|
Creates a new agent in your license. | |
Retrieves complete details of the agent for the given login. | |
Retrieves the list of LiveChat agents. |
Operation details
This section provides further details on the operations related to agents.
Creating a new agent
The createAgent operation creates a new agent in your license.
createAgent
<livechat.createAgent>
<notificationNewVisitor>{$ctx:notificationNewVisitor}</notificationNewVisitor>
<loginStatus>{$ctx:loginStatus}</loginStatus>
<notificationQueuedVisitor>{$ctx:notificationQueuedVisitor}</notificationQueuedVisitor>
<dailySummary>{$ctx:dailySummary}</dailySummary>
<notificationVisitorIsTyping>{$ctx:notificationVisitorIsTyping}</notificationVisitorIsTyping>
<notificationVisitorNewGoal>{$ctx:notificationVisitorNewGoal}</notificationVisitorNewGoal>
<permission>{$ctx:permission}</permission>
<password>{$ctx:password}</password>
<maxChatsCount>{$ctx:maxChatsCount}</maxChatsCount>
<agentLogin>{$ctx:agentLogin}</agentLogin>
<notificationIncomingChat>{$ctx:notificationIncomingChat}</notificationIncomingChat>
<notificationReturningVisitor>{$ctx:notificationReturningVisitor}</notificationReturningVisitor>
<name>{$ctx:name}</name>
<groups>{$ctx:groups}</groups>
<jobTitle>{$ctx:jobTitle}</jobTitle>
</livechat.createAgent>Properties
notificationNewVisitor:Enables new visitor notification. Allowed values: 0 or 1.loginStatus:Status of the login. Possible values are "accepting chats" (default) and "not accepting chats".notificationQueuedVisitor:Enables queued visitor notification. Allowed values: 0 or 1.dailySummary:The Boolean value that indicates whether to create the daily summary (0 or 1 (default)).notificationVisitorIsTyping:Enables visitor typing notification. Allowed values: 0 or 1.notificationVisitorNewGoal:Enables visitor new goal notification. Allowed values: 0 or 1.permission:The permission level for the agent account: "administrator", "normal" (default).password:The password for the agent account. The minimum length is 5. (if not provided, an e-mail with the activation link will be sent.)maxChatsCount:The maximum count of the chat(s). Defaults to 6.agentLogin:The e-mail address for the login agent.notificationIncomingChat:Enables incoming chat notification. Allowed values: 0 or 1.notificationReturningVisitor:Enables returning visitor notification. Allowed values: 0 or 1.name:The name of the agent.groups:An array which contains a list of group IDs.jobTitle:The job title of the agent. Defaults to: "Support Agent".
Sample request
Following is a sample REST/JSON request that can be handled by the createAgent operation.
Sample Request for createAgent
{
"apiUrl": "https://api.livechatinc.com",
"apiKey": "81df74bda524d8027f0717cffaf318b2",
"login": "anu.thushi@gmail.com",
"name": "Matt Wood11",
"agentLogin": "testapp.matt11@gmail.com",
"maxChatsCount": "5",
"notificationNewVisitor": 0,
"notificationReturningVisitor": 0,
"notificationQueuedVisitor": 0,
"notificationVisitorIsTyping": 0,
"notificationVisitorNewGoal": 0,
"notificationIncomingChat":0,
"loginStatus": "not accepting chats",
"dailySummary": "0",
"permission": "administrator",
"password": "1qaz2wsx@",
"groups": [
"1",
"2"
],
"jobTitle": "Software Engineer"
}Related LiveChat documentation
http://developers.livechatinc.com/rest-api/#create-agent
Retrieving complete details of the agent
The getAgentByLoginId operation retrieves complete details of the agent for the given login.
getAgentByLoginId
<livechat.getAgentByLoginId>
<acessToken>{$ctx:acessToken}</acessToken>
<agentLogin>{$ctx:agentLogin}</agentLogin>
<apiUrl>{$ctx:apiUrl}</apiUrl>
</livechat.getAgentByLoginId>Properties
acessToken:Refers to the generated access token.agentLogin:The e-mail address for the login agent.apiUrl:The API URL of LiveChat.
Sample request
Following is a sample REST/JSON request that can be handled by the getAgentByLoginId operation.
Sample Request for getAgentByLoginId
{
"apiUrl":"https://api.livechatinc.com",
"apiKey":"81df74bda524d8027f0717cffaf318b2",
"login":"anu.thushi@gmail.com",
"agentLogin":"testapp.matt3@gmail.com"
}Related LiveChat documentation
http://developers.livechatinc.com/rest-api/#get-single-agent
Retrieving the LiveChat agents list
The listAgents operation retrieves the LiveChat agents list.
listAgents
<livechat.listAgents>
<status>{$ctx:status}</status>
</livechat.listAgents>Properties
status:The status of the agent. Values can be "accepting chats", "not accepting chats", or "offline".
Sample request
Following is a sample REST/JSON request that can be handled by the listAgents operation.
Sample Request for listAgents
{
"apiUrl":"https://api.livechatinc.com",
"apiKey":"81df74bda524d8027f0717cffaf318b2",
"login":"anu.thushi@gmail.com",
"status":"offline"
}Related LiveChat documentation
http://developers.livechatinc.com/rest-api/#get-agents
Sample configuration
Following is a sample proxy service that illustrates how to connect to LiveChat with the init operation and use the createAgent operation. The sample request for this proxy can be found in the createAgent sample request. You can use this sample as a template for using other operations in this category.