Skip to main content

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.
Note : To see the online helps between an agent and a customer between two dates, provide both the customerId and agentId fields.

Example Json Request Body :#

{
"customerId" : "2337368",
"agentId" : "45186",
"startDate" : 1612984180000,
"endDate" : 1615403380000
}

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 :#

[
{
"agentId": "45186",
"agentName": "Agent 45186",
"conversationDetailLink": "https://<DIYALOG-ADMIN-PANEL>/onlinehelpdetail.html/....",
"customerName": "Customer Name1",
"customerNo": "2337368",
"helpEndedAt": 3,
"helpRequestedAt": 1,
"helpStartedAt": 2,
"helpState": "Ended by customer",
"helpTime": 12,
"onlineHelpId": 12345,
"waitTime": 4
},
{
"agentId": "45187",
"agentName": "Agent 45187",
"conversationDetailLink":"https://<DIYALOG-ADMIN-PANEL>/onlinehelpdetail.html/....",
"customerName": "Customer Naem2",
"customerNo": "7403713",
"helpEndedAt": 3,
"helpRequestedAt": 1,
"helpStartedAt": 2,
"helpState": "Ended by agent",
"helpTime": 12,
"onlineHelpId": 12346,
"waitTime": 4
}
]
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 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 reporting permission.
403Request time may not be correct.The x-dlg-date value differs from the server time by more than 15 minutes.