โ† Back to list
groeimetai

performance-analytics

by groeimetai

๐Ÿค– AI-powered ServiceNow development with 400+ MCP tools. Works with Claude, GPT, Gemini, Ollama & 75+ providers. Deploy widgets, manage incidents, automate workflows - all through natural language. Open-source Build Agent alternative.

โญ 42๐Ÿด 9๐Ÿ“… Jan 23, 2026

SKILL.md


name: performance-analytics description: This skill should be used when the user asks to "create indicator", "performance analytics", "PA", "KPI", "dashboard widget", "breakdown", "threshold", "scorecard", or any ServiceNow Performance Analytics development. license: Apache-2.0 compatibility: Designed for Snow-Code and ServiceNow development metadata: author: groeimetai version: "1.0.0" category: servicenow tools:

  • snow_pa_indicator_create
  • snow_pa_breakdown_create
  • snow_query_table
  • snow_find_artifact

Performance Analytics for ServiceNow

Performance Analytics (PA) provides advanced reporting and KPI tracking capabilities for measuring and improving business processes.

PA Architecture

Component Hierarchy

PA Dashboard
โ”œโ”€โ”€ Widgets
โ”‚   โ”œโ”€โ”€ Scorecard Widget
โ”‚   โ”œโ”€โ”€ Time Series Chart
โ”‚   โ”œโ”€โ”€ Breakdown Pie Chart
โ”‚   โ””โ”€โ”€ Single Score
โ”œโ”€โ”€ Indicators
โ”‚   โ”œโ”€โ”€ Number of Open Incidents
โ”‚   โ”œโ”€โ”€ Average Resolution Time
โ”‚   โ””โ”€โ”€ SLA Compliance Rate
โ”œโ”€โ”€ Breakdowns
โ”‚   โ”œโ”€โ”€ By Priority
โ”‚   โ”œโ”€โ”€ By Assignment Group
โ”‚   โ””โ”€โ”€ By Category
โ””โ”€โ”€ Thresholds
    โ”œโ”€โ”€ Critical: > 100
    โ””โ”€โ”€ Warning: > 50

Key Tables

TablePurpose
pa_indicatorsKPI definitions
pa_indicator_breakdownsIndicator-breakdown links
pa_breakdownsBreakdown definitions
pa_thresholdsThreshold rules
pa_widgetsDashboard widgets
pa_dashboardsDashboard containers

Indicators

Indicator Types

TypeAggregationExample
CountCOUNT(*)Number of incidents
SumSUM(field)Total cost
AverageAVG(field)Avg resolution time
Percentage(A/B)*100SLA compliance %
DurationTime calculationAvg time to resolve

Creating Count Indicator (ES5)

// Create "Open Incidents" indicator
var indicator = new GlideRecord('pa_indicators');
indicator.initialize();
indicator.setValue('name', 'Open Incidents');
indicator.setValue('description', 'Number of currently open incidents');

// Source configuration
indicator.setValue('cube', 'pa_cubes_incident');  // or table-based
indicator.setValue('facts_table', 'incident');
indicator.setValue('conditions', 'active=true');

// Aggregation
indicator.setValue('aggregate', 'COUNT');  // COUNT, SUM, AVG

// Display settings
indicator.setValue('direction', 2);  // 1=Up is good, 2=Down is good
indicator.setValue('unit', 'Incidents');
indicator.setValue('precision', 0);  // Decimal places

// Scoring
indicator.setValue('frequency', 'daily');

indicator.insert();

Creating Average Indicator (ES5)

// Create "Average Resolution Time" indicator
var indicator = new GlideRecord('pa_indicators');
indicator.initialize();
indicator.setValue('name', 'Avg Resolution Time');
indicator.setValue('description', 'Average time to resolve incidents');

indicator.setValue('facts_table', 'incident');
indicator.setValue('conditions', 'state=6');  // Resolved

// Aggregation on duration
indicator.setValue('aggregate', 'AVG');
indicator.setValue('field', 'calendar_duration');  // Duration field

// Time unit
indicator.setValue('unit', 'Hours');
indicator.setValue('unit_conversion', 3600);  // Seconds to hours

indicator.setValue('direction', 2);  // Lower is better
indicator.setValue('frequency', 'daily');

indicator.insert();

Creating Percentage Indicator (ES5)

