- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 02:52 AM
I want to configure 'Start a conversation' button in CHAT WINDOW, if we click on that button it should connect to LIVE AGENT, I also want to remove the Virtual Agent message while clicking on the button
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 07:59 AM
I can close this thread. I think I'm replying your message in the other thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 03:34 AM
Hi @Kri ,
Hope you are doing great.
To achieve this, we need to make some configurations in the ServiceNow instance.
- modify the Chat Queue record to ensure that it is associated with a live agent group
- we need to customize the chat widget to remove the Virtual Agent message and update the behavior of the 'Start a conversation' button. You can achieve this by modifying the widget codeJavaScript code to remove the Virtual Agent message:
// Remove Virtual Agent message
function removeVirtualAgentMessage() {
var chatContainer = document.getElementsByClassName('chat-container')[0];
var virtualAgentMsg = chatContainer.getElementsByClassName('chat-agent-msg')[0];
if (virtualAgentMsg) {
chatContainer.removeChild(virtualAgentMsg);
}
}
addLoadEvent(removeVirtualAgentMessage);
- To update the behavior of the 'Start a conversation' button, you can use the ServiceNow Client Script. Here's an example of the JavaScript code:
// Update 'Start a conversation' button behavior
function updateStartConversationButton() {
var startButton = document.getElementById('chat-start-button');
if (startButton) {
startButton.onclick = function() {
// Connect to live agent
// Add your code here to connect with the live agent
};
}
}
// Call the function to update the 'Start a conversation' button when the widget is loaded
addLoadEvent(updateStartConversationButton);
Regards,
Riya Verma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 07:58 AM
Hi there,
I don't think that is an option with limited development work. So maybe don't go this road.
Question: what is the why behind this?
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 07:59 AM
I can close this thread. I think I'm replying your message in the other thread