GoRules Version 2 is here - redesigned, now with managed cloud.GoRules Version 2 is here!
Watch the launch videoWatchDynamic Tariff Engine
Rule-based pricing system for telecommunication services that automatically applies discounts based on user profiles, time periods, and location types.
Solution
This dynamic pricing engine for telecommunication services automatically applies appropriate tariffs based on multiple factors. The system differentiates between premium, business, and standard user accounts, applying specific discount rates for each service type (calls, data, and messaging). It factors in time sensitivity by adjusting rates for peak hours, off-peak periods, and weekends.
Location awareness is built into the pricing logic, with different rates for domestic usage versus international roaming. The system combines all applicable factors to calculate the final per-unit price and provides clear documentation of which specific pricing rules were applied to each transaction. This ensures transparent billing while maintaining flexible pricing that reflects both user loyalty status and usage patterns.
How it works
The decision graph processes telecommunications pricing through three key stages:
User Profile Analysis: Evaluates whether the user has premium, business, or standard status and applies appropriate service-specific multipliers (greater discounts for premium users).
Time and Location Assessment: Analyzes when and where the service is being used, applying different multipliers for domestic vs. roaming usage, and adjusting rates based on peak hours, off-peak periods, or weekends.
Tariff Calculation: Determines the base rate for the specific service (calls, data, or messaging), then combines all applicable multipliers to calculate the final per-unit price.
The system documents which specific rules were applied, creating a transparent audit trail for each pricing decision.
Where teams use it
- Mobile network operator billing systems
- MVNO (Mobile Virtual Network Operator) pricing
- Corporate telecommunications management
- International roaming charge calculation
- Prepaid service bundling
- Real-time billing for telecommunications services
Inside the decision model
Dynamic Tariff Engine ships as a JDM decision graph with 4 nodes, 2 decision tables and 15 rules. Download it, load it into GoRules, and run it as-is on Zen Engine.
Request
inputPricing starts from the raw request: userProfile, serviceType, timePeriod, and locationType drive every multiplier downstream, while usage, currency, userId, and timestamp pass through as billing context.
Sample requestJSON
{
"userProfile": "premium",
"serviceType": "calls",
"timePeriod": "peak",
"locationType": "domestic",
"currency": "EUR",
"usage": {
"amount": 15,
"unit": "minutes"
},
"userId": "USR123456",
"timestamp": "2025-03-20T14:30:00Z"
}User Profile Rules
tableLoyalty pricing is resolved by matching userProfile against serviceType with a first hit policy, so the eight rows are ordered from most to least specific. A 'premium' user gets a profileMultiplier of 0.8 on 'calls', 0.9 on 'data', and 0.7 on 'messaging'; 'business' accounts get 0.85, 0.8, and 0.6 respectively. The 'standard' row and the blank catch-all both return 1.0, and each row also emits profileRuleApplied, a human-readable label like 'Premium user call discount' for the audit trail.
Discounting per service rather than per account is standard carrier practice: messaging has near-zero marginal cost, so it carries the deepest cuts (0.7 and 0.6), while data discounts stay shallower because network capacity is the scarce resource. The 1.0 fallback rows guarantee the engine never fails to price a request, it just charges the undiscounted rate.
| User ProfileuserProfile | Service TypeserviceType | Profile MultiplierprofileMultiplier | Rule AppliedprofileRuleApplied |
|---|---|---|---|
| 'premium' | 'calls' | 0.8 | 'Premium user call discount' |
| 'premium' | 'data' | 0.9 | 'Premium user data discount' |
| 'premium' | 'messaging' | 0.7 | 'Premium user messaging discount' |
| 'business' | 'calls' | 0.85 | 'Business user call discount' |
| 'business' | 'data' | 0.8 | 'Business user data discount' |
| 'business' | 'messaging' | 0.6 | 'Business user messaging discount' |
+2 more rows in the downloadable template
Time Location Rules
tableCongestion and roaming premiums come from a second first-hit table that crosses timePeriod with locationType. Every 'roaming' row is a surcharge, from 1.5 at 'peak' down to 1.2 on 'weekend', while domestic usage swings both ways: 1.2 at peak, 0.9 'off-peak', and 0.8 on weekends. A blank final row returns a neutral 1.0 timeLocationMultiplier, and timeLocationRuleApplied records which band fired.
Time-of-day pricing is how operators shift discretionary usage away from busy-hour cells, so charging 1.2 at peak while rebating 0.8 on weekends is a classic load-shaping spread. Roaming never dips below 1.2 here because wholesale inter-operator charges apply regardless of when the visited network is used, so the carrier keeps a floor over its own cost.
| Time PeriodtimePeriod | Location TypelocationType | Time Location MultipliertimeLocationMultiplier | Rule AppliedtimeLocationRuleApplied |
|---|---|---|---|
| 'peak' | 'roaming' | 1.5 | 'Peak hour roaming surcharge' |
| 'peak' | 'domestic' | 1.2 | 'Peak hour domestic rate' |
| 'off-peak' | 'roaming' | 1.3 | 'Off-peak roaming rate' |
| 'off-peak' | 'domestic' | 0.9 | 'Off-peak domestic discount' |
| 'weekend' | 'roaming' | 1.2 | 'Weekend roaming rate' |
| 'weekend' | 'domestic' | 0.8 | 'Weekend domestic discount' |
+1 more row in the downloadable template
Calculate Final Tariff
expressionThe last step turns multipliers into money. baseTariff is picked per service, 0.05 per unit for 'calls', 0.02 for 'data', and 0.01 otherwise, then finalTariff multiplies it by profileMultiplier and timeLocationMultiplier from the two tables. currency falls back to 'USD' when the request omits it, and rulesSummary collects the base rate plus both applied-rule labels so every price can be explained line by line.
serviceType == 'calls' ? 0.05 : (serviceType == 'data' ? 0.02 : 0.01)$.baseTariff * profileMultiplier * timeLocationMultipliercurrency ?? 'USD'[`Base rate: ${$.baseTariff} per unit`, profileRuleApplied, timeLocationRuleApplied]Other Telco templates
View all templatesRegional Compliance Manager
Automated system that applies region-specific data privacy rules for telecommunications services across EU, US, UK, Canada, and Australia.
TelcoCustomer Eligibility Engine
Intelligent system that analyzes customer data to determine service upgrades, loyalty rewards, and premium features based on usage patterns and account history.
TelcoService Level Agreement Enforcement
Automated system that monitors telecommunication service levels, detects SLA violations, and triggers appropriate compensation and escalation responses.
Make this template
your own.
Load Dynamic Tariff Engine into GoRules, adjust the rules to your policy, and ship it behind your own API.