function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kamran HanifKamran Hanif 

Avoid Case creation in Live Chat

Is there any way to avoid case being created everytime a live chat is inititated between a customer and an agent? I have tried opening a case to salesforce and they reffered us to try snapins. It did not work for our use case.
ShivankurShivankur (Salesforce Developers) 
Hi Kamran,

You might need to modify some calls to the Deployment API to create or not to create provided object records in the pre-chat form. Some lines would look something like below:
<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>
Here is the link for reference: https://help.salesforce.com/articleView?id=000315397&language=en_US&mode=1&type=1

You will find above help article exactly opposite to your requirement and you will need to configure it to not to create cases.

It used basically findOrCreate.map.doCreate method.findOrCreate.map.doCreate method is used to specify which fields in findOrCreate.map method to use to create a new record if an existing record isn’t found. The method will not create records containing fields for which create equals false.

Refer more documentation here:
https://developer.salesforce.com/docs/atlas.en-us.live_agent_dev.meta/live_agent_dev/live_agent_creating_records_prechat_API_doCreate.htm

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.