The Now Platform® Washington DC release is live. Watch now!

ServiceNow Community servicenow community

  • English (US)
  • English (UK)
  • Portuguese (Brazilian)

developer

  • ServiceNow Community
  • IT Service Management
  • Report on Assignment Group status on previous mont...
  • Subscribe to RSS Feed
  • Mark Question as New
  • Mark Question as Read
  • Float this Question for Current User
  • Printer Friendly Page

Report on Assignment Group status on previous months end

jhferry3

  • Mark as New
  • Report Inappropriate Content

‎06-23-2015 01:24 PM

  • 4,216 Views
  • All forum topics
  • Previous Question
  • Next Question

The Machine

‎06-23-2015 03:40 PM

trdaniels

‎07-24-2015 07:39 AM

TD 7-24-2015 7-34-58 AM.png

‎07-24-2015 08:35 AM

find_real_file.png

‎07-24-2015 09:21 AM

  • Assign the second task to the same user as the previous task assignee in ITSM forum a week ago
  • How to created report of incidents opened between last Friday of previous month and 10 days prior ? in Performance Analytics forum 3 weeks ago
  • Report on previous "Assigned To" in Performance Analytics forum a month ago
  • Report on Assignment Group status on last 6 months in ITSM forum 03-15-2024
  • Creating a custom incident auto assignment. Need some assistance in ITSM forum 03-07-2024

reassignment count not working in servicenow

ServiceNow Developers Logo

  Blog Home

  mvps,   flow designer, recent posts, we've moved, what's new in uib for vancouver, podcast: break point - career conversation with astrid sapphire, get ready, the devvies 2024 is almost here, hacktoberfest 2023, share this post, counting with glideaggregate.

Tutorial on using GlideAggregate to count.

#GlideAggregate , #Server Side Scripting , #Scripting , #Count

reassignment count not working in servicenow

10 minute read

We are experimenting with new training content delivery methods. This tutorial blog post is one of those experiments. We are very interested in your feedback. Please let us know what you think about this format and the content in the comments below.

Introduction

As my youngest child was learning to count, he would always miss number 14. “…eleven, twelve, thirteen, fifteen, sixteen…” Now he is six years old and counts by ones like a pro. We read a book the other night about an elementary school class that was counting pumpkin seeds. One group decided to count by twos, another group by fives, and the last group decided to count by tens. When it was time for the groups to tally up their pumpkin seeds by counting, one group certainly had an easier time than the others. The group that counted by tens was able to get their result more efficiently.

Just as you can count physical objects differently, you can count objects in a database differently. And just as some methods of counting physical objects are more efficient than others, some methods for counting objects in a database are more efficient.

The GlideRecord class includes a method called getRowCount() that counts the number of rows in a query result. As each record is loaded, ServiceNow updates the count. A more efficient way to get this same information, though, is through data aggregation with the GlideAggregate class. GlideAggregate gets the database to count and returns the result.

Whatis.com defines data aggregation as any process in which information is gathered and expressed in a summary form, for purposes such as statistical analysis. A common aggregation purpose is to get more information about particular groups based on specific variables such as age, profession, or income.

The GlideAggregate class allows developers to create data aggregation queries. The topics in this post build on concepts in the GlideRecord concepts in the Server-side Scripting module.

In this post, you create Business Rules that use GlideAggregate to count records.

  • Guided: Create a Business Rule for new Incidents to count active Incidents from the same caller and post an information message with the count of the caller’s active Incidents. You begin with a simple count and explore ways to get the desired aggregate.
  • Option 1: Create a similar Business Rule for new NeedIt requests.
  • Option 2: Create a similar Business Rule for new Change Requests.
NOTE : This exercise uses demo data that may vary in your instance.

Create an Incident Business Rule to Count Incidents

  • Log in to your ServiceNow instance as a System Administrator.
  • Use the Application Navigator to open Incident > Open .
  • Change Go to to Caller and set the search value to *Berzle . Make note of how many records have Rick Berzle as the Caller.

