LiveChatButton

Represents a Chat 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 chat begins.

Chats routed with Omni-Channel aren’t supported in the Metadata API.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

LiveChatButton configurations are stored in the <developer_name>.liveChatButton file in the liveChatButtons directory.

Version 

Introduced in API version 28.0.

Fields 

animation 

  • Type: LiveChatButtonPresentation (enumeration of type string)
  • Required: No
  • Description: The type of animation for a chat invitation.
  • Possible values:
    • Slide
    • Fade
    • Appear
    • Custom

autoGreeting 

  • Type: string
  • Required: No
  • Introduced: API version 29.0
  • Description: The customized greeting message that the customer receives when an agent accepts a chat request from the chat button or invitation.

chasitorIdleTimeout 

  • Type: int
  • Required: No
  • Introduced: API version 35.0
  • Description: 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.

chasitorIdleTimeoutWarning 

  • Type: int
  • Required: No
  • Introduced: API version 35.0
  • Description: Specifies the amount of idle time before a warning appears. The idle time starts being counted after the agent sends the last chat message.

chatPage 

  • Type: string
  • Required: No
  • Description: Specifies the page that hosts your chat if that page differs from the Chat window.

customAgentName 

  • Type: string
  • Required: No
  • Introduced: API version 29.0
  • Description: The agent’s name as it appears to customers in the chat window.

deployments 

enableQueue 

  • Type: boolean
  • Required: No
  • Description: Indicates whether queuing is enabled (true) or not (false).

inviteEndPosition 

  • Type: LiveChatButtonInviteEndPosition (enumeration of type string)
  • Required: No
  • Description: The end position of the chat invitation. Valid values include:
  • Possible values:
    • TopLeft
    • Top
    • TopRight
    • Left
    • Center
    • Right
    • BottomLeft
    • Bottom
    • BottomRight

inviteImage 

  • Type: string
  • Required: No
  • Description: The custom button graphic that appears for the invitation.

inviteStartPosition 

  • Type: LiveChatButtonInviteStartPosition (enumeration of type string)
  • Required: No
  • Description: The start position of the chat invitation. Valid values include:
  • Possible values:
    • TopLeft
    • TopLeftTop
    • Top
    • TopRightTop
    • TopRight
    • TopRightRight
    • Right
    • BottomRightRight
    • BottomRight
    • BottomRightBottom
    • Bottom
    • BottomLeftBottom
    • BottomLeft
    • BottomLeftLeft
    • Left
    • TopLeftLeft

isActive 

  • Type: boolean
  • Required: No
  • Description: Specifies whether the chat button or invitation is active.

label 

  • Type: string
  • Required: Yes
  • Description: Specifies the text that appears on the button.

numberOfReroutingAttempts 

  • Type: int
  • Required: No
  • Introduced: API version 30.0
  • Description: Specifies the number of times a chat request can be rerouted to available agents if all agents reject the chat request.

offlineImage 

  • Type: string
  • Required: No
  • Description: Specifies the image that appears on the button when no agents are available to chat.

onlineImage 

  • Type: string
  • Required: No
  • Description: Specifies the image that appears on the button when agents are available to chat.

optionsCustomRoutingIsEnabled 

  • Type: boolean
  • Required: No
  • Introduced: API version 30.0
  • Description: Indicates whether custom routing is enabled for incoming chat requests (true) or not (false).

optionsHasChasitorIdleTimeout 

  • Type: boolean
  • Required: Yes
  • Introduced: API version 35.0
  • Description: Indicates whether the visitor idle timeout feature is enabled.

optionsHasInviteAfterAccept 

  • Type: boolean
  • Required: No
  • Description: Indicates whether a new chat invitation triggers after a customer accepts a previous chat invitation (true) or not (false).

optionsHasInviteAfterReject 

  • Type: boolean
  • Required: No
  • Description: Indicates whether a new chat invitation triggers after a customer rejects a previous chat invitation (true) or not (false).

optionsHasRerouteDeclinedRequest 

  • Type: boolean
  • Required: No
  • Introduced: API version 30.0
  • Description: Indicates whether a chat request, which has been rejected by all available agents, is rerouted to available agents again (true) or not (false).

