Updated on 2025-11-13 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.

Interface 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

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 parameter

No.

Parameter

Type

Mandatory

Description

1

language

String

No

Language of the satisfaction survey. The options are as follows:

  • zh_CN: Chinese
  • en_US: English
  • pt_BR: Portuguese
  • ar_SA: Arabic
  • fr_FR: French
  • es_ES: Spanish
  • Leave this parameter blank.
NOTE:

This parameter is specified by the tenant parameter Languages supported by the satisfaction survey, which takes effect only when the configured satisfaction survey language is within the language range specified by the tenant parameter. In the following scenarios, the tenant provisioning language is used by default:

  • This parameter is empty.
  • The tenant parameter Languages supported by the satisfaction survey is empty.
  • The configured satisfaction survey language is not within the language range specified by the tenant parameter.

Response Description

  • Status code: 200
Table 3 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

No

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
    {
        "language": "zh_CN"
    }
  • 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!"
    }