Create a Business Rule.

  • Right-click any column header and select the Configure > Business Rules menu item.
  • Click the New button.
  • Name: Count Open Incidents by Same Caller
  • Advanced: selected (checked)
  • When: after
  • Insert: selected (checked)

Configure the Advanced section.

Replace the contents of the script field with this script.

Click the Submit button.

Test the Business Rule.

  • Use the Application Navigator to open Incident > Create New .
  • Caller: Rick Berzle
  • Short description: Received phishing email
  • Click the Submit button. An information message shows an incident count.

The Info Message shows Rick Berzle as having 70 active Incidents.

QUESTION : Is the count for Rick Berzle’s active incidents correct? Why or why not? If you are not sure, scroll to the Answers section at the bottom of this page. QUESTION : Does the count of incidents include the incident just submitted? If you are not sure, scroll to the Answers section at the bottom of this page.

Update the Business Rule to Return Active Incidents

GlideAggregate extends GlideRecord. You can use the addQuery() method to filter the incidents returned in the query.

Update the Business Rule to only count active incidents.

  • Open the Count Open Incidents by Same Caller Business Rule for editing.

Add the query parameters above the // Add Aggregate comment.

Test the Business Rule again.

  • Short description: Email not received
  • Click the Submit button. An information message lists active Incidents with Rick Berzle as the Caller.

The Info Message shows Rick Berzle as having 48 active Incidents.

Update the Business Rule to Count by Caller

The addAggregate('COUNT') in the script counts all records. The addAggregate method accepts a second parameter to count by a specific field. In this section, you update the script to count by caller_id. Every addAggregate has a corresponding getAggregate to get the value. You also update the getAggregate method to return the count results.

Update the Business Rule to only count Rick Berzle’s active incidents.

Change the aggIncident.addAggregate('COUNT'); line to count by Caller.

Update the getAggregate method in the script to return the count by Caller and update current.caller_id.name to return the caller from the aggregate.

  • Short description: Printing issue
QUESTION : Does the information message show Rick Berzle’s active incidents now? If you are not sure, scroll to the Answers section at the bottom of this page.

Return Only the Current Caller’s Active Incident Count

In this section, you review two possible ways to limit the information message to show only the current Caller’s active incident count. Select a script and implement that script. After you decide which script to use, replace the script in the Count Open Incidents by Same Caller Business Rule with the script for the strategy selected.

STRATEGY 1 : Add an if statement to only write the message if the aggregate.caller_id is the same as current.caller_id.

STRATEGY 2 : Add a query to only return incidents that have the same Caller as the current incident.

QUESTION : Which strategy is more efficient? Why? If you are not sure, scroll to the Answers section at the bottom of this page. Did you do the hands-on exercise in this blog? Click here to let us know!

Challenge - Option 1 - Create a NeedIt Business Rule

Create a Business Rule for the NeedIt application from the Developer Portal training that counts open NeedIt requests for the user in the Requested for field. Show the count in an information message.

Starting tips:

  • Prepare the instance with the NeedIt application using the directions in Exercise: Prepare Instance for Server-side Scripting .
  • Create the Business Rule for the NeedIt table.
  • Use the Requested for field.

If you need help, see the Create a NeedIt Business Rule section in the answers at the bottom of this post for a sample script.

Challenge - Option 2 - Create a Change Business Rule

Create a Business Rule for Changes that counts changes opened for the same Configuration Item. Show the count in an information message.

  • What is the name of the Change table?
  • What is the name of the Configuration Item field?

If you need help, see the Create a Change Business Rule section in the answers at the bottom of this post for a sample script.

Closing Thoughts

When you need to count records, use the most efficient way available. GlideAggregate counts more efficiently than getRowCount(). getRowCount() should not be used in production due to its ineffecient and resource intensive counting process. When you use GlideAggregate, make your queries efficient so you do not count records you do not need to count. Be sure to come back to the Developer Blog for more hands-on exercises around GlideRecord and GlideAggregate.

