I'm using the Live Agent Deployment API to trigger the live chat flow, before initialize the chat window we also run saveToTranscript to associate a Case to LiveChatTranscript by filling the case id, the following is our code:
liveagent.findOrCreate('Case').map('CaseNumber', 'Case Number', true, true, true).saveToTranscript('CaseId'); liveagent.init(chatSettings.chat.endpointUrl, chatSettings.chat.deploymentId, chatSettings.chat.organizationId);
In most cases, this flow is working correctly(CaseId field is filled correctly in LiveChatTranscript) without any issue, but don't know why there are still some LiveChatTranscript records that generated in Salesforce has Completed status while their CaseId field is empty:
I also looked into some of those problematic LiveChatTranscript records in detail and their history, they have nothing in common(Different browsers/device), and all other fields are correctly filled except for the CaseId, which appears to me that the conversation between agents and visitor goes well.
Is there anyone encountered such issue or has any insight how we can debug it further?
By the way, we have no any Trigger/Workflow/Process for LiveChatTranscript
Very appreciate any thoughts around this.