How to get catalog item link ?

Pavan Kumar28
Tera Contributor

Hi all,

We have a requirement to obtain the link for the selected catalog item in the virtual agent chatbot. Can anyone please guide me on how to achieve this?. Attaching the snip which I configured.

PavanKumar28_0-1710154277985.png

 

Thanks and regards,
Pavan Kumar Gosani.

1 ACCEPTED SOLUTION

return vaVars.baseUri + vaVars.portalName'?id=sc_cat_item&sys_id=' + vaInputs.catalog_item_id1;

 

Did you add a Script variable that sets the two bolded items?

BaseUri we are using 

(function execute() {
return gs.getProperty('glide.servlet.uri');
})()
 
portalName we have the below , 
 
(function execute() {
if (vaContext.deviceType == 'ios' || vaContext.deviceType == 'android')
return 'mesp';

return gs.getProperty('sn_itsm_va.com.snc.itsm.virtualagent.portal_url');
})()
 

View solution in original post

6 REPLIES 6

Lynda1
Kilo Sage

We were not able to use that Request Catalog item Topic Block. For the link itself,  we use the Link output.

In the label, we have this:

(function execute() {
var item = new sn_sc.CatItem(vaInputs.catalog_item_id1);
if (item) {
var catItemJson = item.read({
'name' : ''
}, false);
return catItemJson.name || '';
}
return '';
})()
 
The link we have this
(function execute() {
return vaVars.baseUri + vaVars.portalName + '?id=sc_cat_item&sys_id=' + vaInputs.catalog_item_id1;
})()
 
catalog_item_id1 is coming from the catalog search topic block.

Hello @Lynda1,

I am now able to obtain the catalog item link. However, whenever I attempt to open the link, the catalog does not load, and I receive an error message stating, " The page you are looking for could not be found ". I have attached a screenshot for reference. Could you please assist me in resolving this issue?.

Flow:

PavanKumar28_1-1710221890176.png

 


Error Message:

PavanKumar28_0-1710221802546.png

Thanks and regards,

Pavan.

Hello @Lynda1,

I am now able to obtain the catalog item link. However, whenever I attempt to open the link, the catalog does not load, and I receiving an error message stating, "The page you are looking for could not be found." I have attached a screenshot for reference. Could you please assist me in resolving this issue?

Flow :

PavanKumar28_1-1710223392608.png


Error Message:

PavanKumar28_0-1710223333410.png

 

Thanks  and regards,
Pavan.

Hi Lynda1,

I am now able to obtain the catalog item link. However, whenever I attempt to open the link, the catalog does not load, and I receive an error message stating, "The page you are looking for could not be found." I have attached a screenshot for reference. Could you please assist me in resolving this issue?

Error Message:

PavanKumar28_2-1710228533915.png

 


Flow :

PavanKumar28_1-1710228489327.png

 



Thank you and regards,
Pavan.