Question : Is the count for Rick Berzle’s active incidents correct? Why or why not? Answer : The count shows ALL incidents, not just the count of Rick Berzle’s active incidents. No query parameters were added to filter the count to just active incidents where Rick Berzle is the caller.
Question : Does the count of incidents include the incident just submitted? Answer : The count of incidents includes the incident just submitted because the Business Rule is set to run after the record is submitted. If the Business Rule was configured to run before , the count would not include the incident just submitted because the records are counted before the new incident is committed.
Question : Does the information message show Rick Berzle’s active incidents now? Answer : Yes, the information messages include Rick Berzle’s active incident count. The Business Rule returns an information message for each user with that user’s number of active incidents, including Rick’s.

The Business Rule creates an information message for each caller with that caller's number of incidents.

Question : Which strategy is more efficient? Why? Answer : Strategy 2, which queries for records where the Caller matches the current Caller is more efficient. The query limits the records to count with the aggregate. Strategy 1 returns and counts records unnecessarily.
Create a NeedIt Business Rule : Here is an example script for a Business Rule to get the count NeedIt requests for a user and write the count to an information message.
Create a Change Business Rule : Here is an example script for a Business Rule to get the count of Changes for a Configuration Item and write the count to an information message.
  • Shortcut GlideRecord Queries with get
  • Simplify Queries with Encoded Queries

Developer Blog

Written with by the Developer Advocate team

Featured Posts

reassignment count not working in servicenow

Conquer the #BuildWithRPA Challenge & Snag Exclusive Swag!

reassignment count not working in servicenow

© 2023 ServiceNow Developer Blog . Powered by Hugo

Ask a question

Start a discussion.

  • Jira Jira Software
  • Jira Service Desk Jira Service Management
  • Jira Work Management
  • Confluence Confluence
  • Trello Trello

Community resources

  • Announcements
  • Technical support
  • Documentation

Atlassian Community Events

  • Atlassian University
  • groups-icon Welcome Center
  • groups-icon Featured Groups
  • groups-icon Product Groups
  • groups-icon Regional Groups
  • groups-icon Industry Groups
  • groups-icon Community Groups
  • Learning Paths
  • Certifications
  • Courses by Product
  • Live learning
  • Local meet ups
  • Community led conferences

questions

Get product advice from experts

groups

Join a community group

learning

Advance your career with learning paths

kudos

Earn badges and rewards

events

Connect and share ideas at events

  • Jira Service Management

Re-assignment Counter

David Meredith

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

Agent_View.PNG

Suggest an answer

People on a hot air balloon lifted by Community discussions

Still have a question?

Get fast answers from people who know.

Was this helpful?

Deployment type, product plan, permissions level.

  • jira-service-management
  • Community Guidelines
  • Privacy policy
  • Notice at Collection
  • Terms of use
  • © 2024 Atlassian

Book a Demo

  • HappySignals Learning Center

How to Reduce Ticket Reassignments in ServiceNow

If you watched our previous episode, you now know the damaging impacts of ticket reassignment on your end-users productivity and happiness; how do you now reduce that to make a positive impact?

Sami and Pasi focus on the different areas to target to help solve this organizational crisis.

Continue watching

reassignment count not working in servicenow

Positive Factors affecting Employee Experience in ServiceNow

reassignment count not working in servicenow

Negative Factors Impacting Employee Experience in ServiceNow

More on this topic

reassignment count not working in servicenow

How to get more out of your Now Platform with IT Experience Management?

reassignment count not working in servicenow

Employee experience and the role technology can play in supporting a more flexible workforce

reassignment count not working in servicenow

Ticket bouncing - The most impactful ITIL metric

reassignment count not working in servicenow

Don't make this mistake with your new ServiceNow platform!