// Create "SLA Compliance" percentage indicator
var indicator = new GlideRecord('pa_indicators');
indicator.initialize();
indicator.setValue('name', 'SLA Compliance Rate');
indicator.setValue('description', 'Percentage of incidents meeting SLA');

indicator.setValue('facts_table', 'task_sla');
indicator.setValue('conditions', 'task.sys_class_name=incident');

// Formula-based percentage
indicator.setValue('aggregate', 'FORMULA');
indicator.setValue('formula', '(COUNT(has_breached=false) / COUNT(*)) * 100');

indicator.setValue('unit', '%');
indicator.setValue('direction', 1);  // Higher is better
indicator.setValue('precision', 1);

indicator.insert();

Breakdowns

Common Breakdowns

BreakdownFieldUse Case
PrioritypriorityIncidents by P1/P2/P3
CategorycategoryIncidents by type
Groupassignment_groupTeam performance
LocationlocationGeographic analysis
Timeopened_atTrend analysis

Creating Breakdown (ES5)

// Create "Priority" breakdown
var breakdown = new GlideRecord('pa_breakdowns');
breakdown.initialize();
breakdown.setValue('name', 'Priority');
breakdown.setValue('description', 'Breakdown by incident priority');

breakdown.setValue('facts_table', 'incident');
breakdown.setValue('dimension_field', 'priority');

// Sorting
breakdown.setValue('sort_field', 'priority');
breakdown.setValue('sort_order', 'ASC');

// Element mapping (optional)
breakdown.setValue('use_element_mapping', true);

breakdown.insert();

Linking Breakdown to Indicator (ES5)

// Link breakdown to indicator
var link = new GlideRecord('pa_indicator_breakdowns');
link.initialize();
link.setValue('indicator', indicatorSysId);
link.setValue('breakdown', breakdownSysId);
link.setValue('active', true);
link.insert();

Thresholds

Creating Thresholds (ES5)

// Create threshold for Open Incidents
var threshold = new GlideRecord('pa_thresholds');
threshold.initialize();
threshold.setValue('indicator', indicatorSysId);
threshold.setValue('name', 'Critical Level');

// Threshold conditions
threshold.setValue('operator', '>=');  // >=, <=, =, >, <
threshold.setValue('value', 100);

// Visual styling
threshold.setValue('color', 'red');
threshold.setValue('icon', 'exclamation-circle');

// Notification
threshold.setValue('notification_user', adminSysId);
threshold.setValue('notification_script', thresholdScript);

threshold.insert();

// Add warning threshold
var warning = new GlideRecord('pa_thresholds');
warning.initialize();
warning.setValue('indicator', indicatorSysId);
warning.setValue('name', 'Warning Level');
warning.setValue('operator', '>=');
warning.setValue('value', 50);
warning.setValue('color', 'orange');
warning.insert();

Widgets

Widget Types

TypeUse CaseShows
Single ScoreCurrent value"127 Open Incidents"
ScorecardValue + trendCurrent + sparkline
Time SeriesTrend over timeLine/bar chart
BreakdownBy dimensionPie/bar chart
ComparisonMultiple indicatorsSide-by-side

Creating Widget (ES5)

// Create scorecard widget
var widget = new GlideRecord('pa_widgets');
widget.initialize();
widget.setValue('name', 'Open Incidents Scorecard');
widget.setValue('type', 'scorecard');

// Indicator
widget.setValue('indicator', indicatorSysId);

// Time range
widget.setValue('time_range', 'last_30_days');
widget.setValue('show_trend', true);
widget.setValue('compare_to', 'previous_period');

// Display
widget.setValue('show_breakdown', true);
widget.setValue('breakdown', priorityBreakdownSysId);
widget.setValue('chart_type', 'bar');

widget.insert();

Dashboards

Creating Dashboard (ES5)

// Create PA Dashboard
var dashboard = new GlideRecord('pa_dashboards');
dashboard.initialize();
dashboard.setValue('name', 'Incident Management Dashboard');
dashboard.setValue('description', 'Key metrics for incident management');

// Layout
dashboard.setValue('layout', '2-column');

// Access control
dashboard.setValue('public', true);
dashboard.setValue('owner', gs.getUserID());

var dashboardSysId = dashboard.insert();

