How to Dynamically Trigger Now Assist Enhanced Chat Prompts from a Service Portal Widget
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello Now Community,
I have Now Assist enabled in my environment, and the Enhanced Chat experience is working as expected when accessed directly.
My use case is to launch the Now Assist Enhanced Chat from a Service Portal widget and automatically pass a dynamic prompt when a user clicks a card. The prompt text is retrieved from a custom table and should populate/start a new chat session.
Current Approach
Client Controller
c.triggerPortalSearch = function(searchTerm) {
$location.search({
id: "nowassistselfservice",
spa: 1,
query: searchTerm,
new_chat: 1
});
}
Widget HTML
<div class="prompt-list">
<div class="prompt-card" ng-repeat="item in data.catalogItems">
<div class="prompt-card-body"
ng-click="c.triggerPortalSearch(item.short_description)">
Current Behavior
When a card is clicked:
- The portal correctly navigates to the nowassistselfservice page.
- The Now Assist Enhanced Chat window opens successfully.
- However, the value passed through the query URL parameter is not submitted or loaded into the chat.
Question
Has anyone successfully triggered a Now Assist Enhanced Chat conversation from a Service Portal widget and passed a dynamic prompt programmatically?
If so:
- Is the query URL parameter supported by the Enhanced Chat page?
- Is there an alternative API, event, or supported mechanism to pre-populate or automatically submit prompts?
- Are there any documented limitations around launching chats from Service Portal widgets?
Any guidance or examples would be greatly appreciated.
Thank you!
0 REPLIES 0
