Virtual Agent - Setting Field on Incident Form via script

David168
Tera Expert

Good Morning;

Please forgive my ignorance on this topic as I delve into our virtual agent setup.

Problem:  

I need to set the Business Service (business_service) variable on the incident created by the virtual agent.  I need this to be static. (either push the string or the sys_id.) 

 

For example:

My topic is "Accounts, Passwords and Email" (all user-related functions.)  Once into the topic, if I gave a choice and asked the client if this was gmail related or outlook related, the user makes their choice.  If user chooses gmail, I need the business service on the resulting incident to be "gmail" or to push the sys_id.  Asking the client to determine the business service is not something we want to do. 

 

I imagine this is done via a script component.  

 

I admit, I am not a 'coder' but am good enough to understand the flow and how it works. 

 

Thanks in advance for your assistance. 

Dave

1 REPLY 1

Allen Andreas
Administrator
Administrator

Hi,

Are you using the Record Action utility within VA to create the Incident?

If so, you can set field that way, but it sounds like you need to capture certain pieces of what they've entered to then set the value as you need. In that case, you'd use a combination of the Record Action Utility: https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/servicenow_application_developer...  and the Script Action Utility: https://docs.servicenow.com/bundle/washingtondc-servicenow-platform/page/administer/virtual-agent/re... - in addition to capturing an input via an input variable: https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/servicenow_application_developer... 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!