Virtual Agent REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â11-04-2020 02:32 AM
Team,
I want to build a custom web application that enable users to chat directly with a Live agent. So I'm planning to use Virtual Agent REST APIs to pass chat to a live agent.
users in my web application would always need to chat with a Live agent, meaning it should always by pass Virtual Agent and go directly to Live Agent. Looking at VA REST API Documentation, is this the proper functional flow to get this working?
1. POST /api/sn_va_as_service/bot/integration and set the action to START_CONVERSATION to start a chat session.
2. POST /api/sn_va_as_service/bot/integration and set the action to AGENT to send user messages to Live Agent.
3. POST /api/sn_va_as_service/bot/integration and set the action to END_CONVERSATION to end chat with live agent
Regards,
Tamer
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â11-04-2020 02:45 PM
Tamer,
In the above steps, once you get connected to live agent, do not send any action further since the system cannot resolve it. So, your first message is to "START_CONVERSATION", second message is to connect to "AGENT" and after that you should just send the utterances, no actions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â11-05-2020 06:58 AM
Thanks Shipra, but is there a way to completely by pass Virtual Agent and directly go to Live Agent? As my use case only requires Live Agent support, and I need to by pass Virtual Agent greeting message for example, and also once the Live Agent terminates chat from his end, I don't want to go back to Virtual agent, I need to terminate session.
My use case is basically, the end user is using a third-party bot (not serviceNow), but at a certain point of time, he needs to talk with a Live Agent in ServiceNow to escalate. so Virtual Agent is completely out of scope here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â11-06-2020 10:09 AM
Hi Tamer - In Paris release, you will get the VA greeting message. However, in Quebec, we are enhancing it so that the user can be directly connected to Live Agent when they type "agent" command. For ending the conversation and passing the control back to Primary Bot, we provide a "completed" flag that would be set to true when agent ends a session. You can read that value and bypass Virtual Agent. This is what the response from LA would look like :
{
"requestId":"3622be70-cb49-4796-a4fa-1652",
"clientSessionId":"",
"nowSessionId":"",
"message":{
"text":"okay",
"typed":true,
"clientMessageId":"ABC-123"
},
"userId":"joe.employee",
"body":[
{
"uiType":"OutputText",
"group":"DefaultText",
"required":false,
"nluTextEnabled":false,
"label":"Thank you for using our support chat.",
"maskType":"NONE",
"itemType":"outputtext"
}
],
"completed":true,
"score":1
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â06-08-2021 05:46 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â09-22-2022 12:08 PM
All of the above is no more doable since San Diego release as Service Now now forbids the creation of the required sys_cs_provider. Creating this object requires the ITSM Pro license which is very expensive. So... Live Agent integration, was possible in the past (with Agent Connect and with the new Agent Workspace until Rome version) but is now very difficult with San Diego and Tokyo as ServiceNow is asking for the expensive license (ITSM Pro) to grant API access to their AWA Live agent (API access goes through the Virtual Agent API and this requires the sys_cs_provider objects which is being locked by Service Now to force customers to purchase extra ITSM Pro licenses !)
See all details and vote for a resolution in:
Here it is: https://community.servicenow.com/community?id=view_idea&sysparm_idea_id=62c7625adb0a559c904fa9fb139619a8&sysparm_idea_table=x_snc_com_ideation_idea&sysparm_module_id=enhancement_requests
(submitted idea to get a proper and easy-to-use API to be able to interface any application with the Live Agents feature of Service Now)