The Regional Margin Variance Agent identifies customers whose average margin significantly underperforms compared to the typical margin within their region, helping uncover hidden margin leakage across the customer portfolio. It quantifies the potential margin uplift if these underperforming customers were brought in line with their region's lower quartile, enabling prioritized margin recovery.
List of Required Fields
The following table lists the set of transaction fields required for the Regional Margin Variance Agent to compute its metrics and detection rules. Ensure these fields or equivalent are available and consistently populated in your source Transaction Datamart before deploying the Agent. Those exact field names are not required, but a similar fields with that data is required.
|
Name |
Label |
Description |
|---|---|---|
|
CustomerId |
Customer Id |
A unique identifier for the customer account. |
|
CustomerName |
Customer Name |
The display name of the customer account. |
|
GrossMargin |
Gross Margin |
The absolute margin in value terms (Revenue minus Cost of Goods Sold), before overhead allocation. |
|
InvoicePrice |
Invoice Price |
The price actually charged to the customer on the invoice. The realized transaction price. |
|
PricingDate |
Pricing Date |
The date on which the transaction or pricing event occurred. |
|
ProductGroup |
Product Group |
A category grouping products by type, business line, or market segment. |
|
Region |
Region |
The geographic region associated with the customer or transaction, used for regional variance and benchmarking analysis. |
Definition
Series 1 (Revenue and Margin by Customer and Region)
|
Item |
Value |
Description |
|---|---|---|
|
Data Label |
Revenue and Margin by Customer and Region |
Sets a label (name) of the Series 1 data series (data set). Data label can be freely customized and renamed according to your preferences. |
|
Data Source |
[DM] Standard Sales Data (Standard_Sales_Data) |
Selected Transaction Datamart. For more information see Required Customer Data. |
|
Currency |
USD |
Defines which currency the money data will be converted into. |
Group By
|
Group By |
Level |
|---|---|
|
Customer Id |
Level 1 |
|
Customer Name |
Level 2 |
|
Region |
Level 3 |
|
Product Group |
Level 4 |
The specific field names may vary depending on the set of fields in your source Transaction Datamart. The selected fields will be utilized to establish the grouping hierarchy in the Summary Table of the Current Period Series. For additional information about grouping, see the Group section
Measures
|
Measure |
Label |
Aggregation |
Name |
Description |
|---|---|---|---|---|
|
Invoice Price |
Revenue |
∑ |
Revenue |
The aggregated sum of invoice price for all included transactions per customer, region, and product group. |
|
Gross Margin |
Profit |
∑ |
Profit |
The total gross margin amount per customer, region, and product group, calculated as the difference between realized price and cost for all transactions. |
|
Gross Margin |
Avg Margin % |
{ } |
AvgMarginPct |
The customer's average margin rate, computed as total gross margin divided by total revenue (invoice price). |
The specific measures may vary depending on the set of fields in your source Transaction Datamart.
Filters
Filters are criteria applied to transactional data to ensure only valid records are analyzed, commonly excluding zero-value transactions and constraining invoice dates using relative ranges computed from a configurable anchor date, specified as N months ago.
Example
This generic filter restricts the dataset to transactions whose Pricing Date falls within the last three months relative to the configured anchor date.
Pricing Date > custom N months ago 3 (1/22/2026)
Summary Table
|
Customer Id |
Customer Name |
Region |
Product Group |
Revenue |
Profit |
Avg Margin % |
|---|---|---|---|---|---|---|
|
CID-0001 |
Stanley Linda CPA US Global customer CA |
California |
Electrical Protection and Control |
393846.07745977 |
51667.8504098185 |
0.131187926875052 |
|
CID-0001 |
Stanley Linda CPA US Global customer CA |
California |
Home Automation |
268674.471552136 |
21338.367739156 |
0.0794208977722519 |
-
Customer Id – The top-level grouping dimension selected in the Group By definition. Rows are organized by Customer Id.
-
Customer Name – The customer name used as the next grouping level within the table hierarchy.
-
Region – The geographic region associated with the customer or transaction, used for regional variance and benchmarking analysis.
-
Product Group – A category grouping products by type, business line, or market segment.
-
Revenue – The aggregated sum of invoice price for all included transactions in the selected period.
-
Profit – The total profit earned, calculated as the difference between the realized price and the cost for all transactions.
-
Avg Margin % – The customer’s weighted average margin rate, computed as total margin divided by total revenue.
Series 2 (Avg Margin by Region and Product Group)
|
Item |
Value |
Description |
|---|---|---|
|
Data Label |
Avg Margin by Region and Product Group |
Sets a label (name) of the Series 2 data series (data set). Data label can be freely customized and renamed according to your preferences. |
|
Data Source |
[DM] Standard Sales Data (Standard_Sales_Data) |
Selected Transaction Datamart. For more information see Required Customer Data. |
|
Currency |
USD |
Defines which currency the money data will be converted into. |
Group By
|
Group By |
Level |
|---|---|
|
Product Group |
Level 1 |
|
Region |
Level 2 |
Measures
|
Measure |
Label |
Aggregation |
Name |
Description |
|---|---|---|---|---|
|
Gross Margin |
Avg Margin % |
{ } |
AvgMarginPct |
The region/product group’s weighted average margin rate, calculated as total gross margin divided by total revenue across all customers in that combination. |
|
Gross Margin |
Standard Deviation Margin % |
{ } |
STDmarginRate |
The standard deviation of margin rates within the region/product group, showing how widely individual customer margins vary around the group average. |
|
Gross Margin |
IQR Margin % |
{ } |
IQRmarginRate |
The interquartile range (IQR) of margin rates within the region/product group, measuring the spread of the middle 50% of margin values between the first and third quartiles. |
|
Gross Margin |
Quartile 1 Margin% |
{ } |
FirstQuartileMarginRate |
The first quartile (Q1) of margin rates in the region/product group, the value below which 25% of customer margin rates fall. |
|
Gross Margin |
Quartile 3 Margin % |
{ } |
ThirdQuartileMarginRate |
The third quartile (Q3) of margin rates in the region/product group, the value below which 75% of customer margin rates fall. |
Filters
Filters are criteria applied to transactional data to ensure only valid records are analyzed, commonly excluding zero-value transactions and constraining invoice dates using relative ranges computed from a configurable anchor date, specified as N months ago.
Example
This filter restricts the dataset to recent transactions (last three months) with a positive, non-null invoice price, so that regional margin distributions are based on meaningful, billable records.
(Pricing Date > custom N months ago 3 (1/22/2026)) AND (Invoice Price > 0) AND (Invoice Price ≠ null)
Summary Table
|
Product Group |
Region |
Avg Margin % |
Standard Deviation Margin % |
IQR Margin % |
Quartile 1 Margin% |
Quartile 3 Margin % |
|---|---|---|---|---|---|---|
|
Electrical Protection and Control |
Aargau |
0.104716850837341 |
0.0718073806363399 |
0.108581126936189 |
0.0485134800865141 |
0.157094607022703 |
|
Electrical Protection and Control |
Aquitaine |
0.164468158932022 |
0.0608876497938826 |
0.0723329601941648 |
0.133402912588362 |
0.205735872782527 |
-
Product Group – The top-level grouping dimension that organizes the benchmark rows by product category.
-
Region – The geographic region used as the secondary grouping level to establish a regional benchmark per product group.
-
Avg Margin % – The region/product group’s weighted average margin rate, used as a benchmark in variance analyses.
-
Standard Deviation Margin % – The standard deviation of customer-level margin rates, indicating dispersion around the group average.
-
IQR Margin % – The interquartile range of margin rates, capturing the spread of the middle 50% of margin values within the group.
-
Quartile 1 Margin% – The first quartile (Q1) margin rate, below which 25% of customer margin rates in the group fall.
-
Quartile 3 Margin % – The third quartile (Q3) margin rate, below which 75% of customer margin rates in the group fall.
Join Series (Join Series)
|
Item |
Value |
Description |
|---|---|---|
|
Data Label |
Join Series |
Sets a label (name) of the Join Series data series (data set). The label can be freely customized and renamed according to your preferences. |
Definition
Set up the relationship between the series by mapping the matching data columns/dimensions that you would like to include in the definition.
|
Series |
Dimension |
Series |
Dimension |
|---|---|---|---|
|
Revenue and Margin by Customer and Region |
Product Group |
Avg Margin by Region and Product Group |
Product Group |
|
Revenue and Margin by Customer and Region |
Region |
Avg Margin by Region and Product Group |
Region |
Measures
|
Label |
Description |
|---|---|
|
MarginVarianceToMinimum |
The difference between a customer’s margin rate and a regional lower-bound benchmark (based on Q1 and IQR), quantifying how far the customer falls below the “clear outlier” threshold in their region and product group. |
|
Margin Uplift |
The potential profit uplift for a customer if their margin rate were increased to the midpoint between their current margin rate and the regional benchmark margin rate. |
|
Revenue |
The aggregated sum of invoice price for all included transactions, taken from Series 1. |
|
MarginLiftPotentialPct |
The potential profit uplift (percentage) per customer if their margin rate were raised to the relevant regional benchmark. |
|
Revenue Uplift |
The estimated additional profit that could be realized if the customer’s margin rate were improved toward the regional benchmark. |
|
Current Margin % |
The weighted gross margin percentage for the current period, computed as total gross margin divided by total revenue (invoice price). |
|
Suggested Margin % |
The recommended interim margin rate set at the midpoint between the current margin rate and the regional benchmark/target margin rate. |
|
Segment Average Margin % |
The weighted average gross margin rate for a given region/product group over the selected period, used as the benchmark in variance and uplift analyses. |
Summary Table
|
Customer Id |
Customer Name |
Region |
Product Group |
MarginVarianceToMinimum |
Margin Uplift |
Revenue |
MarginLiftPotentialPct |
Revenue Uplift |
Current Margin % |
Suggested Margin % |
Segment Average Margin % |
|---|---|---|---|---|---|---|---|---|---|---|---|
|
CID-0073 |
Paddy Co |
Aargau |
Electrical Protection and Control |
-0.219075061155111 |
2.88603944861544e-17 |
43009.6015225001 |
6.4079670662136e-21 |
2.88603944861544e-17 |
0.104716850837341 |
0.104716850837341 |
0.104716850837341 |
|
CID-0089 |
Brennus AMAS Bordeaux |
Aquitaine |
Electrical Protection and Control |
-0.139564686634907 |
1.3665866513338e-16 |
152749.35347218 |
5.4397126962979e-21 |
1.3665866513338e-16 |
0.164468158932022 |
0.164468158932022 |
0.164468158932022 |
Detection Rules
Detection Rules defines the Agent’s alert conditions and includes scheduling. When conditions are met, actions are triggered during the next Agent run.
Example
Customers whose margin rate clearly underperforms their regional benchmark are flagged as detected items.
|
Series |
Rules |
|---|---|
|
Join Series (Join Series) |
|
Schedule
Set the preferred start date and frequency that you want the Agent to run.
Example
This rule creates a recurring monthly schedule.
|
Start Date |
Period |
Interval |
|---|---|---|
|
4/22/2026 11:40 AM |
Month |
1 |
Start Date – The date when the scheduled task will run for the first time.
Period – Period which represents the offset between each run.
Interval – Interval which represents the number of repetitions in a selected period. Allowed characters are 0-9. 0 means one-off run.
Action Definition
Notifications assigned to specific users (The assignment must be made to a genuine system user). For more information see Action Definition.
Example
|
Summary |
Description |
Due Date |
Assign to |
|---|---|---|---|
|
Regional Margin Variance Agent |
Identify customers and product group with low margin rate versus region variance. |
in 1 Month |
|
Similar Case Handling
-
Period – Defines the time period between potential similar action. Similar case will not be recreated before the defined period. Time unit for the duplicate-prevention window.
-
Interval – Number of periods between similar actions. Similar case will not be recreated before the defined interval. Prevents creating a very similar case for the same context within the defined interval.
Example
Prevents creating a very similar case for the same context within a 3-month period.
|
Item |
Value |
|---|---|
|
Period |
Month |
|
Interval |
3 |
Impact Calculation
You can define specific metrics to compute the foreseen impact of the actions. Please only use total absolute value (and not relative values) as those metrics will be aggregated.
Impact Definition
|
Measure |
Impact Type |
Realization Rate (%) |
Order |
|---|---|---|---|
|
Revenue Uplift |
Revenue |
50 |
1 |
|
Margin Uplift |
Profit |
40 |
2 |
-
Revenue Uplift – Expected realized portion (50%) of the theoretical revenue uplift estimated by the Join Series.
-
Margin Uplift – Expected realized portion (40%) of the theoretical margin uplift estimated by the Join Series.
Summary
Review the setup of the Agent, here you can see all the set parameters in one place.
If you are happy with the setup, click Submit for Approval. Once the Agent is approved, it becomes active and starts monitoring your data based on the schedule.
Review the final results in the Summary step.