Help Center/ Cognitive Engagement Center/ API Reference/ Web Client Access Interface Reference/ Submitting the Customer Satisfaction Evaluation Result (saveSatisfaction)
Updated on 2023-12-19 GMT+08:00

Submitting the Customer Satisfaction Evaluation Result (saveSatisfaction)

Scenario

This interface is invoked to save the satisfaction evaluation result submitted by a user.

Method

POST

URI

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

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

ccmessaging-token

String

Yes

  • Token returned by the applyToken interface
  • Value of ccmessaging-token returned by the Response Header interface during a session

2

x-app-key

String

Yes

App key, which is the user ID and is configured on the API Fabric

3

Authorization

String

Yes

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

Table 2 Request body parameter

No.

Parameter

Type

Mandatory or Not

Description

1

satisfication

satisficationInfo

Yes

Satisfaction evaluation information

Table 3 satisficationInfo parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

channel

String

Yes

Channel type. Currently, the value is fixed to WEB.

1.2

userId

String

Yes

User ID. The value is a string of 1 to 32 characters.

1.3

evaluation

String

Yes

Satisfaction level. The value ranges from 1 to 5. The default satisfaction levels are as follows:

  • 1: very dissatisfied
  • 2: dissatisfied
  • 3: general
  • 4: satisfied
  • 5: very satisfied

You can invoke the interface for querying the satisfaction survey configuration to query the satisfaction level set in Configuration Center > Workbench Configuration > Satisfaction Survey > Satisfaction Level or use the default value.

The satisfaction level is the same as the pressed key.

1.4

comment

String

Yes

Satisfaction comment. The value can contain a maximum of 512 characters.

1.5

channelConfigId

String

Yes

Channel ID. The value is the same as that of Configuration ID of the web channel configured in the AICC.

Response Description

  • Status code: 200
    Table 4 RspMsg parameters

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1.1

    resultCode

    String

    Yes

    Return code

    • 0: success
    • 13: failure to obtain the call information or submit the satisfaction evaluation result

    1.2

    resultDesc

    String

    No

    Return description

    • If the return code is 0, the description may be Save satisfaction success!

      The description may also be Exception appeared!

    • If the return code is 13, the description is The callIdString obtained failed! or Save satisfaction failed.
  • 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

  • Scenario: example message

    Request parameters:

    {
    	"channel": "WEB",
    	"userId": "XXXXXXXX",
    	"evaluation": "5",
    	"comment": "Satisfied",
    	"channelConfigId": "XXXXXXXXX"
    }

    Response parameters:

    {
    	"resultCode": "0"
    }