Help Center/ Cognitive Engagement Center/ API Reference/ Web Client Access Interface Reference/ Submitting the Chatbot Satisfaction Evaluation Result (feedbacksatisfaction)
Updated on 2023-09-27 GMT+08:00

Submitting the Chatbot Satisfaction Evaluation Result (feedbacksatisfaction)

Scenario

This interface is invoked to submit the satisfaction evaluation result of the chatbot's reply.

Method

POST

URI

https://Domain name/apiaccess/ccmessaging/v1/robot/feedbacksatisfaction (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

x-app-key

String

Yes

App key, which is the user ID

2

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

3

ccmessaging-token

String

Yes

Value of ccmessaging-token generated by the applyToken interface

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

feedback

Integer

Yes

Satisfaction feedback. The options are 1 (satisfied) and 0 (dissatisfied).

1.2

feedbackContent

String (64)

No

When feedback is set to 0, the value cannot be empty and can contain a maximum of 64 characters.

1.3

from

String

Yes

Message sender ID

1.4

interIdx

String

Yes

Number of interaction times. The value is the same as that of interidx returned by the ODFS in the previous time.

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

resultCode

String

Yes

0: success

30000000008: The value of feedbackContent cannot be empty in the case of dissatisfaction during satisfaction survey.

10010000002: Interface flow control failed.

30010009999: The chat module is abnormal.

30000000019: Chatbot evaluation failed because the current session is not a chatbot session or no session exits.

10010000001: Interface authentication failed.

1.2

resultDesc

String

No

Failure cause

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

Request header:

{
	"ccmessaging-token": "eyJjcmVhdGV*************2hhbm5lbElkIjoiMjAyMTAyMTkzMTk2ODY5NzA4In0%3D",
	"x-app-key": "ea5c29a3*************a3dbeb4c32c",
	"Authorization": "Bearer 57042f*************968c4e0",
	"Content-Type": "application/json"
}

Request parameters:

{
	"feedback": 0,
	"feedbackContent": "dissatisfied",
	"from": "1111111",
	"interIdx": "2"
}

Response parameters:

{
	"resultCode": "0",
	"resultDesc": "Send message to robot successfully"
}