I'm using Deployment API to start the chat. Is there any way to know when the chat ends? I'd need to perform some action on the site when user finishes the chat, so a callback would be really useful here.
When your chat ends, the
saveToTranscript() method is triggered so you can use that to do post chat processing.
<input type="hidden" name="liveagent.prechat.findorcreate.saveToTranscript:Case" value="Case" />