agent.presencechanged.v0


Beta/Early Access Program

This API is in the Beta/Early Access Program and is still under development. If you are interested in using this API, please contact your Customer Success Manager or Account Manager. Participation in this pilot program is at the discretion of Product Management and not guaranteed.

Use of this API outside of the program is prohibited.

Description

This type of event indicates that an agent's presence has changed. An agent can change their presence manually, or it may have been changed for them.

When an agent.presencechanged event occurs, it indicates the end of the agent's previous presence. A corresponding notification will be sent at the same time. The duration of their previous presence can be determined by calculating the difference between the timestamp of this event and the timestamp of the previous agent.presencechanged event.

An agent.presencechanged notification occurs only when the agent's presence is changed, not when they indicate that they intend to change their presence.

Example

Here is an example of an agent.presencechanged.v0 notification:

{
   "specversion":"1.0",
   "type":"agent.presencechanged.v0",
   "id":"2VejGqWZPqHXHVNcfUPUO8IASAp",
   "source":"/agent",
   "subject":"1",
   "time":"2023-09-20T09:49:06.6134321Z",
   "datacontenttype":"application/json",
   "data":{
      "timestamp":"2023-09-20T09:49:05.9464952Z",
      "presence":{
         "presenceId": "3bf05984-1957-4e56-9c2c-ce04fa9b3ffc",
         "category":{
            "type":"ready",
            "description": "Ready",
            "subcategory": "readyOutbound"
         },
         "description":"Ready (Outbound)"
      },
      "user":{
         "agentId":"1"
         "userId": "e56a3bb6-1881-46cc-9e26-0191c7b1187f"
      }
   }
}

Properties

  • specversion — The version of the specification being used.
  • type — The type of event, which is agent.presencechanged.v0. This comprises three parts: the entity performing the event, a description of the event, and the version of the event. 
  • id — When combined with the source, forms a unique identifier for the notification. The format is a ksuid.
  • source — The type of event source.
  • subject — The subject of the event, which in this case is the agent. The value is the agent's display ID.
  • time — An ISO 8601 UTC datetime representing the moment the notification was sent.
  • datacontenttype — The content type used by the data property.
  • data — The event payload.
    • timestamp — An ISO 8601 UTC datetime representing the moment the agent’s presence changed

      This is not the timestamp of when a notification related to this event was sent. 
    • presence — Provides further information about the presence that the agent changed to.
      • presenceId — The unique identifier for the presence.
      • category — Further information about the category of the presence that the agent changed to.
        • type — The category of the presence that the agent changed to. Possible values are loggedOut, away, extendedAway, and ready.
        • description — A short description of the category that the agent changed to. 
        • subcategory — The subcategory of the presence that the agent changed to. Possible values are ready, away, extendedAway, readyOutbound, readyOffline and loggedOut.
      • description — A short description of the presence that the agent changed to.
    • user — Provides further information about the agent user who changed their presence.
      • agentId — The ID for the agent.
      • userId — The ID for the user.