Presence check webhook

Presence check

The presence check is a feature for web chat that will check if there's a live agent available in order to initiate a handover.

If the Mobile Service Cloud is used, you will need to fill in the Mobile Service Cloud API key for the presence check actually to work, else the agent status will always be offline (because the presence check call will not work).

282

If the provider is set as a 'Third Party', you can add your own custom webhook. A POST call will be sent to that webhook with the following object in the body:

{
   url: "String",
   channel: "String",
   data: {
     context: "String"
}

Whereas URL is the referrer from the webchat, channel always contains ‘WebChat’ and data.context contains the value of the output addition mscWebstore.

The expected response from the webhook is a 200 with a body:

{
   “agentAvailable”: "Boolean"
}

If agentAvailable is true, then context agentStatus will be ‘online’ and ‘offline’ otherwise. If the call fails, then agentStatus will be ‘offline’.

The presence check can be disabled, then no presence check call will be made and context agentStatus will always be set to ‘online’.

286