getonlinehelplist
POST v1/reporting/getonlinehelplist#
With this API, you can access the list of online helps made through Diyalog between two dates. The agent and/or customer number can also be given to the API.
Each request returns a maximum of 20 items, sorted by date from newest to oldest.
There may be more than 20 items between the two dates given to the API. In this case, the 20 most recent online helps are returned. To get the other items in the date range, take the date of the oldest item (the last item) in the API response and call the API again with this date to retrieve them.
API requests
- Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
- API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/reporting/getonlinehelplist
- HTTP Request Type POST
- HTTP Content-Type application/json
Request Body#
| Schema |
|---|
| json object |
| startDate (long) Unix epoch timestamps (miliseconds). The start date of the online help list query. |
| endDate (long) Unix epoch timestamps (miliseconds). The end date of the online help list query. |
| customerId (string) Optional. Customer number. Provide it to see a customer's online helps between the given dates. |
| agentId (string) Optional. Agent employee ID. Provide it to see an agent's online helps between the given dates. |
Example Json Request Body :#
Responses#
| HTTP 200 Response |
|---|
| json object array The API returns a json array as a response. The array contains json objects with the following fields. Each object contains the details of an online help. The API returns a maximum of 20 items (json objects), sorted by date from newest to oldest. If no online help is found, an empty array is returned. |
| json object |
| onlineHelpId (long) The unique id created for the online help in the Diyalog system. |
| customerNo (string) The customer number of the customer who requested online help. |
| customerName (string) The first and last name of the customer who requested online help. |
| agentId (string) Optional. This field is not returned if the online help has not started. The employee ID of the agent who provided online help. |
| agentName (string) Optional. This field is not returned if the online help has not started. The first and last name of the agent who provided online help. |
| helpState (string) Returns the latest state of the online help. State values are as follows : "onlinehelp_requested" "onlinehelp_cancelled_by_customer" "onlinehelp_started" "onlinehelp_ended_by_customer" "onlinehelp_ended_by_agent" "onlinehelp_ended_customer_kill_app" |
| helpRequestedAt (long) Unix epoch timestamps (miliseconds). The date and time at which the customer requested online help from the mobile channel. |
| helpStartedAt (long) Optional. This field is not returned if the online help has not started. Unix epoch timestamps (miliseconds). The date and time at which the agent and customer started the online help. |
| helpEndedAt (long) Optional. This field is not returned if the online help has not started. Unix epoch timestamps (miliseconds). The date and time at which the agent and customer ended the online help. |
| waitTime (int) Optional. The time, in seconds, the customer waited until an agent connected. If the customer cancelled before an agent connected, that duration is also returned in this field. |
| helpTime (int) Optional. This field is not returned if the online help has not started. The duration of the online help between the customer and the agent, in seconds. |
| conversationDetailLink (string) Optional. This field is not returned if the online help has not started. A link for viewing the conversation between the agent and the customer during the online help. When this link is opened in a browser, it connects to the Diyalog platform and the messages are shown. |
Example Response Body :#
| HTTP 500 Response |
|---|
| string When the API encounters an error, it returns 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 status | Message | Description |
|---|---|---|
| 400 | Required headers not found | One or more of the x-dlg-date, x-dlg-requester-userid or x-dlg-authorization headers are missing. |
| 400 | Authorization failed due to data format not valid | The x-dlg-authorization value after DLGA is not in the AccessKeyId:Signature form. |
| 400 | Date format is invalid. EEE, dd MMM yyyy HH:mm:ss Z is requied | The x-dlg-date value cannot be parsed in this format. The message text is returned as shown, including its spelling. |
| 401 | Authorization failed | The x-dlg-authorization header does not contain DLGA , the AccessKeyId is unknown, or the signature is not correct. |
| 401 | You have no permission on this operation. Contact your admin. | The signature is correct, but your access key has no reporting permission. |
| 403 | Request time may not be correct. | The x-dlg-date value differs from the server time by more than 15 minutes. |