<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic in Virtual Agent, NLU forum</title>
    <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2572892#M11283</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pre-Quebec to switch between topics, a method used was "vaSystem.switchTopic()". Although this method does perform it's basics, it does bring unexpected side effects on the working of the Virtual Agent client. Starting with the Quebec release, it is recommended to use "vaSystem.switchTopicByName()" or "vaSystem.switchTopicById()" instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replace the usage of "vaSystem.switchTopic()" with "vaSystem.switchTopicByName()" or "vaSystem.switchTopicById()".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;BR /&gt;Mark&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 19:22:57 GMT</pubDate>
    <dc:creator>Mark Roethof</dc:creator>
    <dc:date>2023-05-26T19:22:57Z</dc:date>
    <item>
      <title>Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2568605#M11270</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am facing below issue when switching topic from one to another.&lt;/P&gt;&lt;P&gt;In "Topic 1" based on yes/No question switching topic to "Topic 2". System successfully switching to Topic 2 but once everything completed its not returning back to previous topic. I have tried below code but no luck. Can anyone faced the same issue and is there any way that we can resolve this issue? Kindly provide your suggestion.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Tried : vaSystem.switchTopic('Topic Name 2'); - Not working&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Tried :&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;vaVars.global_search_text = 'Topic Name 2&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;vaSystem.topicDiscovery();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Even its not working.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any clue?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 19:03:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2568605#M11270</guid>
      <dc:creator>Rani11</dc:creator>
      <dc:date>2023-05-22T19:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2568646#M11271</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/314249"&gt;@Rani11&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I trust you are doing great.&lt;/P&gt;&lt;P&gt;After successfully switching to "Topic 2," the system is not returning back to the previous topic. I can provide you with some suggestions to resolve this issue.&lt;/P&gt;&lt;P&gt;One possible solution is to use the following code snippet to switch topics:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;vaSystem.switchTopic('Topic Name 2');&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;owever, based on your description, it seems that you have already tried this code without success. Another approach you can attempt is to set the global search text and then trigger the topic discovery. You can use the following code snippet for that:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;vaVars.global_search_text = 'Topic Name 2';
vaSystem.topicDiscovery();&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 May 2023 19:47:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2568646#M11271</guid>
      <dc:creator>Amit Gujarathi</dc:creator>
      <dc:date>2023-05-22T19:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2568867#M11272</link>
      <description>&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;I have tried both but no luck.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 05:39:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2568867#M11272</guid>
      <dc:creator>Rani11</dc:creator>
      <dc:date>2023-05-23T05:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2572887#M11282</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Use &lt;STRONG&gt;vaSystem.switchTopicById(sysid)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;You shouldn't use vaSystem.switchTopic() - and vaSystem.topicDiscovery() was a hacky workaround to avoid that which you also shouldn't use to switch topics (if you know what topic you want to switch to).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;A href="https://docs.servicenow.com/bundle/utah-servicenow-platform/page/administer/virtual-agent/concept/virtual-agent-scripts.html#d166561e518" target="_blank"&gt;Virtual Agent scripts (servicenow.com)&lt;/A&gt;&lt;/P&gt;
