Who has the access to create a Universal Request and what is the property
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 12:40 AM
Hello Experts,
To raise a universal request, is it mandatory to have a role or any user can raise it ?
Also when a Universal Request is created via an OOB inbound action "Create Universal Request", what is the role of the condition below :
!gs.nil(gs.getProperty("sn_uni_req.ur_email")) && email.recipients.split(",").some(function(recipient) { return gs.getProperty("sn_uni_req.ur_email").toLowerCase().indexOf(recipient.trim().toLowerCase()) > -1; });
This inbound can be found in - /sysevent_in_email_action.do?sys_id=db672f79530320107465ddeeff7b12c2&sysparm_view=&sysparm_record_ta...
Please help me in this , as i am not able to reach to the conclusion how it is getting created based on the condition,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 12:47 AM
Hi @Mishu
The universal request is the backend for the user, which means it is available at the portal and linked to UR in the backend and based on that the further inc or req or case is logged.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 12:53 AM
Hello @Mishu
To raise a universal request, is it mandatory to have a role or any user can raise it ?
-> No role is required, anybody can raise it.
!gs.nil(gs.getProperty("sn_uni_req.ur_email")) && email.recipients.split(",").some(function(recipient) { return gs.getProperty("sn_uni_req.ur_email").toLowerCase().indexOf(recipient.trim().toLowerCase()) > -1; });
Now the condition is checking if a specific email address is present in the list of email recipients. Here's a breakdown of what each part does:
!gs.nil(gs.getProperty("sn_uni_req.ur_email")): This part checks if the property sn_uni_req.ur_email is not null. The gs.nil function returns true if the value is null, so the ! operator negative it, ensuring the property is not null.
email.recipients.split(","): This splits the string of email recipients into an array, using a comma as the delimiter.
.some(function(recipient) { ... }): This method checks if at least one element in the array passes the test implemented by the provided function. It returns true if the function returns true for any element.
gs.getProperty("sn_uni_req.ur_email").toLowerCase().indexOf(recipient.trim().toLowerCase()) > -1: This part of the function checks if the email address from the property sn_uni_req.ur_email (converted to lowercase) contains the recipient email (also converted to lowercase and trimmed of whitespace). The indexOf method returns the position of the first occurrence of the specified value, or -1 if it is not found. If the value is greater than -1, it means the recipient email is found within the property email.
In summary, this condition ensures that the property sn_uni_req.ur_email is not null and that at least one of the email recipients matches the email address specified in the property.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 01:04 AM
@Viraj Hudlikar ..Thanks for the wonderful explaination! 🙂
But as per the value given in the property, the condition should never be met as there is only 1 email address present"request.help@example.com" that too is invalid, then how the UR ticket is still getting created when my recepient is not present in the property.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 02:51 AM
@Viraj Hudlikar ..Can you assist plz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 04:08 AM
Hello @Mishu
I am not sure what recipient value are getting when incoming email is coming to your instance. You can do one thing when email is processed, we have email logs related list at bottom of email and there we can check which inbound action has got triggered. As you saying so recipient is not matching with property value then it might some other configuration is taking over and creating UR.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.