- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 10:18 PM
In virtual agent, the case creation on HR services should change based on the logged in user's home country,is that possible? how?
Example: So if user is from India the HR service should be General Inquiry or if user from US the HR service should be Payroll
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 11:39 PM
you will require script for this
use the Script action and check which country logged in user belongs
Then use Decision and based on that use Record action
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2023 09:51 PM
update as this
var gr = new GlideRecord('sn_hr_core_profile');
gr.addQuery('user',vaInputs.user.sys_id);
gr.query();
if(gr.next()) {
var location = gr.country_of_birth.getDisplayValue();
vaVars.location = location;
}
})()
then in decision use the exact country name to match in IF
if(vaVars.location=='United States of America'){
return true;
}
else{
return false;
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 10:36 PM
so what debugging did you perform?
did you check the topic flow?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 10:39 PM
Is this only possible through script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 10:51 PM
can you share where is this exactly required? share some screenshots
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 11:05 PM