The Customer Central API provides endpoints to access customer information and configuration details.

Use this API to obtain information records (cards) that were previously generated through the Customer Central interface.

You must have the admin or sn_esm_agent role to access this API. In addition, before this API is available in your instance you must activate the com.sn_csm_customer_central plugin.

For additional information, see Customer Central.

Customer Central - GET /cust_central/custinfo/{context}/{context_instance}/{target}

Returns customer information and configuration details for a specific customer context.

Customer context is determined by the customer content table that you specify, either the Consumer [csm_consumer] or Contact [customer_contact] table, and its associated target table. This information is located in the Customer Information Context [sn_customercentral_cust_info_config] table.

This endpoint returns all active records (cards) within the following Customer Central configuration tables for the specified customer context:
  • List Configuration [sn_customercentral_list_config]
  • Record Configuration [sn_customercentral_record_config]
  • Report Configuration [sn_customercentral_report_config]
  • Report Group Configuration [sn_customercentral_report_group_config]

You must define any additional configuration records that you need through the Customer Central interface. For details, see Configure customer central.

URL format

Versioned URL: /api/sn_customercentral/{api_version}/cust_central/custinfo/{context}/{context_instance}/{target}

Default URL: /api/sn_customercentral/cust_central/custinfo/{context}/{context_instance}/{target}

Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form.

Supported request parameters

Table 2. Query parameters
Name Description
before Return all configuration records created before the specified date and time.

Date type: String

Format: YYYY-MM-DD or the format defined in the glide.sys.date_format system property

Default: Return all configuration records created before current session time.

end Last record to return. Use this value to paginate record retrieval or use with the start parameter to select a specific set of records to return.

Data type: Number

Default: Last record in file

start Starting record index for which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.

Don't pass a negative number.

Data type: Number

Default: 0

Table 3. Request body parameters (XML or JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 4. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/xml.

Default: application/json

Table 5. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON or XML)

Example: cURL request

curl "https://instance.servicenow/api/sn_customercentral/cust_central/custinfo/csm_consumer/a0488cfbdb1b1200b6075200cf9619db/interaction" \
--request GET \
--header "Accept:application/json" \
--user "username":"password"

