Skip to main content

iscustomerinonlinehelp

POST v1/application/iscustomerinonlinehelp#

With this API, you can get information on whether a customer is currently in an active live chat session.

API requests

  • Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
  • API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/application/iscustomerinonlinehelp
  • HTTP Request Type POST
  • HTTP Content-Type application/json

Request Body#

Schema
json object
customerId (String)
Customer number of the peer that gets online help state

Example Json Request Body :#

{
"customerId" : "70022"
}

Responses#

HTTP 200 Response
json object
This API returns a response in JSON format. The fields and details of the returned response are as follows:
     isInHelp (boolean)
      This field indicates whether the customer has an active live chat session.
      true indicates that the customer is in an active online help session
      false indicates that customer is not in an active online help session.
     helpType (string)
     Specifies whether the customer is engaged in an outbound or inbound live chat session.
      "inbound" indicates that the customer is in an inbound online help session
      "outbound" indicates that the customer is in an outbound online help session.
     staffId (string)
     This field contains the user id of the agent providing service to the customer.
     errorCode (int)
     Optional.
      Error code of the result. It s optional. If isInHelp return true, this field will not return.
      Return Codes :
          400 : No customer found in the system.

Example Response Body :#

{
"isInHelp": true,
"helpType": "inbound",
"staffId": "45001"
}
HTTP 500 Response
string
When the API receives an exception, it will return a response with the HTTP 500 status code. The API's error message is returned as text.

If the request fails HMAC validation, the following errors are returned as plain text. See Authentication.

HTTP statusMessageDescription
400Required headers not foundOne or more of the x-dlg-date, x-dlg-requester-userid or x-dlg-authorization headers are missing.
400Authorization failed due to data format not validThe x-dlg-authorization value after DLGA is not in the AccessKeyId:Signature form.
400Date format is invalid. EEE, dd MMM yyyy HH:mm:ss Z is requiedThe x-dlg-date value cannot be parsed in this format. The message text is returned as shown, including its spelling.
401Authorization failedThe x-dlg-authorization header does not contain DLGA , the AccessKeyId is unknown, or the signature is not correct.
401You have no permission on this operation. Contact your admin.The signature is correct, but your access key has no application permission.
403Request time may not be correct.The x-dlg-date value differs from the server time by more than 15 minutes.