Loading

Case record is not created for Chat

Udgivelsesdato: May 15, 2026
Beskrivelse

When a Live Agent Chat (Salesforce Chat) button is configured with auto-accept and the agent does not immediately click on the chat tab after the chat is accepted, the case record associated with the chat may not be created.
Why this happens: The Chat records tab — which triggers the consoleajaxservlet call that performs the findOrCreate action (the operation that creates the case) — is only loaded when the chat tab is clicked and brought into focus in the Service Console. If the agent's connection changes (for example, the agent goes offline or loses connection) before they click the chat tab, the consoleajaxservlet call is never initiated and the case record is not created.
To confirm this behavior in your environment:

  1. Set up an org with Live Agent Chat and an agent configured to accept chats from a button with auto-accept enabled.
  2. Create a chat deployment page using the Chat Deployment API. In the deployment script, use liveagent.addCustomDetail() to define case field values (for example, Case Subject and Case Status), then use liveagent.findOrCreate('Case') to map those fields to the Case object, save the transcript to a CaseId, and call showOnCreate().
  3. Open the Service Console as the chat agent and set your status to available.
  4. Submit a test chat request from the deployment page.
  5. Make sure the agent is focused on a different tab when the chat comes in — do not redirect to the chat tab.
  6. End the chat from the visitor's side, then toggle the agent offline and back online.
  7. Navigate to the chat page — observe that the case record was not created because the agent session changed before the tab was loaded.
<script type='text/javascript'>
liveagent.addCustomDetail("Case Subject", "Test Subject");
liveagent.addCustomDetail("Case Status", "New");
liveagent.findOrCreate("Case").map("Subject","Case Subject",false,false,true).map("Status","Case Status",false,false,true).saveToTranscript("CaseId").showOnCreate();
</script>
Løsning

This behavior is working as designed. Auto-accepted chats load in the background in the Service Console, but the console does not render the chat tab content until the tab is focused. Without the tab loading, the consoleajaxservlet is not called, and the findOrCreate operation that creates the case record is not executed.
Agents using auto-accept must click on the chat tab when a chat is accepted to ensure the case record is created.

Vidensartikelnummer

000382631

 
Indlæser
Salesforce Help | Article