Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How to redirect the Virtual Agent Bot Response Card record URL to a portal other than /sp - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to redirect the Virtual Agent Bot Response Card record URL to a portal other than /sp
KB0743562

How to redirect the Virtual Agent Bot Response Card record URL to a portal other than /sp


11462 Views Last updated : Jan 6, 2023 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

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.
  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.

Release

London and newer

Related Links

Virtual Agent bot response documentation


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.