&lt;TABLE id="virtual-agent-scripts__table_xvn_c5r_h2b" class="table frame-all"&gt;
&lt;TBODY class="tbody"&gt;
&lt;TR class="row"&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;&lt;SPAN class="keyword apiname"&gt;vaSystem.switchTopicById(sysid)&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Enables the user to jump from the current conversation topic to the specified topic ID. The X button is available, so that the user can end the conversation. After the topic ends, the user resumes the global topic. When the conversation ends, the user can click to restart.
&lt;DIV class="p"&gt;The optional&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword parmname"&gt;resumeBehavior&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;parameter specifies how the conversation flow resumes, as follows:
&lt;UL id="virtual-agent-scripts__ul_hwt_21l_gtb" class="ul"&gt;
&lt;LI class="li"&gt;If&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword parmname"&gt;resumeBehavior=resume&lt;/SPAN&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="ph"&gt;Virtual Agent&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;resumes the calling topic.&lt;/LI&gt;
&lt;LI class="li"&gt;If&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword parmname"&gt;resumeBehavior=skip&lt;/SPAN&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="ph"&gt;Virtual Agent&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;skips the calling topic.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;P class="p"&gt;If&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword parmname"&gt;resumeBehavior&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is not specified, the default behavior for the instance is used.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;resumeBehavior is a new parameter to Tokyo (I actually just learned about it getting you the link to it) - I've never used it and by default, if you omit it (i.e. just do&amp;nbsp;&lt;SPAN&gt;vaSystem.switchTopicById(abc123)) it'll resume the calling topic which is what you want.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 19:18:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2572887#M11282</guid>
      <dc:creator>Chris D</dc:creator>
      <dc:date>2023-05-26T19:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2572892#M11283</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pre-Quebec to switch between topics, a method used was "vaSystem.switchTopic()". Although this method does perform it's basics, it does bring unexpected side effects on the working of the Virtual Agent client. Starting with the Quebec release, it is recommended to use "vaSystem.switchTopicByName()" or "vaSystem.switchTopicById()" instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replace the usage of "vaSystem.switchTopic()" with "vaSystem.switchTopicByName()" or "vaSystem.switchTopicById()".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 19:22:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2572892#M11283</guid>
      <dc:creator>Mark Roethof</dc:creator>
      <dc:date>2023-05-26T19:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2572926#M11284</link>
      <description>&lt;P&gt;When I use this&amp;nbsp;vaSystem.switchTopicByName('name of topic')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I make sure this is turned on in both topics&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lynda1_0-1685133305992.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/263899iC57F0A9A7E96EA8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lynda1_0-1685133305992.png" alt="Lynda1_0-1685133305992.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;works like a charm every time.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 20:35:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/2572926#M11284</guid>
      <dc:creator>Lynda1</dc:creator>
      <dc:date>2023-05-26T20:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/3024103#M13183</link>
      <description>&lt;P&gt;Hey Mark,&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;&lt;SPAN&gt;vaSystem.switchTopicByName() to switch from one topic Check Ticket status to Escalate IT Ticket however system starts topic from beginning instead of taking the Ticket id from topic one and just escalate, do you know if we can pass input and read it in Escalate IT Ticket and system auto detects and escalate it directly ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 18:35:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/3024103#M13183</guid>
      <dc:creator>Bharath38</dc:creator>
      <dc:date>2024-08-21T18:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/3026560#M13191</link>
      <description>&lt;P&gt;I've not done it before, but I think your best bet would be to use&amp;nbsp;&lt;A href="https://docs.servicenow.com/bundle/xanadu-conversational-interfaces/page/administer/virtual-agent/reference/live-agent-chat-context-vars.html" target="_blank"&gt;Live agent chat context variables&lt;/A&gt;&amp;nbsp;- you can define your own. In theory, I believe these should persist through an entire conversation, so if you set it in one topic, it should still be available in another topic (or, in their primary use case, available to the live agent).&lt;/P&gt;
&lt;P&gt;You will probably need to add the context variable in the Properties of both topics. In Topic A, you'll need to set the context variable before switching topics, then in Topic B, you'll need logic at the start of the conversation to read the context variable and bypass the unnecessary parts of the topic flow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't work (I really hope it does), the other -rather hacky - option would be to write the data to a field on the current interaction record in Topic A then read the data in Topic B.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 22:05:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/3026560#M13191</guid>
      <dc:creator>Chris D</dc:creator>
      <dc:date>2024-08-23T22:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Virtua agent : vaSystem.switchTopic('Topic name') not returning back to previous topic</title>
      <link>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/3027700#M13195</link>
      <description>&lt;P&gt;Hello Crhis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is exactly what I have done and worked, glad that you agree with same approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 13:31:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-nlu-forum/virtua-agent-vasystem-switchtopic-topic-name-not-returning-back/m-p/3027700#M13195</guid>
      <dc:creator>Bharath38</dc:creator>
      <dc:date>2024-08-26T13:31:09Z</dc:date>
    </item>
  </channel>
</rss>

