---
schema_version: "1"
id: e9e4f4db56a3437a9a38b3966459ea047bcedd543167a107aea731e2c715c0cf
title: LiveChatButton
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_livechatbutton.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_livechatbutton.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: edf56cc6b80413b8755258b970335ea1ed86964f76828c6830bedbda6c313afc
description: Represents a button that allows visitors to request chats with Chat users. This object is available in API version 24.0 and later.
---
# LiveChatButton

Represents a button that allows visitors to request chats with Chat users. This object is available in API version 24.0 and later.

## Supported Calls

create(), describeSObjects(), query(), retrieve(), update(), upsert()

## Fields

| Field Name | Details |
| --- | --- |
| Animation | 
Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The type of animation used when an automated chat invitation appears on-screen. For automated chat invitations only. Available in API version 29.0 and later.

Possible values are:

- Appear
- Custom
- Fade
- Slide





 |
| AutoGreeting | 

Type

textarea

Properties

Create, Filter, Nillable, Sort, Update

Description

The text that is automatically sent from an agent to a visitor when a chat session starts.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

A greeting message in the AutoGreeting field of the LiveChatButton object overrides individual users’ greeting messages in the AutoGreeting field in the LiveChatUserConfig object.















 |
| ChasitorIdleTimeout | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The amount of time a customer has to respond to an agent message before the chat times out.



 |
| ChasitorIdleTimeoutWarning | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The amount of time a customer has to respond to an agent message before a warning appears and a timer begins a countdown. This value must be shorter than the ChasitorIdleTimeout value. We recommend at least 30 seconds shorter.



 |
| ChatPageId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the custom VisualForce page that contains the custom chat window code.

This field is a relationship field.

Relationship Name

ChatPage

Relationship Type

Lookup

Refers To

ApexPage



 |
| CustomAgentName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The custom name of the agent associated with the button. Available in API version 29.0 and later.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

A custom agent name in the CustomAgentName field of the LiveChatButton object overrides individual users’ custom agent name in the CustomAgentName field in the LiveChatUserConfig object.















 |
| DeveloperName | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s organization.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record.















 |
| HasQueue | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Determines whether or not to allow queing incoming chat requests until an agent is available.

The default value is false.



 |
| InviteEndPosition | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The position on screen where an automated chat invitation’s animation ends.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

You don’t need to select an end position for your automated chat invitation if you use a custom animation.

For automated chat invitations only. Available in API version 29.0 and later.

Possible values are:

- Bottom
- BottomLeft
- BottomRight
- Center
- Left
- Right
- Top
- TopLeft
- TopRight





 |
| InviteImageId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the static image resource displayed on your automated chat invitation. For automated chat invitations only. Available in API version 29.0 and later.

This field is a relationship field.

Relationship Name

InviteImage

Relationship Type

Lookup

Refers To

StaticResource



 |
| InviteStartPosition | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort , Update

Description

The position on screen where an automated chat invitation’s animation begins.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

You don’t need to select a start position for your automated chat invitation if you use a custom animation.

For automated chat invitations only. Available in API version 29.0 and later.

Possible values are:

- Bottom
- BottomLeft
- BottomLeftBottom
- BottomLeftLeft
- BottomRight
- BottomRightBottom
- BottomRightRight
- Left
- Top
- Right
- TopLeft
- TopLeftLeft
- TopLeftTop
- TopRight—Top Right
- TopRightRight
- TopRightTop





 |
| IsActive | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

For automated chat invitations, specifies whether an automated chat invitation is active or not.

The default value is false.



 |
| IsRoutingFlowEnabled | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Specifies whether routing flow is enabled or not.

The default value is false.



 |
| Language | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The language of the chat.

Possible values are:

- da—Danish
- de—German
- en\_US—English
- es—Spanish
- es\_MX—Spanish (Mexico)
- fi—Finnish
- fr—French
- it—Italian
- ja—Japanese
- ko—Korean
- nl\_NL—Dutch
- no—Norwegian
- pt\_BR—Portuguese (Brazil)
- ru—Russian
- sv—Swedish
- th—Thai
- zh\_CN—Chinese (Simplified)
- zh\_TW—Chinese (Traditional)





 |
| MasterLabel | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

Label for the chat button.



 |
| NumberOfReroutingAttempts | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Specifies the number of times a chat request can be rerouted to available agents if all agents reject the chat request.



 |
| OfflineImageId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the static image resource that is displayed when the button is offline (inactive).

This field is a relationship field.

Relationship Name

OfflineImage

Relationship Type

Lookup

Refers To

StaticResource



 |
| OnlineImageId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the static image resource that is displayed when the button is online (active).

This field is a relationship field.

Relationship Name

OnlineImage

Relationship Type

Lookup

Refers To

