---
sourceDocument: Brazil Telecommunications Service Operations Management
sourceDocumentLink: https://www.servicenow.com/docs/r/telecom-service-ops

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Telecommunications Service Operations Management

ft:clusterId :

    - tsom

bundleId :

    - tsom

workflow :

    - Customer and Industry


---

# Metric aggregation scripted extension

# Metric aggregation scripted extension {#ariaid-title1}

Release version: Brazil  
Updated November 5, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
You can define custom KPI calculations on top of raw metrics collected from source systems. Configurable formulas combine, aggregate, and label metrics without requiring code changes to the platform.

By default, TSOM Assurance collects raw metrics from pull connectors and publishes them as-is. The metric aggregation scripted extension provides an extension point on the aggregation script, allowing you to implement custom
logic that derives KPIs from those raw metrics. One or more KPIs can be calculated from a single metric value, and KPI definitions can be added, updated, or deleted on demand without redeployment.

## Key capabilities {#metric-aggregation-scripted-extension__section_capabilities}

Configurable formulas
:   Define KPIs using mathematical expressions that combine one or more raw or already-transformed metrics. Formulas are vendor-agnostic and can be conditioned on resource attributes such as vendor or software
    version.

Temporal aggregation
:   Apply aggregation operators over a configured time period to produce a single derived value per metric. Supported operators are `avg`, `max`, `min`, and
    `p95`. Supported periods are 5 minutes, 15 minutes, and 1 hour.

Spatial aggregation
:   Aggregate the same KPI or metric across multiple resources that match a filter criterion based on metric or resource attributes. The supported aggregate functions are `avg`, `sum`,
    `max`, `min`, `count`, and `p95`.

User-defined labels
:   Attach custom labels to calculated KPIs to support downstream categorization, routing, or display logic.

Formula error handling
:   When a formula can't be evaluated (for example, due to a division by zero or missing input metric), the system generates an error code for that KPI. This prevents values from being discarded without notification.

## Implementation {#metric-aggregation-scripted-extension__section_implementation}

The extension point is implemented using the sn_tsom_em_conns.TSOMMetricAggregatorSEP scripted extension point. To create a custom implementation, navigate to AllSystem Scripted Extension PointsScripted Extension Points and search for sn_tsom_em_conns.TSOMMetricAggregatorSEP. Select Create implementation and define your KPI formulas in the script body.

KPI definitions, including formulas and resource attribute filters, can be configured and managed independently. Add, update, or delete definitions to adapt KPI coverage as your network environment changes.

*[\>]: and then


