Home›Telecom›Revenue›Rating← All modules
Revenue · BSS module

Rating Module

The Rating module calculates the charge for every usage event — applying subscriber tariffs, discount packages and time-based rules to produce accurate per-event charges that feed directly into the monthly billing cycle.

Per-event Charge Calculation In-memory Rate Table Discount Engine Time-based Rate Selection Threshold Monitoring Real-time Action Engine
On this pageAt a glanceWhere AI helpsStandards

At a glance

Prices every usage event using the customer's tariff, discounts and allowances.

Key data

Rated eventTariff / rate tableDiscountAllowance bucket

Receives from

  • Mediation
  • Product catalog
  • Party & account
Rating

Sends to

  • Billing
  • Real-time actions
  • Usage enquiry

Rated Usage Event Types

Categories of usage events processed and charged by the Rating module

Domestic Voice
Standard outbound calls
Voice — IP
IP-based voice calls
Voice — PSTN
PSTN interconnect calls
International Voice
Outbound international calls
Roaming Voice
Voice while roaming abroad
Domestic SMS
Standard text messages
International SMS
Cross-border messaging
Data Usage
Mobile data consumption
Time-banded Voice
Time-banded call pricing

Rating Flow — End-to-End

How a usage event travels from the billing pipeline through rating to monthly charge storage

Mediation Pipeline
Delivers validated billing events via event bus
Event Bus
→
1
Bill Event Processor
Validates subscriber. Sends chargeable events to Rating Engine.
Data Store Internal API
→
2
Rating Orchestrator
Fetches subscriber profile. Applies rate table. Returns charge.
Data Store In-memory
→
3
Rate Processor
Evaluates centralised rate rules. Resolves applicable tariff and rate profile.
In-memory
→
4
Discount Engine
Checks active discount packages. Applies free-usage, zero-rate or reduced-rate rules.
Data Store In-memory
→
5
Usage Summary Store
The Bill Event Processor writes monthly voice, messaging and data usage summaries to data store.
Data Store
→
6
Index Processor
Publishes rated events to search store for usage queries and reporting.
Search Store Event Bus
Input
Validate
Orchestrate
Rate
Discount
Store
Index
Side branch
Real-Time Action Engine
Monitors roaming, data & top-up thresholds. Triggers notifications and service control.
Data Store Event Bus
← The Real-Time Action Engine listens to threshold events published by the Bill Event Processor. When a threshold is breached, it triggers a notification to the subscriber and, if applicable, initiates a service suspend or resume via the network element.

Charge Calculation Models

How the rating engine calculates the charge for each usage event

Standard Charge

Voice & SMS
charge = roundUp(duration / pulse) × rate
  • Duration in seconds from the usage record
  • Pulse: 30 or 60 seconds for Voice; 1 unit for SMS
  • Rate in local currency per pulse from rate table
  • Rate profile selected by: plan ID + charge type + call category + rating group
  • Date-range check applied — CDR date must fall within rate validity window

Time-banded Charge

Time-banded Voice
charge = initial_fee × rate
+ roundUp(duration / pulse) × rate
  • Call duration split across day / night / late-night / holiday periods
  • Each period uses its own pulse value
  • Pulse count = Σ(period_duration / period_pulse)
  • Holiday gains priority over regular time-bands
  • All time-banded events share a dedicated charge identifier

Discount & Zero-rate

Package-based reduction
if discount_eligible:
  adjusted_duration = duration − free_allowance
  charge = roundUp(adj / pulse) × rate
if unlimited_eligible:
  charge = 0
  • Free-usage allowance subtracted from duration before calculation
  • Unlimited option sets charge to zero for eligible call categories
  • Package eligibility checked against subscriber's active options
  • Date-range validation: CDR time must be within package validity
  • Adjusted duration returned to billing for storage

Rate Table — Lookup Key

How the rating engine identifies the correct tariff entry from the centralised rate table

