LiveChatDeployment defines the configuration for a specific Salesforce Chat deployment. It controls permitted hosting domains, pre-chat API availability, connection timing, automatic transcript saving, and branding. It represents deployment-level settings, not an individual chat session or a chat button.
A Metadata API update is only part of a deployment change: you must also update all web pages that use the same deployment code.
Key Elements
| Element | What the Element Controls |
|---|---|
domainWhiteList |
The domains permitted to host the deployment. Its nested domain entries contain the domain values. |
site |
The CustomSite that hosts the deployment's images. Using a Salesforce site with Chat requires the CustomDomain permission to be enabled in the organization. |
brandingImage |
The deployment's branding image, referenced as a StaticResource. |
mobileBrandingImage |
The StaticResource used as the branding image when customers access the deployment on a mobile device. |
connectionTimeoutDuration |
The time before a chat times out, in seconds. |
connectionWarningDuration |
The time before a timeout warning appears to the agent, in seconds. Salesforce's field table uses different capitalization; see Documentation Inconsistencies. |
enablePrechatApi |
Whether the pre-chat API is enabled: true enables it; false disables it. |
enableTranscriptSave |
Whether transcripts are automatically saved after a chat ends: true enables automatic saving; false disables it. |
displayQueuePosition |
Whether a waiting customer sees their queue position in a standard chat window: true displays it; false does not. Salesforce documents this as a pilot requiring enablement through Salesforce. |
windowTitle |
The title of the window associated with the deployment. |
Behavior and Constraints
Hosting permission and image hosting are separate settings. The nested domainWhiteList structure identifies domains that can host the deployment. The site element instead identifies the Salesforce site that hosts its images. Setting an image-hosting site is not the same as adding a domain to the permitted hosting list.
The whitelist uses the nested LiveChatDeploymentDomainWhiteList structure, with domain values in domain entries. These entries belong to the deployment; they are not separate deployable components.
Transcript saving is not transcript retention. enableTranscriptSave controls automatic saving after a chat ends. It does not define how long transcripts are retained. enablePrechatApi independently controls access to the pre-chat API.
Both connection timing fields use seconds. connectionTimeoutDuration controls the timeout timing, while connectionWarningDuration controls when the warning appears to the agent.
A schema field does not establish feature enablement. displayQueuePosition applies to the customer's queue position in a standard chat window while awaiting an agent response. Salesforce documents it as a pilot feature and directs customers to contact Salesforce for enablement. Its presence in metadata does not prove that the organization has it enabled.
Deployment and Retrieval
File-based metadata uses the filename <developer_name>.liveChatDeployment in the liveChatDeployments directory. The type supports the * wildcard in the package.xml manifest, the file that selects metadata components for deployment or retrieval.
When you update a deployment through the Metadata API, also update every web page that uses the same deployment code. The metadata update alone does not complete the website change.
Image resources and the image-hosting site are dependencies identified by the deployment's reference values. Those relationships do not, by themselves, establish a mandatory deployment sequence.
Relationships
The deployment references its branding resources and image-hosting site. Chat-button and embedded-service configurations can reference the deployment in the other direction. Inspect the actual reference values to determine which components use a particular deployment; the existence of these relationships does not establish usage.
References
-
StaticResource:brandingImage,mobileBrandingImage. -
CustomSite:site.
Referenced By
-
LiveChatButton:deployment. -
EmbeddedServiceLiveAgent:liveChatDeployment.
Documentation Inconsistencies
The exposed element name is connectionWarningDuration, but Salesforce's field table spells it ConnectionWarningDuration, with an uppercase initial letter. Account for this capitalization discrepancy when serializing the setting into metadata XML.
Common Questions
Do I need to update website code after changing LiveChatDeployment through the Metadata API?
Yes. Update all web pages that use the same deployment code. Updating the metadata alone does not complete the website change.
What is the difference between domainWhiteList and site?
domainWhiteList lists domains permitted to host the deployment. site references the CustomSite that hosts its images. Using a Salesforce site with Chat requires the organization's CustomDomain permission.
Does enableTranscriptSave control how long chat transcripts are kept?
No. It controls whether transcripts are automatically saved after a chat ends, not their retention period.
Why might displayQueuePosition not be available even though it appears in the schema?
Salesforce documents this setting as a pilot requiring enablement through Salesforce. Its presence in the schema does not establish that the feature is enabled in the organization.
Which metadata types can reference a LiveChatDeployment?
LiveChatButton can reference it through deployment, and EmbeddedServiceLiveAgent can reference it through liveChatDeployment. Check those elements' values to identify actual usage.