StaticResource



 |
| OptionsHasChasitorIdleTimeout | 

Type

boolean

Properties

Create, Filter, Update

Description

Specifies whether Customer Time-Out is enabled.



 |
| OptionsHasInviteAfterAccept | 

Type

boolean

Properties

Create, Filter, Update

Description

Specifies whether an automated chat invitation can be sent to a customer after that customer has accepted a prior automated chat invitation (true) or not (false). For automated chat invitations only. Available in API version 29.0 and later.



 |
| OptionsHasInviteAfterReject | 

Type

boolean

Properties

Create, Filter, Update

Description

Specifies whether an automated chat invitation can be sent to a customer after that customer has rejected a prior automated chat invitation (true) or not (false). For automated chat invitations only. Available in API version 29.0 and later.



 |
| OptionsHasRerouteDeclinedRequest | 

Type

boolean

Properties

Create, Filter, Update

Description

Specifies whether a chat request that has been rejected by all available agents should be rerouted to available agents again (true) or not (false).



 |
| OptionsIsAutoAccept | 

Type

boolean

Properties

Create, Filter, Update

Description

Specifies 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 Most Available or Least Active. Available in API version 30.0 and later.



 |
| OptionsIsInviteAutoRemove | 

Type

boolean

Properties

Create, Filter, Update

Description

Specifies whether an automated chat invitation should be automatically removed from the screen after a certain amount of time (true) or not (false). For automated chat invitations only. Available in API version 29.0 and later.



 |
| OverallQueueLength | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The maximum number of chat requests allowed to queue.



 |
| PerAgentQueueLength | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The maximum number of chat requests allowed to queue for each agent with the required skill.



 |
| PostchatPageId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the custom VisualForce page displayed when the chat ends.

This field is a relationship field.

Relationship Name

PostchatPage

Relationship Type

Lookup

Refers To

ApexPage



 |
| PostchatUrl | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The URL the user is directed to after the chat ends.



 |
| PrechatFormPageId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the custom VisualForce page displayed before the chat begins.

This field is a relationship field.

Relationship Name

PrechatFormPage

Relationship Type

Lookup

Refers To

ApexPage



 |
| PrechatFormUrl | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The URL the user is directed to before the chat begins.



 |
| PushTimeout | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of seconds an agent has to answer a chat request before it’s routed to the next available agent.



 |
| QueueId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the queue used for this chat button.

This field is a relationship field.

Relationship Name

Queue

Relationship Type

Lookup

Refers To

Group



 |
| RoutingConfigurationId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the routing configuration used for this chat button.

This field is a relationship field.

Relationship Name

RoutingConfiguration

Relationship Type

Lookup

Refers To

QueueRoutingConfig



 |
| RoutingType | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

How chat requests are routed to agents. The values are:

- Choice—Incoming chat requests are added to the queue in Live Agent in the Salesforce console and are available to any agent with the required skill.
- Least Active—Incoming chats are routed to the agent with the required skill who has the fewest active chats.
- Most Available—Incoming chats are routed to the agent with the required skill and the greatest difference between chat capacity and active chat sessions. For example, if Agent A and Agent B each have a chat capacity of five, and Agent A has three active chat sessions while Agent B has one, incoming chats will be routed to Agent B.
- Omni—Incoming chats are routed using Omni-Channel queues.





 |
| SiteId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the site used for loading static resources and custom VisualForce pages.

This field is a relationship field.

Relationship Name

Site

Relationship Type

Lookup

Refers To

Site



 |
| SkillId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The record ID of the skill used to route incoming chat requests. To associate multiple skills with a chat button, reference one skill in the SkillId field and use LiveChatButtonSkill junction objects for the remaining skills.

This field is a relationship field.

Relationship Name

Skill

Relationship Type

Lookup

Refers To

Skill



 |
| TimeToRemoveInvite | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of seconds an automated invitation stays on-screen before it is automatically removed. For automated chat invitations only. Available in API version 29.0 and later.



 |
| Type | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

The type of element to display to customers.

Possible values are:

- Invite—Automated invitation
- Standard—Chat button





 |
| WindowLanguage | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The language used for standard chat windows. Custom chat windows use the language of the user’s browser.

Possible values are:

- da—Danish
- de—German
- en\_US—English
- es—Spanish
- es\_MX—Spanish (Mexico)
- fi—Finnish
- fr—French
- it—Italian
- ja—Japanese
- ko—Korean
- nl\_NL—Dutch
- no—Norwegian
- pt\_BR—Portuguese (Brazil)
- ru—Russian
- sv—Swedish
- th—Thai
- zh\_CN—Chinese (Simplified)
- zh\_TW—Chinese (Traditional)





 |

## Usage

Use this object to query and manage chat buttons and automated chat invitations.