Skip to content

Conversation

@spnegi
Copy link
Contributor

@spnegi spnegi commented Oct 7, 2025

PR Description:

Find out all the cases with the difference in their create date and current date and put them in different buckets of their age. Then you can report on the aging. With this you will be able to run the Bucket Group reporting on tables without using PA.

In ServiceNow Performance Analytics (PA), a Bucket Group is used to categorize or group data into defined ranges or segments, which helps make reports and indicators more meaningful and easier to analyze. This code will help you to categorize the tickets based on any defined ranges or segments you want. Based on this defined ranges or segments you can get any king of reporting without using PAs in ServiceNow.

This code lets you create custom ranges (buckets) to classify numerical data (like durations, scores, or counts) into meaningful labels.For example, instead of showing raw numbers like 2, 7, 14, 30 days, you can define buckets such as:

0–5 days → “Very Fast”

6–10 days → “Fast”

11–20 days → “Average”

20 days → “Slow”

Then, these labels can be displayed in your dashboards, or reports, making the data easier to interpret.

Real time user cases:

Score or metric segmentation Divide customer satisfaction scores into Low, Medium, High ranges.

Priority or risk scoring Convert numeric risk scores into descriptive ranges (Low Risk, Medium Risk, High Risk).

Also, SLA uses the tickets to be defined in SLA number or breach date. It doesnt let you define any segment or categorize the data. It helps you define the reporting basis on your category or segment

Pull Request Checklist

Overview

  • I have read and understood the CONTRIBUTING.md guidelines
  • My pull request has a descriptive title that accurately reflects the changes
  • I've included only files relevant to the changes described in the PR title and description
  • I've created a new branch in my forked repository for this contribution

Code Quality

  • My code is relevant to ServiceNow developers
  • My code snippets expand meaningfully on official ServiceNow documentation (if applicable)
  • I've disclosed use of ES2021 features (if applicable)
  • I've tested my code snippets in a ServiceNow environment (where possible)

Repository Structure Compliance

  • I've placed my code snippet(s) in one of the required top-level categories:
    • Core ServiceNow APIs/
    • Server-Side Components/
    • Client-Side Components/
    • Modern Development/
    • Integration/
    • Specialized Areas/
  • I've used appropriate sub-categories within the top-level categories
  • Each code snippet has its own folder with a descriptive name

Documentation

  • I've included a README.md file for each code snippet
  • The README.md includes:
    • Description of the code snippet functionality
    • Usage instructions or examples
    • Any prerequisites or dependencies
    • (Optional) Screenshots or diagrams if helpful

Restrictions

  • My PR does not include XML exports of ServiceNow records
  • My PR does not contain sensitive information (passwords, API keys, tokens)
  • My PR does not include changes that fall outside the described scope

@Atul-LNG Atul-LNG self-assigned this Oct 7, 2025
@Atul-LNG Atul-LNG merged commit 7639951 into ServiceNowDevProgram:main Oct 7, 2025
2 checks passed
@Atul-LNG
Copy link
Contributor

Atul-LNG commented Oct 7, 2025

Hi @spnegi

Thanks for your contribution! I’ve reviewed your submission and can see that you've addressed all the previous comments — including the clarifications in the current PR, the updated README, and comments in the JS file.

I'm happy to approve this. Keep contributing, and do encourage your colleagues to participate in Hacktoberfest as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants