Question on Virtual Agent Designer/Service portal chatbot issue

Akilan Ram
Tera Contributor

Hi All,

Please can you help on the below issues/questions that I have stated:
1) We have a requirement wherein once a user opens incident record assigned to that person in service portal, virtual agent will display proactive trigger message for the user to take action on , and user will be displayed set of static choices, once choice is selected incident should be updated with worknotes based on the incident the user has opened, my question is can we fetch the user's current session url or incident sys_id from the opened page to pass it to the virtual agent designer's variable(incident_sys_id) i.e, can I get the current incident details through virtual agent scripts?

we have tried "GlideURL" and "getSession()" to parse the current url but got application scope error

 

virtual agent script.PNG

 

2) Is it possible to perform SOAP call from Virtual agent designer that will pass the current session incident sysid to third party application or pass the incident details through flows from virtual agent chat to a third party application.

 

suggestions please.

1 REPLY 1

Subham Mundra1
Tera Expert

Hi @Akilan Ram ,

 

1) From what you have mentioned I think you can use "vaContext" to update the incident record.

Solution:- As soon as the user clicks on one of the incidents on service portal append a new parameter(let's say sysparm_sysid) to the virtual agent's URL(https://<instance>.service-now.com/$sn-va-web-client-app.do).

 

Post appending the sysid it will look like (https://<instance>.service-now.com/$sn-va-web-client-app.do?sysparm_sysid=<incident's sys id>). Once you have appended the sysid in the URL, you can get the appended sys ID value in Virtual Agent script using "vaContext.<variable name>" (here "vaContext.sysid").

Further you can use this sys id to make necessary updates to the record.

 

 

2) Once you have got the sysid of the record by following the steps you can call a flow designer and pass the sysid for a third party integration from VA scripts.


Do mark the answer Helpful, if the solution fits your ask.

 

Regards,

Subham