Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Agent Mapping API

The Agent Mapping API provides an endpoint to map external agent IDs from Contact Center as a Service (CCaaS) systems to internal agent IDs in the ServiceNow AI Platform.

This API requires the External Agent Management Util Pack (sn_external_agent) plugin. To call this API, you must have the interaction_agent role.

For more information about integrating with CCaaS systems, see Integrating with contact centers.

Parent Topic:REST API reference

Agent Mapping - PUT /sn_ct_ctr_it_core/agent_mapping/agent/{agentId}/inboundId/{inboundId}

Maps an external agent ID from a Contact Center as a Service (CCaaS) system to an internal agent ID in the ServiceNow AI Platform.

Call this endpoint when an agent logs in or out of the CCaaS system to update their active status. This endpoint creates or updates records in the External Agent Mapping [external_agent_mapping] table with the following data:

  • External CCaaS agent ID
  • Provider channel identity associated with the inbound ID
  • Agent's active status in the CCaaS system
  • Reference to the User [sys_user] record for the agent

URL format

Default URL: /api/sn_ct_ctr_it_core/agent_mapping/agent/{agentId}/inboundId/{inboundId}

Supported request parameters

NameDescription
agentIdSys\_id of the internal agent.Data type: String Table: User \[sys\_user\]
inboundIdInbound ID from the provider channel identity record for the CCaaS system.Data type: String Table: Provider Channel Identity \[sys\_cs\_provider\_application\] Field: Inbound ID
NameDescription
None 
NameDescription
activeFlag that indicates whether the agent is currently logged in to the CCaaS system.Valid values: - true: The agent is logged in. - false: The agent is logged out. Default: true Data type: Boolean
external\_agent\_idRequired. External agent ID from the CCaaS system.Data type: String

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.

HeaderDescription
AcceptData format of the response body. Only supports application/json.
Content-TypeData format of the request body. Only supports application/json.
HeaderDescription
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.

Status codeDescription
200OK. Existing agent mapping record updated.
201Created.New agent mapping record created.
400Bad request.The agent ID or inbound ID provided in the request is invalid.

Response body parameters (JSON)

NameDescription
resultResult object containing information about the request.Data type: Object
result.mappingIdsSys\_ids of any created or updated records in the External Agent Mapping \[external\_agent\_mapping\] table.Data type: Array of strings
result.messageMessage explaining the outcome of the request.Data type: String
result.statusStatus of the request.Possible values: - Success - Failure Data type: String

cURL request

This example maps an internal agent with sys_id da419c1fc312310015519f2974d3ae15 to the corresponding ID 12345 from the external CCaaS system.

curl "https://instance.service-now.com/api/sn_ct_ctr_it_core/agent_mapping/agent/da419c1fc312310015519f2974d3ae15/inboundId/ServiceNowVoice" \ 
--request PUT \ 
--header "Accept:application/json" \ 
--header "Content-Type:application/json" \ 
--data "{\"external_agent_id\":\"12345\"}" \ 
--user 'username':'password'

Response body:

{
  "result": { 
    "message": "Agent Id mapping record inserted", 
    "status": "success", 
    "mappingIds": [ 
      "128b74fcc3931a50325a4ad9d00131c3" 
    ] 
  } 
}

cURL request

This example sets the active parameter to false to indicate that the agent is logged out of the CCaaS system.

curl "https://instance.service-now.com/api/sn_ct_ctr_it_core/agent_mapping/agent/da419c1fc312310015519f2974d3ae15/inboundId/ServiceNowVoice" \ 
--request PUT \ 
--header "Accept:application/json" \ 
--header "Content-Type:application/json" \ 
--data "{"external_agent_id":"12345", "active":"false"}" \ 
--user 'username':'password'

Response body:

{ 
  "result": { 
    "message": "Agent Id mapping record updated", 
    "status": "success", 
    "mappingIds": [ 
      "cea77cebebef9e10a341fc7acad0cdc2" 
    ] 
  } 
}