{
  "result": {
    "layout": "6,6",
    "cards_info": [
      {
        "title": "Consumer",
        "type": "sn_customercentral_record_config",
        "subheader_fields": {
          "title": "Sam Collins",
          "subheader_tags": [],
          "avatar": "",
          "sys_id": "64488cfbdb1b1200b6075200cf9619db"
        },
        "fields": [
          {
            "label": "Mobile phone",
            "value": ""
          },
          {
            "label": "Business phone",
            "value": ""
          },
          {
            "label": "Email",
            "value": "sam.collins@mailinator.com"
          },
          {
            "label": "Street",
            "value": "144 2nd St"
          },
          {
            "label": "City",
            "value": "San Francisco"
          },
          {
            "label": "State / Province",
            "value": "CA"
          }
        ]
      },
      {
        "title": "High priority cases",
        "type": "sn_customercentral_report_group_config",
        "reportGroupConfigurations": [
          {
            "title": "Escalated",
            "type": "sn_customercentral_report_config",
            "data_configurations": {
              "type": "single_score",
              "source_type": "table",
              "source_id": "sn_customerservice_case",
              "group_by": "",
              "trend_interval": "year",
              "trend_field": "",
              "stack_by_field": "",
              "aggregate_function": "COUNT",
              "aggregate_field": "",
              "filter_query": "active=true^active_escalationISNOTEMPTY^EQ^consumer=a0488cfbdb1b1200b6075200cf9619db^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
              "decimal_precision": 2,
              "number_of_groups": 0,
              "show_other": true,
              "sys_id": "c169a0f50f3b0010e6d4fd820b767e2e"
            },
            "style_configurations": {
              "scoreColor": "#000000",
              "show_zero": true
            }
          },
          {
            "title": "P1",
            "type": "sn_customercentral_report_config",
            "data_configurations": {
              "type": "single_score",
              "source_type": "table",
              "source_id": "sn_customerservice_case",
              "group_by": "",
              "trend_interval": "year",
              "trend_field": "",
              "stack_by_field": "",
              "aggregate_function": "COUNT",
              "aggregate_field": "",
              "filter_query": "active=true^priority=1^EQ^consumer=a0488cfbdb1b1200b6075200cf9619db^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
              "decimal_precision": 2,
              "number_of_groups": 0,
              "show_other": true,
              "sys_id": "cce86cb50f3b0010e6d4fd820b767eba"
            },
            "style_configurations": {
              "scoreColor": "#000000",
              "show_zero": true
            }
          },
          {
            "title": "SLA breached",
            "type": "sn_customercentral_report_config",
            "data_configurations": {
              "type": "single_score",
              "source_type": "table",
              "source_id": "task_sla",
              "group_by": "",
              "trend_interval": "year",
              "trend_field": "",
              "stack_by_field": "",
              "aggregate_function": "COUNT",
              "aggregate_field": "",
              "filter_query": "task.active=true^task.sys_class_name=sn_customerservice_case^stage!=cancelled^task.closed_atISEMPTY^sla.type=SLA^has_breached=true^EQ^taskIN59b65dc4db952200d75270f5bf96193eccc8cf82db912200d75270f5bf9619de^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
              "decimal_precision": 2,
              "number_of_groups": 0,
              "show_other": true,
              "sys_id": "e739a0f50f3b0010e6d4fd820b767e22"
            },
            "style_configurations": {
              "scoreColor": "#000000",
              "show_zero": true
            }
          }
        ]
      },
      {
        "title": "Case overview",
        "type": "sn_customercentral_report_config",
        "data_configurations": {
          "type": "donut",
          "source_type": "table",
          "source_id": "sn_customerservice_case",
          "group_by": "state",
          "trend_interval": "year",
          "trend_field": "",
          "stack_by_field": "",
          "aggregate_function": "COUNT",
          "aggregate_field": "",
          "filter_query": "^consumer=a0488cfbdb1b1200b6075200cf9619db^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
          "decimal_precision": 2,
          "number_of_groups": 0,
          "show_other": true,
          "sys_id": "d169216c0f770010e6d4fd820b767ea8"
        },
        "style_configurations": {
          "width": "auto",
          "height": "auto",
          "colorPalette": [
            "#278ecf",
            "#4bd762",
            "#ffca1f",
            "#ff9416",
            "#d42ae8"
          ],
          "hideRegister": false,
          "registerConfig": {
            "hideBorder": true,
            "showPercentages": false
          },
          "registerPosition": "right",
          "showDataLabels": false,
          "dataLabelConfig": {
            "showTotal": false
          },
          "showTooltip": true
        }
      },
      {
        "title": "Recent cases",
        "type": "sn_customercentral_list_config",
        "listLimit": "3",
        "viewName": "customer_central",
        "encodedQuery": "active=true^consumer=a0488cfbdb1b1200b6075200cf9619db^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
        "sourceTableName": "sn_customerservice_case"
      },
      {
        "title": "Recent chat interactions",
        "type": "sn_customercentral_list_config",
        "listLimit": "3",
        "viewName": "customer_central",
        "encodedQuery": "active=false^type=chat^consumer=a0488cfbdb1b1200b6075200cf9619db^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
        "sourceTableName": "interaction"
      },
      {
        "title": "Recent phone calls",
        "type": "sn_customercentral_list_config",
        "listLimit": "3",
        "viewName": "customer_central",
        "encodedQuery": "active=false^type=phone^consumer=a0488cfbdb1b1200b6075200cf9619db^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
        "sourceTableName": "interaction"
      },
      {
        "title": "Recent viewed articles",
        "type": "sn_customercentral_list_config",
        "listLimit": "3",
        "viewName": "customer_central",
        "encodedQuery": "user=64488cfbdb1b1200b6075200cf9619db^viewed=true^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
        "sourceTableName": "kb_use"
      },
      {
        "title": "Contracts",
        "type": "sn_customercentral_list_config",
        "listLimit": "3",
        "viewName": "customer_central",
        "encodedQuery": "active=true^state=Active^consumer=a0488cfbdb1b1200b6075200cf9619db^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
        "sourceTableName": "ast_contract"
      },
      {
        "title": "Entitlements",
        "type": "sn_customercentral_list_config",
        "listLimit": "3",
        "viewName": "customer_central",
        "encodedQuery": "active=true^end_date=NULL^ORend_date>=2020-05-07 07:00:00^consumer=a0488cfbdb1b1200b6075200cf9619db^ORDERBYDESCsys_created_on^sys_created_on>=2020-04-07 13:40:48",
        "sourceTableName": "service_entitlement"
      }
    ],
    "has_more_records": false,
    "status": "200"
  }
}