Updated on 2023-09-27 GMT+08:00

Querying Chatbot Report Information

Interface Method

The request method must be set to POST.

URL

https://IP:PORT/oifde/rest/api/queryChatbotReport

Request

Table 1 Parameters in the request body

Parameter

Type

Position

Mandatory

Description

type

String

body

Yes

Query type.

  • hour: report data on a specified date, which is queried by hour.
  • day: report data of the last 30 days, which is queried by day.

tenantId

String

body

Yes

Tenant ID.

accessCode

String

body

Yes

Access ID (chatbot access code).

timestamp

long

body

Yes

Millisecond timestamp of the query date.

authToken

String

body

Yes

Authentication token.

For details, see C3 OIAP Interface Authentication.

Response

Parameter

Type

Position

Mandatory

Description

-

ChatbotReportRes[]

body

Yes

Chatbot report information.

Table 2 ChatbotReportRes

Name

Mandatory

Type

Description

recordTime

Yes

long

Millisecond timestamp of the record date.

tenantId

Yes

String

Tenant ID.

accessCode

Yes

String

Access ID (chatbot access code).

type

Yes

String

Query type.

  • hour: query by hour.
  • day: query by day.

consultCount

Yes

Integer

Total number of replies from the chatbot.

responseSuccessCount

Yes

Integer

Number of successful replies from the chatbot.

unknowCount

Yes

Integer

Number of unknown replies from the chatbot.

responseRate

Yes

String

Reply success rate.

feedbackCount

Yes

Integer

Number of evaluations.

Number of customers who participate in the satisfaction survey.

positiveFeedbackCount

Yes

Integer

Satisfied feedback.

Amount of satisfactory feedback from customers in the satisfaction survey.

positiveFeedbackRate

Yes

String

Satisfaction rate.

  • –1.0000: The value of feedbackCount is 0.
  • 0–1.0000: Satisfaction rate = positiveFeedbackCount/feedbackCount

Example

  • Request
    {
        "tenantId":"202104237142",
        "accessCode":"950964151029600256",
        "timestamp":1630512000000,
        "type":"hour",
        "authToken":"E***********************"
    }
  • Response
    [
        {
            "tenantId": "202104237142",
            "accessCode": "950964151029600256",
            "recordTime": 1630580400000,
            "type": "hour",
            "consultCount": 1,
            "responseSuccessCount": 0,
            "unknowCount": 1,
            "responseRate": "0.0000",
            "feedbackCount": 0,
            "positiveFeedbackCount": 0,
            "positiveFeedbackRate": "-1.0000"
        }
    ]