All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3
typeflat

...

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

OperationDescription

11Working with Agents in LiveChatcreateAgent

Creates a new agent in your license.

11Working with Agents in LiveChatgetAgentByLoginIdRetrieves complete details of the agent for the given login.
11Working with Agents in LiveChatlistAgentsRetrieves the list of LiveChat agents.

Operation details

This section provides further details on the operations related to agents.

Anchor
createAgent
createAgent
Creating a new agent

The createAgent operation creates a new agent in your license.

Code Block
languagexml
titlecreateAgent
<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".
Anchor
request
request
Sample request

Following is a sample REST/JSON request that can be handled by the createAgent operation.

Code Block
languagexml
titleSample 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

Anchor
getAgentByLoginId
getAgentByLoginId
Retrieving complete details of the agent

The getAgentByLoginId operation retrieves complete details of the agent for the given login.

Code Block
languagexml
titlegetAgentByLoginId
<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.

Code Block
languagexml
titleSample 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

Anchor
listAgents
listAgents
Retrieving the LiveChat agents list

The listAgents operation retrieves the LiveChat agents list.

Code Block
languagexml
titlelistAgents
<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.

Code Block
languagexml
titleSample 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

Anchor
sampleconfiguration
sampleconfiguration
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.

...