Rate Table Lookup — Attributes Used
① Plan Identifier Subscriber's active tariff plan ID Fetched from subscriber profile in data store
② Charge Type ID Billing charge identifier from usage record Identifies the specific charge category (domestic, international, PSTN, etc.)
③ Call Category Call type from usage record Distinguishes originating / terminating, IP / circuit-switched, roaming
④ Rating Group Voice Messaging Data Determines the service class for rate lookup
⑤ Transaction Date CDR date must fall within rate validity window Supports historical and future rate changes in the same rate table entry
⑥ Result — Rate & Pulse Rate — charge per pulse in local currency Pulse — billing unit (seconds for voice, units for data/SMS)

Component Responsibilities

Detailed function of each service in the Rating module

Bill Event Processor

Stage 1 — Gateway & Validate
  • Receives billing events from Mediation pipeline via event bus
  • Validates subscriber identity and account status
  • Identifies chargeable vs zero-rated events
  • Sends chargeable events to Rating Orchestrator via internal API
  • Receives rated response and stores monthly usage summaries
  • Publishes rated, failed and duplicate events for downstream indexing
  • Manages late-arrival events in overflow documents

Rating Orchestrator

Stage 2 — Orchestrate & Rate
  • Receives rating requests from Bill Event Processor via internal API
  • Fetches subscriber profile from data store (plan, active options, dates)
  • Loads centralised rate table into memory at startup — no per-CDR DB reads
  • Invokes Rate Processor for tariff resolution and charge calculation
  • Invokes Discount Engine to check and apply active discount packages
  • Returns rated charge and adjusted duration to Bill Event Processor
  • Requires restart to pick up rate table configuration changes

Rate Processor

Stage 3 — Tariff Resolution
  • Resolves the applicable rate profile from the centralised rate table
  • Matches by plan ID, charge type, call category and rating group
  • Validates CDR transaction date against rate validity window
  • Supports multiple rate profiles per entry for historical rate changes
  • Applies standard formula: roundUp(duration / pulse) × rate
  • Applies time-banded formula for time-banded calls
  • Entirely in-memory — no database access during rating

Real-Time Action Engine

Side branch — Threshold & Control
  • Listens to threshold event channels on the async event bus
  • Monitors international roaming and intercontinental usage thresholds
  • Monitors data usage thresholds for over-limit notifications
  • Monitors top-up pack consumption status
  • Triggers subscriber notification via Notification Service
  • Initiates service suspend or resume via network control service
  • Creates and manages threshold state documents in data store

Storage & Persistence

How and where the Rating module stores its data

Subscriber Profile Store

Per-subscriber data
  • Active plan and tariff package details
  • Optional discount packages with validity dates
  • Subscriber balance where applicable
  • Read once per rating request; in-memory during processing

Rate Table (In-memory)

Centralised rating config
  • Loaded into memory at service startup
  • One entry per: plan + charge type + call category + rating group
  • Supports multiple rate profiles with validity date ranges
  • Requires service restart on configuration change

Monthly Usage Summary

Billing aggregates
  • Voice monthly usage summary per subscriber
  • Messaging monthly usage summary per subscriber
  • Data monthly usage aggregate per subscriber
  • Missed-billing overflow documents for late CDRs
  • Threshold state documents (roaming / data / top-up)

Async Event Bus Channels

Inter-service communication
  • Billing event input channels (from Mediation)
  • Rated events output channel
  • Failed / duplicate / missed event channels
  • Threshold alert channels (for the Real-Time Action Engine)

Design Principles

Key architectural decisions behind the Rating module

In-memory Rate Table

The entire centralised rate table is loaded into memory at startup. No database reads occur per CDR during rating, enabling very high throughput. Configuration changes require a controlled service restart to reload the table.

Date-range Rate Validity

Each rate profile carries a validity window (start date / end date). The CDR transaction date is checked against this window, allowing historical rates and future price changes to coexist in the same rate table without requiring schema changes.

Real-time Threshold Control

Threshold monitoring is decoupled from the main rating path via the async event bus. The Real-Time Action Engine reacts independently to threshold events, enabling service suspension and subscriber notification without impacting rating latency.

AI opportunity
Where AI helps
Tariff configuration checks

Detect rating results that differ from similar customers on the same plan.

Price optimisation

Simulate the revenue effect of tariff changes on real usage.

More in 30 AI & ML use cases and AIOps for BSS.

Key business processRerating Operations→
Standards & references
3GPP TS 32.299Diameter charging
3GPP TS 32.2915G charging service API
TMF635Usage Management API