Agent Mapping API

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 7분
  • 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.

    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

    표 1. Path parameters
    Name Description
    agentId Sys_id of the internal agent.

    Data type: String

    Table: User [sys_user]

    inboundId Inbound 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

    표 2. Query parameters
    Name Description
    None
    표 3. Request body parameters (JSON)
    Name Description
    active Flag 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_id Required. 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.

    표 4. Request headers
    Header Description
    Accept Data format of the response body. Only supports application/json.
    Content-Type Data format of the request body. Only supports application/json.
    표 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.

    표 6. Status codes
    Status code Description
    200 OK.

    Existing agent mapping record updated.

    201 Created.

    New agent mapping record created.

    400 Bad request.

    The agent ID or inbound ID provided in the request is invalid.

    Response body parameters (JSON)

    Name Description
    result Result object containing information about the request.

    Data type: Object

    result.mappingIds Sys_ids of any created or updated records in the External Agent Mapping [external_agent_mapping] table.

    Data type: Array of strings

    result.message Message explaining the outcome of the request.

    Data type: String

    result.status Status 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" 
        ] 
      } 
    }