ServiceNow Virtual agent Lookup Utility

RenatoMendoza
Tera Contributor

I have been trying to create a topic that allows me to make decisions based on the user's country. For example, if the user is located in the United States, display certain information and if the user is located in Ireland, display another information. Apparently, I need to use the Lookup utility pointing to the Sys_user table but I can't define the conditions properly. Is there a way to achieve this without having to code a script?

 

Thanks in advance you all.

1 ACCEPTED SOLUTION

-O-
Kilo Patron
Kilo Patron

You could create a Subflow, using Flow Designer - that takes as input the (current) user and returns the country:

Define the inputs:

6.png

 Defined the sole action - a Flow Logic (Assign Subflow Outputs) in fact, setting the output variable "Country Name" to dot-walk "Input > User > Location > Country":

7.png

 After making sure that you configured the Subflow to be executed as the system user (vs. the current user), Save and Publish.

That's all and no code.

 

 

 

Switch to Virtual Agent Designer

Add a "Utility" of type "Action", select "Subflow" under "Invoke Flow Designer object", point to the scope and sub-flow that you have just defined, and set the sub-flow input:

8.png

 Use the data-pill picker to set the sub-flow input:

10.png

 After that you can use "Country Name" in condition builders:

9.png

No code at all.
Hopefully it helps.

View solution in original post

5 REPLIES 5

My pleasure!

Glad I could help. 🙂