Notifications

38 views

Description

 

How to redirect Virtual Agent Bot Response Card record url to another portal than /sp. As an example, when the Out of Box 'Open IT Ticket' topic creates a card for the incident, clicking on the incident number displays the record in /sp. Even if the Virtual agent is added to another portal,the record opens up in /sp.

This article explains how to use a scripted output to display a card and redirect the record to the desired portal.  

Procedure

 

As an example, use Out of Box 'Open IT Ticket' topic. 

  1. Open the topic in Designer and 'Edit Topic Flow'.
  2. In Madrid, the topic uses Bot Response 'Card' to display the new incident
  3. Instead of using 'Card' add 'Script Output'
  4. Now in the Response Properties add the following:

Name: Incident Card

Script Output Type: Single-part

Script Response Message:

(function execute() {

var incident = new GlideRecordSecure('incident');

incident.get(vaInputs.create_incident);

var title = {

url: gs.getProperty('glide.servlet.uri') + '/' +

gs.getProperty('sn_itsm_va.com.snc.itsm.virtualagent.portal_url') +

'?sys_id=' + incident.sys_id + '&id=ticket&table=incident',

label: incident.number

};

var fieldList = ['category', 'assignment_group', 'short_description', 'state'];

var cardRenderer = new global.VaRecordCardRenderer(true);

var fields = cardRenderer.createFields(fieldList, incident);

var html = cardRenderer.renderCard(title, fields);

return html;

})();

5. Save the topic.
6. Now go to sys_properties.list
7. Find the following property: sn_itsm_va.com.snc.itsm.virtualagent.portal_url
8. It must be set to sp. Change it to the desired portal.
 
 

Applicable Versions

 

London and above. 

Additional Information

 

Virtual Agent bot response documentation

Article Information

Last Updated:2019-03-19 07:10:17
Published:2019-03-11