com.salesforce.android.chat.core.QueueListener |
Listener interface for retrieving queue position updates while connecting to a chat session.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
onQueueEstimatedWaitTimeUpdate(int estimatedWaitTime, int queuePosition)
Called when the queue's estimated wait time for the visitor has been updated.
| ||||||||||
abstract void |
onQueuePositionUpdate(int queuePosition)
Called when the queue position for the visitor has been updated.
|
Called when the queue's estimated wait time for the visitor has been updated.
The estimated wait time is calculated as an exponential moving average, which weighs the most recent wait time values heavier than older ones when averaging the values.
The average estimated wait time is (1-k) * A + k * W, where: A = the average of previously calculated wait time W = the wait time of the chat that has just been accepted k = the weighted constant value used to determine how much to favor newer wait times over older wait times
estimatedWaitTime | The estimated amount of time in seconds before a visitor is assigned an agent. |
---|---|
queuePosition | The current waiting position for a visitor. |
Called when the queue position for the visitor has been updated.
The queue position is based on comparing the order a visitor has been added to the connection queue compared against the total capacity of all agents capable of handling that chat request.
The final queue position is q = max(n - c, 0), where: n = the position of the visitor compared to all waiting visitors c = the total capacity of all agents.
For example, if the total capacity is 10, the first 10 waiting visitors will have a position of 0, and the 11th will have a position of 1... etc.
The rationale is that agents are able to accept and address multiple chat sessions simultaneously up to their configured capacity.
queuePosition | The current waiting position for a visitor. |
---|