How to open the Virtual Agent Chatbot using HREF link from a catalog item description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:23 AM
Hi Team,
I would like to know, if there is any way to call the "Virtual Agent Bot" to open on click from a description part of the catalog item.
For eg, the below snippet has the item name as "Password Reset" and the description has "click here". I'm able to achieve it by opening the chat bot in a separate window using HREF but how do I open the bot on the same page on that icon right bottom corner without any navigation from the description of the catalog item.
Note: Its not about the html syntax's target=_blank or _self
Sujatha V.M.
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:37 AM
What you are asking is possible but not recommended as all. This will lead to customisation of your two widgets:
1. Catalog item widget.
2. VA widget.
Process (this will need two widgets to task):
1. Broadcast an event when from catalog item widget when "click here" is clicked using $rootScope.$broadcast
2. Listen the event in VA widget and open it using $rootScope.$on
SN does not recommend customisation of widgets as it may break in future releases. If its for learning purpose explore the above process.
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 02:39 AM
Thank you for the response and appreciate to explain on this.
Yes I have implemented the above for custom widgets but the problem here is only for a catalog item which doesn't require the modification of the widget itself as the description will differ for each catalog item.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 04:52 AM - edited 10-17-2023 06:59 AM
I understand that the description will differ, but it gets rendered in widget through code with somethinh like:
{{Item.description}} // not exactly.
So you will need to write the Onclick on description in client controller, which will broadcast the event.
I have inplemented this in custom widget, so I know this could ne possible from catalog item widget as well.
If it has to be opened from a particular set of catalog items , in that case additional queries will be required which will fetch those item from cat item table.
I hope this explains.
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 10:23 PM
@Sujatha V M did this work for you?
Raghav
MVP 2023