Salesforce Estimated Wait Time Instead of Queue Position for a Chat Session

By default, the Chat API returns queue position information that you can relay to customers. However, you can also receive the estimated wait time in addition to the queue position. Sometimes, the estimated wait time more effectively conveys the right information to customers than a queue position number. This feature is available in API version 47.0 and later.

Use the below steps for getting the Estimated Wait Time from the Chat API.

1. Go to Chat Settings.


2. Get the Chat API.


3. Go to Deployments.



4. Open the Chat Deployment.

5. Get the Chat Deployment Id and the Version.


6. Use Postman or SOAP UI or any REST API Explorer. Use GET method and use the Endpoint URL from step 2 and add /Visitor/Availability path to it.

7. Set X-LIVEAGENT-API-VERSION to the version of the Chat Deployment from Step 5.


8. Set the below params.

org_id=Salesforce Org Id
deployment_id=id of the chat deployment(from step 5)
Availability.needEstimatedWaitTime=1
Availability.ids=id of the chat button(Got to Chat Buttons & Invitations in Setup to get the button Id. You can pass multiple ids using [id1,id2,...])



When Agent(s) is/are available:



When Agent(s) is/are not available:

6 comments:

  1. How to show estimated waiting time on chat window instead of queue number.

    ReplyDelete
    Replies
    1. You can show Queue Position using .
      https://www.infallibletechie.com/2021/03/how-to-show-queue-position-in.html

      There is no similar tag to show waiting time. You can use the API call do it so.

      Delete
  2. How to show wait time on Chat Bot UI?

    ReplyDelete
    Replies
    1. You can try to use LWC and do the REST API to find the Wait Time and show it.

      Delete
  3. IS this something dynamic? or it ill always shoe the same value for the estimated time?

    ReplyDelete
    Replies
    1. No. It is dynamic. Route multiple chats and close it different timings and check.

      Delete