optionsIsAutoAccept 

  • Type: boolean
  • Required: No
  • Introduced: API version 30.0
  • Description: Indicates whether a chat request is 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.

optionsIsInviteAutoRemove 

  • Type: boolean
  • Required: No
  • Description: 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 

  • Type: int
  • Required: No
  • Description: Specifies the maximum number of chat requests that are allowed to queue.

perAgentQueueLength 

  • Type: int
  • Required: No
  • Description: Specifies the number of chat requests that are allowed to queue for an agent with the required skills.

postChatPage 

  • Type: string
  • Required: No
  • Description: Specifies the name of the post-chat form to which customers are routed when the chat ends.

postChatUrl 

  • Type: string
  • Required: No
  • Description: Specifies the URL of the post-chat form to which customers are routed when the chat ends.

preChatFormPage 

  • Type: string
  • Required: No
  • Description: Specifies the name of the pre-chat form to which customers are routed before a chat begins.

preChatFormUrl 

  • Type: string
  • Required: No
  • Description: Specifies the URL of the pre-chat form to which customers are routed when the chat begins.

pushTimeOut 

  • Type: int
  • Required: No
  • Description: Specifies the number of seconds an agent has to answer an incoming chat request before the request is routed to another agent.

routingType 

  • Type: LiveChatButtonRoutingType (enumeration of type string)
  • Required: Yes
  • Description: Specifies how incoming chats are routed to agents when a customer pushes a button.
  • Possible values:
    • Choice
    • LeastActive
    • MostAvailable

site 

  • Type: string

  • Required: No

  • Description: Specifies the Salesforce site that hosts your custom chat button images or custom chat page.

    You must have the CustomDomain permission enabled in your organization before you can use a Salesforce site with Chat.

skills 

  • Type: LiveChatButtonSkills
  • Required: No
  • Description: Specifies the skills associated with the button. When a customer clicks the button to chat, they’re automatically routed to agents with those skills.

timeToRemoveInvite 

  • Type: int
  • Required: No
  • Description: Specifies how long the invitation is displayed (in seconds) to customers before it disappears.

type 

  • Type: LiveChatButtonType (enumeration of type string)
  • Required: Yes
  • Description: Required. The chat button type.
  • Possible values:
    • Standard
    • Invite

windowLanguage 

  • Type: Language (enumeration of type string)
  • Required: No
  • Description: Specifies the language preferences for the chat window associated with the button.

LiveChatButtonDeployments Type 

Represents the deployments associated with a chat button or invitation.

Fields 

deployment 

  • Type: string[]
  • Required: No
  • Description: Specifies the name of the deployment.

LiveChatButtonSkills Type 

Represents the skills associated with a chat button or invitation.

Fields 

skill 

  • Type: string[]
  • Required: No
  • Description: Specifies the name of the skill.

Declarative Metadata Sample Definition 

Here’s 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    <deployments/>
4    <enableQueue>false</enableQueue>
5    <isActive>true</isActive>
6    <label>CustomerSupportButton</label>
7    <optionsCustomRoutingIsEnabled>false</optionsCustomRoutingIsEnabled>
8    <optionsHasChasitorIdleTimeout>false</optionsHasChasitorIdleTimeout>
9    <optionsHasInviteAfterAccept>false</optionsHasInviteAfterAccept>
10    <optionsHasInviteAfterReject>false</optionsHasInviteAfterReject>
11    <optionsHasRerouteDeclinedRequest>false</optionsHasRerouteDeclinedRequest>
12    <optionsIsAutoAccept>false</optionsIsAutoAccept>
13    <optionsIsInviteAutoRemove>false</optionsIsInviteAutoRemove>
14    <postChatUrl>https://help.salesforce.com</postChatUrl>
15    <routingType>Choice</routingType>
16    <skills>
17        <skill>Chat</skill>
18    </skills>
19    <type>Standard</type>
20</LiveChatButton>

If you update your chat button through the Metadata API, be sure to update all Web pages that use the same chat button code.

Note

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.