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
Shubham Bansal 45Shubham Bansal 45 

how can we detect in code that chat with agent is started successfully or not

I have a requirement to run a run when chat with agent does not start successfully or either user cancel chat request.

is there any way to detect that chat is started or not . 
AbhishekAbhishek (Salesforce Developers) 
The Live Agent REST API allows you to programmatically create Live Agent sessions, send messages to available agents, create new records based on chat information, etc., all through HTTP messages. A use case would be if you want to use the capabilities of Live Agent via a third-party tool, perhaps an internal chat client in your organization.

https://help.salesforce.com/articleView?id=000331168&type=1&mode=1

Check this for a better explanation

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.

 
Shubham Bansal 45Shubham Bansal 45
Hi Abhishek,

I don't want to initiate a chat session, my chat session functionality is working fine. The only thing I want to know is there any way to detect the session is created successfully or not,
AbhishekAbhishek (Salesforce Developers) 
I thought that article will help you.

any way to detect the session is created successfully or not-I don't think so.
Shubham Bansal 45Shubham Bansal 45
Ok thanks for your reply and time