- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Overview This document outlines the step-by-step process for integrating ServiceNow with Genesys Live Agent using Bot Interconnect. The objective is to establish ServiceNow as the primary bot while allowing Genesys to act as a secondary bot for live agent interactions.
Prerequisites
- ServiceNow Instance with Virtual Agent and Bot Interconnect Plugin enabled.
- Genesys Cloud instance with webhook support for live agent chat.
- Admin access to configure APIs and workflows in both platforms.
Implementation Steps
- Update System Property
Modify the system property to allow external agent chat:
- Property Name:
com.glide.cs.external.agent.chat.enabled
- Value:
true
-
Copy 'Bot Interconnect Integration Handler' Subflow
Create a copy of the default Bot Interconnect Integration Handler subflow to customize it for Genesys integration. -
Modify Outbound Transformer
In the first action (Outbound Transformer), update the script to transform the payload according to Genesys requirements.
Sample Bot Interconnect Request Structure:
var payload = {
"clientSessionId": "<client_session_id>",
"requestId": "<request_id>",
"message": {
"text": "sample text",
"clientMessageId": "<client_message_id>"
},
"contextVariables": {
"requester_session_language": "<requester_language>"
},
"userId": "admin",
"emailId": "admin@example.com",
"timestamp": 1627309792898,
"timezone": "Asia/Calcutta",
"clientVariables": {}
};
-
Configure Genesys Endpoints
In the second action (Send Message), configure it with Genesys API endpoints to forward messages appropriately. -
Create a Live Agent Connection Record
Add a record in the Live Agent Connection Table (sys_cs_live_agent_connection
) in ServiceNow with:
- Appropriate conditions for triggering live agent chat.
- Selection of the customized subflow created earlier.
- Create a Web Service for Genesys
Create a copy of theVAAPIResponse
scripted Web Service to act as a ServiceNow webhook endpoint for Genesys.
Payload Structures
- Agent Accepting Chat
{
"requestId": "request1",
"clientSessionId": "165a089c77d53510b6a0cf6dbd5a99cc",
"userId": "abel.tuter",
"body": [
{
"uiType": "ActionMsg",
"actionType": "SwitchToLiveAgent"
}
]
}
- Output Text
{
"requestId": "request1",
"clientSessionId": "165a089c77d53510b6a0cf6dbd5a99cc",
"userId": "abel.tuter",
"body": [
{
"uiType": "OutputText",
"group": "DefaultText",
"value": "Hello from agent",
"maskType": "NONE"
}
]
}
- Output Link
{
"requestId": "request1",
"clientSessionId": "165a089c77d53510b6a0cf6dbd5a99cc",
"userId": "abel.tuter",
"body": [
{
"uiType": "OutputLink",
"group": "DefaultOutputLink",
"label": "ServiceNow",
"header": "The world works with ServiceNow",
"type": "link",
"value": {
"action": "https://<instance-name>.service-now.com/va_link.do?token=<token>&target_url=https%3A%2F%2Fwww.servicenow.com",
"target": "_blank"
}
}
]
}
- Output Image
{
"requestId": "request1",
"clientSessionId": "165a089c77d53510b6a0cf6dbd5a99cc",
"userId": "abel.tuter",
"body": [
{
"uiType": "OutputImage",
"group": "DefaultOutputImage",
"value": "https://adaptivecards.io/content/cats/1.png",
"altText": "Image alt text"
}
]
}
- End Conversation
{
"requestId": "request1",
"clientSessionId": "165a089c77d53510b6a0cf6dbd5a99cc",
"userId": "abel.tuter",
"completed": true,
"body": [
{
"uiType": "OutputImage",
"group": "DefaultOutputImage",
"value": "https://adaptivecards.io/content/cats/1.png",
"altText": "Image alt text"
}
]
}
For non-image files like Excel, PDF, etc., use the Output Link payload structure.
Conclusion By following this approach, we can successfully integrate ServiceNow as the primary bot with Genesys Live Agent as a secondary bot using Bot Interconnect. This setup allows a seamless transition from chatbot interactions to live agent support, ensuring a smooth user experience.
For further customization, consider refining API responses and adding additional context variables to enhance the chat workflow.
- 3,467 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.