how to make a button url dynamic based on instance url in virtual agnet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 10:08 PM
In Bot response a button i need and on click of it it will open a catalog item and it is based on instance url that link should be dynamic . How to achieve this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 10:57 PM
Hi @bala_1312
You can refer below post for your requirement :
It has the logic to get the instance URL dynamically via reading the system property and then rendering the catalog item dynamically.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 11:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 11:24 PM
how can i call a script variable from html code , if i store dynamic url in that script variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2024 12:37 AM
You can try below approach :
1. Create the URL using Script Action utility as shown below -
(function execute() {
var baseURL = gs.getProperty('glide.servlet.uri');
vaVars.url = baseURL + 'sp?id=sc_cat_item&sys_id=50ce6609ec778e00c3ed192aba465fed';
})()
Create a Script Variable with the name url to store the url created above -
2. Make use of Link Response to render the link via Virtual Agent -
Map your Script Variable created in Step 1 to Link.
Output :
You will get a hyperlink to the catalog item.
Please mark this response as correct and helpful if it assisted you with your question.