
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-23-2022 11:07 PM
THANK YOU SERVICENOW COMMUNITY, JUST SUMMARIZING THEM AT ONE PLACE FOR THE CONVENIENCE OF THE NEWCOMERS, WHO OFTEN KEEP ASKING FOR REALTIME SCENARIOS.
Dear learners,
I am no expert on ServiceNow development. There is this never dying quest to attempt some real-time scenarios on a script. I thought I would list them all in one place, so that it becomes a reference for those willing to attempt and learn. I am not posting the solutions. I am just giving the scenarios via this article.
Scenario 1:
When a change request is completed, send an email to the assigned to person on all related problems and incidents informing of the closure.
Scenario 2:
There exists 3 groups : TEST.GRP1, TEST.GRP2, TEST.GRP3. Whenever the Group manager of these groups is updated (even from NULL), add all those updated users (managers) in a new group TEST.MGR_GRP
Scenario 3:
On linking, removal or updating the reference field Problem on an incident, post a work note on the problem record.
- Incident <Inc_number> is now linked to the problem.
- Incident <Inc_number> is no more linked to this problem.
- Incident <Inc_number> is newly linked to the <newPRB_Num> from <oldPRB_Num>
- Make sure a work note is posted in every kind of update done to the problem field on incident.
Scenario 4:
On a OOTB copied incident, display a info message which shows the fields being copied (not the values), check the incident being a copied incident on a script include call.
Scenario 5:
Auto-populate new incident form:
- Caller should be the logged in user on a unsaved incident form.
- Apply a prefix SQUAD1 to the Short description, if the first 4 categories of an incident OOTB is chosen by the user.
- Apply another prefix SQUAD2 to the Short description, if the
In real-time, this can be applied to stories with a specific product chosen by the user.
Scenario 6:
Abort (use script to abort) saving an incident, if the short description or description contains restricted keywords like - (ABC, XYZ). Also log in the script to verify your output.
Scenario 7:
Alert the user on a incident, while the user changes the impact and urgency that calculates into a Critical priority. Also trigger an email informing the user that the incident is now transferred to the major incident group TEST.MJR_INC (create a group)
Scenario 8:
Prepare a catalog item to request for certification cost reimbursement from your organization. In the catalog item: (Service catalog > Services)
Input on catalog item:
- certification date,
- ServiceNow certificate - True/false
- Requested for (auto-populates with logged in user name),
- Certification name (choice list),
- Addl. info (String),
- Certification cost (Numeric field), abort submission with alert message, if not numeric.
Checks:
- Condition for displaying Certification name - only if certification is a 'ServiceNow certificate'.
- If not, Display Annotation above Addl. info field to prompt the user enter the certification name.
- Validate on submit, if there is an attachment in the cart (Before submission - attachment is on sc_cart_item)
Approval and Closure, Notification:
- On submission of the catalog item request, there should be an approval triggered to the 'Requested for' variable manager.
- If approved, set State of request to Closed Complete, if not Closed Incomplete, as per the respective stages.
- Trigger an email on the request being closed and set the body of the email to convey to the user:
- That the certification cost will be reimbursed along with salary credit.
- Or the certification cost will not be reimbursed along with the Manager comments provided for rejection.
Scenario 9:
Display an info message on a incident informing the user, the duration since the incident is in open state. When it is the Assigned to of the incident viewing the incident, the info message should read the SLA Breach time left.
Scenario 10:
- Import incident data into ServiceNow, with Category and Short description inputs provided from an excel (external source).
- Caller is auto-populated according to one of the above scenarios.
- Using a transform map,
- Apply a template A (already created) to prefill all fields that you wish to, if category selected is A and short description contains a keyword (choose your own)
- Else pre-fill only the mandatory fields on the incident with fixed values.
Wishing the community of learners, all the best. Hope this serves to be a stepping stone to your further attempts on Scripting in ServiceNow. Wil be coming up with more scenarios and will try and keep it as much as real-time and simple as possible. Let's learn!
Cheers,
Anish Reghu
Liked this article? Please mark it Helpful.
For future references, please Bookmark it.
- 10,790 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi,
Anish, Can you provide me with any 10 Real-time Scenarios Of the Script Include.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Anish,
Can you help me with Real time scenarios on workflows, BR,CS and workflow automation requirements
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
very helpful @Anish Reghu