- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 12:20 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 07:34 AM
You could create a Subflow, using Flow Designer - that takes as input the (current) user and returns the country:
Define the inputs:
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":
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:
Use the data-pill picker to set the sub-flow input:
After that you can use "Country Name" in condition builders:
No code at all.
Hopefully it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 07:34 AM
You could create a Subflow, using Flow Designer - that takes as input the (current) user and returns the country:
Define the inputs:
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":
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:
Use the data-pill picker to set the sub-flow input:
After that you can use "Country Name" in condition builders:
No code at all.
Hopefully it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 07:36 AM
Of course, this is just a P.o.C.
In the final product you would take into consideration and design around the possibility that the current user might not have a location field set, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 07:42 AM
And because seeing is believing, here's a test:
🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 11:25 PM
Very grateful for your answer, it works perfectly! Thank you so much -0-