Updated on 2025-03-31 GMT+08:00

Querying the Satisfaction Survey Configuration (getSatisfactionSurveyMode)

Scenario

This API is invoked to check whether the satisfaction survey function is enabled for the current tenant space and the satisfaction survey configuration after the chat between the customer and agent ends.

Method

POST

URI

https://Domain name/apiaccess/ccmessaging/getsatisfactionsurveymode (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

Response Description

  • Status code: 200
Table 2 Response body parameters

No.

Parameter

Type

Description

1

resultCode

String

Response code.

  • 0: success
  • 13: failure to query the satisfaction survey configuration

2

resultDesc

String

Response description

3

satisfactionSurvey

Object

Satisfaction survey

3.1

surveyType

String

Survey type

WEB: web page

NO: no survey

3.2

satisfactionLevel

Array

Satisfaction level array

3.2.1

satisfactionLevelKey

String

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 > Satisfaction Level or use the default value. The satisfaction level is the same as the pressed key.

3.2.2

satisfactionLevelDesc

String

Satisfaction description. The default values are as follows:

  • Very dissatisfied
  • Dissatisfied
  • General
  • Satisfied
  • Very satisfied

3.3

satisfactionQuestion

Array

False

Questionnaire content:

  • FCR: Whether the issue has been resolved
  • NPS: recommendation score
  • CSAT: satisfaction score
  • 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: Create an outbound call task.
  • Request header
    {
    	"X-APP-Key": "b*************c7b",
    	"Authorization": "Bearer 1fea*************1d6a15",
    	"Content-Type": "application/json"
    }
  • Request parameters

    None

  • Response parameters
    {
         "satisfactionSurvey": {
            "surveyType": "WEB",
            "satisfactionLevel": [
                {
                    "satisfactionLevelDesc": "Very dissatisfied",
                    "satisfactionLevelKey": "1"
                },
                {
                    "satisfactionLevelDesc": "Dissatisfied",
                    "satisfactionLevelKey": "2"
                },
                {
                    "satisfactionLevelDesc": "General",
                    "satisfactionLevelKey": "3"
                },
                {
                    "satisfactionLevelDesc": "Satisfied",
                    "satisfactionLevelKey": "4"
                },
                {
                    "satisfactionLevelDesc": "Very satisfied",
                    "satisfactionLevelKey": "5"
                }
            ],
            "satisfactionQuestion": [
                "FCR",
                "CSAT",
                "NPS"
            ]
        },
        "resultCode": "0",
        "resultDesc": "Get satisfaction survey mode success!"
    }