reassignment count not working in servicenow

How HappySignals Improves Employee Experience in ServiceNow

reassignment count not working in servicenow

ServiceNow Ticket Reassignment; The Real Impact on Happiness and Productivity

reassignment count not working in servicenow

Optimize ServiceNow Through Experience Management, with Jimmy Fitzgerald

reassignment count not working in servicenow

Webinar: Experience Management for ServiceNow

reassignment count not working in servicenow

The 3 common executive needs to strategizing your ServiceNow platform

reassignment count not working in servicenow

From Signals to Action with ServiceNow

Find more about ServiceNow

Ready to drive it experience management in your organization, let's talk.

Get in Touch

IMAGES

  1. Impact of ServiceNow's Reassignment Count on Employees Productivity

    reassignment count not working in servicenow

  2. 26. Impact of ServiceNow's Reassignment Count on Employees Productivity

    reassignment count not working in servicenow

  3. Reassignment Count in ServiceNow

    reassignment count not working in servicenow

  4. Adding Fields to a Table

    reassignment count not working in servicenow

  5. Push Data to ServiceNow

    reassignment count not working in servicenow

  6. What is ServiceNow Tool? Use & Reporting Tutorial

    reassignment count not working in servicenow

VIDEO

  1. mt 15 Speed count not working problem 🥲#shortfeed #youtubeshorts #viralvideo #mt15lover #speedmt

  2. Care count ||NOT A SHIP||

  3. ServiceNow Integration Challenges and Resolutions

  4. Disadvantages Of ServiceNow CMDB?

  5. ServiceNow Scoped Application Demo

  6. What To Do when Changes Failed in Production? Change Failure Explained !!!

