Newer Version Available
LiveChatButton
Represents a Live Agent deployment’s settings for the button that customers click to chat with
an agent and the chat window, such as the label that appears on the button and
the pre-chat form that appears before a live chat begins.
This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
LiveChatButton configurations are stored in the <developer_name>.liveChatButton file in the liveChatButtons directory.
Version
LiveChatButton is available in API version 28.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| chasitorIdleTimeout | int | Specifies the amount of idle time before the chat times out. The idle time starts being counted after the agent sends the last chat message. Available in API version 35.0 and later. |
| chasitorIdleTimeoutWarning | int | Specifies the amount of idle time before a warning appears. The idle time starts being counted after the agent sends the last chat message. Available in API version 35.0 and later. |
| chatPage | string | Specifies the page that hosts your chat if that page differs from the Live Agent chat window. |
| enableQueue | boolean | Indicates whether queuing is enabled (true) or not (false). |
| label | string | Specifies the text that appears on the button. |
| numberOfReroutingAttempts | int | Specifies the number of times a chat request can be rerouted to available agents if all agents reject the chat request. Available in API version 30.0 and later. |
| offlineImage | string | Specifies the image that appears on the button when no agents are available to chat. |
| onlineImage | string | Specifies the image that appears on the button when agents are available to chat. |
| optionsCustomRoutingIsEnabled | boolean | Indicates whether custom routing is enabled for incoming chat requests (true) or not (false). Available in API version 30.0 and later. |
| optionsHasChasitorIdleTimeout | boolean | Indicates whether the visitor idle timeout feature is enabled. Available in API version 35.0 and later. |
| optionsHasInviteAfterAccept | boolean | Indicates whether a new chat invitation triggers after a customer accepts a previous chat invitation (true) or not (false). |
| optionsHasInviteAfterReject | boolean | Indicates whether a new chat invitation triggers after a customer rejects a previous chat invitation (true) or not (false). |
| optionsHasRerouteDeclinedRequest | boolean | Indicates whether a chat request, which has been rejected by all available agents, should be rerouted to available agents again (true) or not (false). Available in API version 30.0 and later. |
| optionsIsAutoAccept | boolean | Indicates whether a chat request should be automatically accepted by the agent it’s assigned to (true) or not (false). For chat buttons and automated chat invitations with routingType set to MostAvailable or LeastActive. Available in API version 30.0 and later. |
| optionsIsInviteAutoRemove | boolean | Indicates whether a chat invitation is set to automatically disappear from a customer’s screen after a certain amount of time (true) or not (false). |
| overallQueueLength | int | Specifies the maximum number of chat requests that are allowed to queue. |
| perAgentQueueLength | int | Specifies the number of chat requests that are allowed to queue for an agent with the required skills. |
| postChatPage | string | Specifies the name of the post-chat form to which customers are routed when the chat ends. |
| postChatUrl | string | Specifies the URL of the post-chat form to which customers are routed when the chat ends. |
| preChatFormPage | string | Specifies the name of the pre-chat form to which customers are routed before a chat begins. |
| preChatFormUrl | string | Specifies the URL of the pre-chat form to which customers are routed when the chat begins. |
| pushTimeOut | int | Specifies the number of seconds an agent has to answer an incoming chat request before the request is routed to another agent. |
| routingType | LiveChatButtonRoutingType (enumeration of type string) | Specifies how incoming chats should be routed to agents when a
customer pushes a button. Valid values are:
|
| site | string | Specifies the Force.com site that hosts your custom chat button images or custom chat page. |
| skills | LiveChatButtonSkills | Specifies the skills associated with the button. When a customer clicks the button to chat, they are automatically routed to agents with those skills. |
| windowLanguage | Language | Specifies the language preferences for the chat window associated with the button. |
Fields
| Field Name | Field Type | Description |
|---|---|---|
| skill | string | Specifies the name of the skill. |
Declarative Metadata Sample Definition
This is a sample of a liveChatButton file.
1<?xml version="1.0" encoding="UTF-8"?>
2<LiveChatButton xmlns="http://soap.sforce.com/2006/04/metadata">
3 <label>My Button 1</label>
4 <chatPage>ChatterAnswersLogin</chatPage>
5 <enableQueue>true</enableQueue>
6 <offlineImage>MyOfflineButton</offlineImage>
7 <onlineImage>MyOnlineButton</onlineImage>
8 <perAgentQueueLength>5</perAgentQueueLength>
9 <postchatPage>AnswersHome</postchatPage>
10 <prechatFormPage>AccountVF</prechatFormPage>
11 <pushTimeOut>300</pushTimeOut>
12 <routingType>LeastActive</routingType>
13 <site>LiveAgentSite</site>
14 <skills>
15 <skill>Skill1</skill>
16 <skill>Skill2</skill>
17 </skills>
18</LiveChatButton>