The Dixa presence API now allows for third-party clients to change the presence of agents in Dixa.

For example, a third-party integration service could monitor other systems, such as Skype For Business, for presence events and propagate these events to Dixa.

If a Skype for Business user becomes busy, due to a meeting or phone call, the corresponding Dixa agent account can be marked as busy too.

Prerequisites:

  • A Dixa account
  • A Dixa API Token 

This alleviates conflicts between different presence sources, allowing a holistic presence overview of an entire organization.

API Usage:
The external presence API is comprised of two REST endpoints, each representing resources as JSON.

Both endpoints require authentication, with an API Token issued by a Dixa administrator.

Authentication is header based, using Basic Auth. See the curl examples for how to make authenticated requests.

In basic terms, the Authorization header is constructed as follows:
Authorization: Basic base64("bearer:<api-token>")

Get the current presence of a Dixa agent:
curl https://api.dixa.io/v1/presence/external/:email_of_agent -u "bearer:<my-api-token>"

Should no such agent exist, the HTTP status code 404 is returned.

Should the agent exist, HTTP status code 200 is returned, with the following response body:

{
"data": {
  "user": {

    "id": "example-dixa-user-id",
    "org_id":   "example-dixa-organization-id",
    "name": "Mike Agent",
    "email": "mike.agent@company.com",
    "phone_number": null, 
    "is_agent": true, 
    "is_admin": false,
    "roles": ["agent"],
    "avatar_url": null,
    "skills": null,
    "company_id": null,
    "default_outbound_number": null
  },
  "presence": {

    "last_seen": null,
"status": "online",
"connection_status": "online",
    "presence_status":{

      "presence_status_category": "working",
      "load_descriptions": [],
      "simultaneous_ringing": false },
"working_channels": []
}
},
"meta": {}
}


curl https://api.dixa.io/v1/presence/external/:email_of_agent -u "bearer:<my-api-token>" -H "Content-type: application/json"

Entity body:
{ "presence": "<presence>" }
Where <presence> is either "Working" or "Away".