COMMENTS

  1. Incident.reassignment_count is not "0" on new incident ...

    The value incident.reassignment_count is not "0" on new incident received via an email inbound action. Steps to Reproduce 1) Enable email sending and receiving under "email properties". 2) Find "create

  2. Reassignment count field calculations

    Reassignment count field calculations - Support and Troubleshooting - Now Support Portal. How does the reassignment count field work?

  3. The field 'Reassignment count' is only updated when ...

    Incidents include a field called 'Reassignment count' which records how many times an Incident is reassigned. However this only counts when the assignment group changes, if you reassign between users in

  4. Incident reassignment count is updated incorrectly

    Recently found out some incident reassignment times are incorrect. Incidents transferred to the same support team will be counted twice, which is incorrect.

  5. Report Showing Tickets Passed Back to My Assignment Group

    Thanks for the responses all, I figured it out. For those who are interested, here are the filters I used on my report: Active is true. Assignment Group is Service Desk. Reassignment Count greater than 1. State is not one of Closed Complete, Closed Incomplete, Closed Skipped, Closed Abandoned, Skipped, Resolved, Closed. 2.

  6. Metric for reassignment count : r/servicenow

    You can do this via a Metric, as u/CO-Don says, but depending on what you're trying to do it'd probably be better to customize the OOB field. If you add a Metric to hold this value instead, you're going to end up with two things which purport to be "reassignment", and likely just increase confusion and bad reporting. 2. Reply. Substantial_Canary.

  7. Reassignment Count in ServiceNow

    This is quite interesting feature provided by @servicenow which counts the number of times a ticket was reassigned. We will look at the functionalities, adv...

  8. Get listing of all Incidents "touched" by Assignment Group

    What you are looking for is the assignment group metric. The metrics table to look at is a database view called "incident_metrics" if I remember correctly. It allows you to report on both an incident and the metric associated with them at once. In addition to this, there is a free plugin called SLA Breakdown which can give you assignment group ...

  9. 26. Impact of ServiceNow's Reassignment Count on Employees ...

    Sami and Pasi discuss data from over 1 million customer responses - the Happiness Score™ Report. In this episode they analyse their customer's data who are u...

  10. I am working on the record producer and when i a ...

    01-19-2022 07:41 PM. when i am submitting the ticket ,incident is creating and assigned to correct group but reassignment count i am getting as 1 instead of 0.below business rule is written for the for the record producer. Business rule : After and Insert and condition is current.variables.sap_process != undefined . Labels: Rome. Service Catalog.

  11. Assignment Rule is not working

    Incidents are being created without any value populated in the Assignment Group field (Assignment Rule is failing).

  12. Report on Assignment Group status on previous months end

    Options. 07-24-201509:21 AM. The table you are looking to report on is the Incident Metric table. What you do is you set your filter to the Definition is Incident State Duration (I believe). and "Created (mi_sys_created) is last day of the previous month. The "MI" is the metric instance.

  13. Calculation of duration based on assignment group

    Calculate the duration of an incident based on the Assignment Group. Most of the cases, the incident will be traversed to multiple teams for resolution. In such cases, if we want to calculate the duration.

  14. ServiceNow Ticket Reassignment; The Real Impact on ...

    Pasi and Sami discuss the impacts of reassigning tickets and the damaging consequences it not only has on your end-users happiness but their productivity and the time they lose, resulting in a loss of business value and costs. This data was taken from our Global IT Experience Benchmark Report. HappySignals for ServiceNow Global IT Experience ...

  15. Generate Report for Incidents handled or touched by your team ...

    In this video we will see how can we Generate Report for Incidents handled or touched by your team even after reassignment.-----...

  16. In AWA, in an assignment rule if you check "Reassign on ...

    In AWA, in an assignment rule if you check "Reassign on timeout" and uncheck "allow agents to reject", chat is not reoffered to those agents it already offered the work item. Loading...

  17. Counting with GlideAggregate

    Update the Business Rule to Count by Caller. The addAggregate ('COUNT') in the script counts all records. The addAggregate method accepts a second parameter to count by a specific field. In this section, you update the script to count by caller_id. Every addAggregate has a corresponding getAggregate to get the value.

  18. Report for My Team for reassignments : r/servicenow

    ServiceNow recently replaced Remedy at a large decentralized organization. Many groups have their own IT assignment groups so tickets are passed to different assignment groups. Lots of requests for reports that include tickets that passed through "my" assignment group. Filtering the log we can easily see the times ticket was reassigned and even ...

  19. How to count the # of times assigned to field changes : r/servicenow

    UniAdept. •. If you are referring to a table with reassignment count - there you go. As for duration, you want the OOB Metric - Assignment Group Duration. Reply. [deleted] •. If the table / column are audited, you can query the audit log for this information pretty easily: var gr = new GlideRecord('sys_audit');

  20. Solved: Re-assignment Counter

    Re-assignment Counter. David Meredith May 16, 2021. Hi there, Reassignment count is an important metric for us to understand whether our issues are getting to the right resources first time or bouncing around so we can address and improve those areas. I expected this to be something available out of the box but I can't find anything.

  21. Service now reporting : r/servicenow

    From there, a funnel should appear to your right and select the funnel and create your conditions. For example, assignment group is Service Desk, opened between last 7 days and today, state is not cancelled, and reassignment count is 0. You can always change the opened date to fit your liking. That'll give you the basis to work with.

  22. Impact of ServiceNow's Reassignment Count on Employees Productivity

    Simultaneously, from an IT perspective, they will also lose around the same time per reassignment, then the cost will be between €70-100 per reassignment. In order to cut down these reassignment counts, the channels that are used should be simplified or made attractive for the end-users. Portals are the most hated channel amongst end-users.

  23. How to Reduce Ticket Reassignments in ServiceNow

    HappySignals for ServiceNow Global IT Experience Benchmark Report. Book a 30-min meeting to discuss your challenges and how Experience Management can help. Get in Touch. See how HappySignals Platform works. Watch Demo. Contact Sales. HappySignals Learning Center has everything you need to know about IT Experience Management and XLAs in the form ...