Third-party Routing API
With the Third-party routing API, you can use an external routing system for Pega Customer Service chat and messaging requests. When you select external routing, Pega Customer Service
application redirects the queued chat requests to the configured external service
URL as event notifications. The application also notifies the changes in the CSR
availability to accept new requests. Pega Customer Service exposes a REST
service over which the external routing system can communicate the final routing
decision. The third-party routing API uses the following REST connectors and services: Use the cyFetchExternalRoute to send the chat and messaging
request metadata to an external routing system. The following values are
supported: Use the cyPostRoutingEvents connector to send the updates on CSR
availability and CSR or customer actions to the external routing system for routing pending
and transfer requests. The
source can be chat or any supported unified messaging
channel. Use the PostingRoutingEvents service to perform post-routing
activities after a route is identified. The external routing system uses the following URL to access the
PostingRoutingEvents
service:Third-party API REST connectors
REST connector Description cyFetchExternalRoute Sends the chat request metadata to the external routing
system. cyPostRoutingEvents Sends the CSR actions or the conversation changes to the
external routing system after a CSR is offered the request.
Third-party API REST services
REST service Description PostRoutingEvents Performs post-routing actions when a CSR is identified. cyFetchExternalRoute connector
Request parameters
Name Required/Optional Description _conversation_id Required The chat or messaging request ID _queue_name Required The queue ID where the request is processed _source Required The name of a chat channel or any supported unified messaging
channel _preferred_agent Optional The name of the preferred CSR who handled the chat previously if
in an asynchronous channel Example request
{ "_conversation_id": "3bc1c3b45ea911ea88f277fee9bcd8c0",
"_queue_name": "Billing",
"_source": "Facebook",
"_preferred_agent": "" }
Response parameters
Parameter Required/Optional Description _status Required The status of the routing activity _wait_time Optional The average wait time for the request _source Required The name of a chat channel or any supported unified messaging
channel _queue_position Optional The current position of the request Example response
{
"_status":"_identifying_route",
"_wait_time":"",
"_queue_position":""
}
Error codes
Error code Description 400 Bad request 500 Server not found Extension or customization points
Data transform Purpose Available page Parameters ChannelServices-Conversation-Queued.
cyParseConversationResquest Adds more details to the request, such as a customer name or a
customer policy number. Primary
(ChannelServices-Conversation-Queued) ChannelServices-Conversation-Queued.
cyParseConversationResponse_wait_time Adds more details to the response, such as queue capacity or an
active agents count. Primary
(ChannelServices-Conversation-Queued) cyPostRoutingEvents connector
Request parameters
Parameter Required/Optional Description _conversation_id Optional The chat or messaging request ID _agent_name Required The name of the CSR who is assigned the request _event_name Required The CSR action on the request _queue_name Optional The queue ID where the request is processed _source Optional The name of the channel from which the request originated _transferred_from_agent Optional The name of the CSR who initiated the transfer _ transferred_to_agent Optional The name of the CSR who received the transfer _ transferred_to_queue Optional The name of the queue that received the transfer request _ transferred_from_queue Optional The name of the queue from which the transfer originated Example request
{
"_conversation_id":"3bc1c3b45ea911ea88f277fee9bcd8c0",
"_agent_name":"Sara",
"_event_name":"Transfer-to-agent-accepted",
"_queue_name":"Billing",
"_source":"chat",
"_transferred_from_agent":"[email protected]",
"_transferred_to_agent":"Sara",
"_transferred_to_queue":"Technical",
"_transferred_from_queue":"Billing"
}
Response parameters
Parameter Required/Optional Description _status Required The status of the transfer request (Success or Fail) Example response
{
"_status":"Success"
}
Error codes
Error code Description 400 Bad request 500 Server not found Extension or customization points
Data transform Purpose Available page Parameters ChannelServices-Int-Routing.
cyParseEventsRequestExtn Adds more details to the request, such as the current time stamp
or the reason for transfer. Primary
(ChannelServices-Conversation-Queued) PostingRoutingEvents service
{{base_url}}/prweb/api/ConversationRouting/V1/PostRoutingEvents
{{base_url}}
takes the value that is specific to the URL of the customer
instance.Request parameters
Parameter Required/Optional Description _conversation_id Required The chat or messaging request ID _agent_id Required The name of the CSR that is identified by the third-party routing
system Example request
{
"_conversation_id":"3bc1c3b45ea911ea88f277fee9bcd8c0",
"_agent_id":"[email protected]"
}
Response parameters
Parameter Required/Optional Description _status Required The status of the transfer request (Success or Fail) Example response
{
"_status":"Success"
}
Error codes
Error code Description 400 Bad request 500 Server not found Extension or customization points
Data transform Purpose Available page Parameters ChannelServices-Conversation-Queued.
cyParseConversationRouteResponse Adds more details, such as CSR capacity or CSR’s active
interactions. Primary
(ChannelServices-Conversation-Queued)
Previous topic APIs to support proactive chat Next topic Computer Telephony Integration(CTI)