Live Assist – Set Availability in USD

CaféX’s Live Assist can be used with Unified Service Desk to help automate the processes around using web chat / Omni channel. But when doing this how do we automatically control an agents availability?

Imagine you have agents that take telephone calls and also engage in web chat with your customers. When handling web chat they could potentially “talk” to several customers at the same time but once on the phone they can only handle one customer at once.

Live Assist has a presence control that lets the agent manually change their status to busy or back soon etc. Meaning if they started a phone call they might want to change their availability as until the call is finished they can’t be available for web chat.

But wouldn’t it be better if we could automatically set and reset the agent’s state. To achieve this we’d need to be able to read the current state and also set it as required. In this post I will explain the actions we’d need to achieve this in USD.

For example ….. In my application, I set the agents status to “Back Soon” when a CTI (phone call) event is received, then after that session is closed the status is checked and automatically changed to Online.

The status / presence of an agent is controlled using the Chat Control hosted control. It is worth looking in the debugger at the values available to use. Notice that there is a string called AllPresenceStates, this holds some useful information we’ll use later! And also notice another string called CurrentState.


The first uii action that is useful for us is one called SetPresenceState. If you create a SetPresenceState action you may notice that no help displays! This means it might not be obvious what options are available to us. But with some trial and error I have worked out how to set the user status.

The name field can contain a name value pair that sets the state. The name being “presence” and the value being the full detail of the status we want to set.

In my example the data field is set to …. presence={“StatusCode”:3,”Name”:”Back Soon”,”ColorCode”:”#FF8C00″}

The result is that the agent’s presence will be changed to Back Soon when this action is run. How do we know what value to apply to the presence? Well the clue is in the AllPresenceStates string I mentioned in the debugger. Mine is shown below, and you can see the details for the “Back Soon” status highlighted in red.

[{“StatusCode”:2,”Name”:”Online”,”ColorCode”:”#009E49″},{“StatusCode”:3,”Name”:”Back Soon”,”ColorCode”:”#FF8C00″},{“StatusCode”:4,”Name”:”Away”,”ColorCode”:”#E71022″}]


Being able to set the agents presence is only half of the problem! If I want to change the status I may need to first know the current status.

For example:
If the agent has marked themselves as “Away” I don’t want to change this. But if they are set to “Back Soon”, I might automatically decide it is time for them to be shown as online.

For this we have another uii action on the Chat Control called GetCurrentState.

We saw in the debugger that a CurrentState field exists. But this does not automatically refresh each time the agent manually changes their status. So you will need to run this action prior to checking the agents status.

We saw in the debugger that initially the CurrentState replacement parameter will contain a string that resembles the format we saw in the AllPresenceStates string.

But having run a GetCurrentState option the format changes. And becomes a little more friendly! To demonstrate this I have run a GetCurrentState action from the debugger. Notice how the CurrentState replacement parameter changes to “Online”.

This does mean adding CurrentState into a condition on an action is simple. In my application I only change the status to Online if the status is currently Back Soon. I have shown my action below, so you can see how a condition might be used to create this effect.

Hopefully this information on how to control the agent’s presence status in Unified Service Desk whilst using Live Assist will be useful. Enjoy.

One thought on “Live Assist – Set Availability in USD

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s