// Add widgets to dashboard
function addWidgetToDashboard(dashboardId, widgetId, row, column) {
    var placement = new GlideRecord('pa_dashboard_widgets');
    placement.initialize();
    placement.setValue('dashboard', dashboardId);
    placement.setValue('widget', widgetId);
    placement.setValue('row', row);
    placement.setValue('column', column);
    placement.insert();
}

addWidgetToDashboard(dashboardSysId, openIncWidget, 0, 0);
addWidgetToDashboard(dashboardSysId, avgTimeWidget, 0, 1);
addWidgetToDashboard(dashboardSysId, slaWidget, 1, 0);

Data Collection

Manual Score Collection (ES5)

// Collect scores for an indicator
var job = new PAScoreCollector();
job.collectIndicatorScores(indicatorSysId);

Scheduled Collection

// PA uses scheduled jobs for data collection
// Default: Daily at midnight
// Configure via: Performance Analytics > Data Collection > Jobs

MCP Tool Integration

Available PA Tools

ToolPurpose
snow_create_pa_indicatorCreate indicator
snow_create_pa_breakdownCreate breakdown
snow_create_pa_thresholdCreate threshold
snow_create_pa_widgetCreate widget
snow_get_pa_scoresRetrieve scores
snow_collect_pa_dataTrigger collection
snow_discover_pa_indicatorsFind indicators

Example Workflow

// 1. Create indicator
var indicatorId = await snow_create_pa_indicator({
    name: 'Open P1 Incidents',
    table: 'incident',
    conditions: 'active=true^priority=1',
    aggregate: 'COUNT',
    direction: 'down_is_good'
});

// 2. Create breakdown
var breakdownId = await snow_create_pa_breakdown({
    name: 'By Assignment Group',
    table: 'incident',
    field: 'assignment_group'
});

// 3. Link breakdown
await snow_create_pa_indicator_breakdown({
    indicator: indicatorId,
    breakdown: breakdownId
});

// 4. Create threshold
await snow_create_pa_threshold({
    indicator: indicatorId,
    operator: '>=',
    value: 10,
    color: 'red'
});

// 5. Create widget
await snow_create_pa_widget({
    name: 'P1 Incidents Scorecard',
    type: 'scorecard',
    indicator: indicatorId,
    breakdown: breakdownId
});

// 6. Get current scores
var scores = await snow_get_pa_scores({
    indicator: indicatorId,
    time_range: 'last_30_days'
});

Best Practices

  1. Direction Matters - Set correctly (up/down is good)
  2. Meaningful Thresholds - Based on business requirements
  3. Consistent Frequency - Match data volatility
  4. Use Breakdowns - Enable drill-down analysis
  5. Dashboard Purpose - One focus per dashboard
  6. Trend Analysis - Always show comparison
  7. Performance - Limit active indicators
  8. Documentation - Clear indicator descriptions

Score

Total Score

75/100

Based on repository quality metrics

โœ“SKILL.md

SKILL.mdใƒ•ใ‚กใ‚คใƒซใŒๅซใพใ‚Œใฆใ„ใ‚‹

+20
โœ“LICENSE

ใƒฉใ‚คใ‚ปใƒณใ‚นใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+10
โœ“่ชฌๆ˜Žๆ–‡

100ๆ–‡ๅญ—ไปฅไธŠใฎ่ชฌๆ˜ŽใŒใ‚ใ‚‹

+10
โ—‹ไบบๆฐ—

GitHub Stars 100ไปฅไธŠ

0/15
โœ“ๆœ€่ฟ‘ใฎๆดปๅ‹•

1ใƒถๆœˆไปฅๅ†…ใซๆ›ดๆ–ฐ

+10
โ—‹ใƒ•ใ‚ฉใƒผใ‚ฏ

10ๅ›žไปฅไธŠใƒ•ใ‚ฉใƒผใ‚ฏใ•ใ‚Œใฆใ„ใ‚‹

0/5
โœ“Issue็ฎก็†

ใ‚ชใƒผใƒ—ใƒณIssueใŒ50ๆœชๆบ€

+5
โœ“่จ€่ชž

ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐ่จ€่ชžใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5
โœ“ใ‚ฟใ‚ฐ

1ใคไปฅไธŠใฎใ‚ฟใ‚ฐใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5

Reviews

๐Ÿ’ฌ

Reviews coming soon