Margin Shortfall Agent (Reference)

The Margin Shortfall Agent identifies customers from transactions with significant revenue but suboptimal margins, also called margin shortfall.

List of Required Fields

The following table lists the set of transaction fields required for the Margin Shortfall 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

BaseQty

Base Qty

The quantity used as a reference for volume-based pricing or rebate calculations.

CalculatedRebate

Calculated Rebate

The rebate amount computed for a customer based on volume, agreements, or pricing rules. Reduces effective margin when not accounted for in the price.

CustomerId

Customer Id

A unique identifier for the customer account.

CustomerName

Customer Name

The display name of the customer account.

Customer_Group

Customer Group

A broader grouping of customers, typically reflecting corporate hierarchy or regional alignment.

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.

Quantity

Quantity

The number of units sold or transacted in the given period.

Definition

Series (1 Revenue and Margin by Customer and Product Group)

Item

Value

Description

Data Label

Revenue and Margin by Customer and Product Group

Sets a label (name) of the Series1 data series (data set). Data label can be freely customized and renamed according to your preferences.

Data Source

[DM] Transactions (Transactions)

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

Product Group

Level 3

Customer Segment

Level 4

Measures

Measure

Label

Aggregation

Name

Description

Invoice Price

Revenue

Revenue

The aggregated sum of invoice price for all included transactions.

Gross Margin

Profit

Profit

The difference between the realized price and the cost.

Gross Margin

Avg Margin %

{ }

AvgMarginPct

The weighted gross margin rate.

Invoice Price

Revenue Rank

{ }

RevenueRank

The customer’s position when customers are sorted by revenue contribution within the selected group. For more information see Revenue Rank.

Gross Margin

Margin Rank

{ }

MarginRank

The customer’s position when customers are sorted by margin rate or margin contribution within the selected group. More information see Margin Rank.

The specific measures may vary depending on the set of fields in your source Transaction Datamart.

Filters

The filter configuration constrains the dataset to recent transactions and to those whose aggregated prices surpass a defined minimum level.

  • Retains only transactions with an invoice date within a recent, configurable period.

  • Excludes records with zero or missing invoice price, margin, product group, or quantity.

  • Ensures that only transactions with complete and meaningful data are analyzed, supporting accurate and consistent results.

Example
(Invoice Date >= custom N months ago 3 (08/09/2025)) AND (Invoice Price > 0) AND (Margin is not null) AND (Product Group is not null) AND (Quantity > 0) 

Summary Table

Customer Id

Customer Name

Product Group

Customer Segment

Revenue

Profit

Avg Margin %

Revenue Rank

Margin Rank

D-0001

Mahle GmbH

Auto Exterior

Cooling

800143.051

216440.992

0.27050287

0.867945824

0.862302483

D-0002

Denso Corp

Auto Exterior

Cooling

947190.967

263759.496

0.278464962

0.906320542

0.913092551

D-0003

Hanon Systems

Engine

Cooling

723429.299

200225.608

0.276772877

0.841986456

0.844243792

  • Customer Id – The top-level grouping dimension selected in the Group By definition.

  • Customer Name – The customer name shown for readability within each grouped row.

  • Product Group – A grouping dimension from the Transaction Datamart used to organize rows by product hierarchy.

  • Customer Segment – Customer Segment is included as the Level 4 grouping dimension.

  • Revenue – The aggregated sum of invoice price for all included transactions (per the relevant period/series).

  • Profit – The aggregated gross margin (difference between realized price and cost).

  • Avg Margin % – The weighted gross margin rate.

  • Revenue Rank – The customer’s position when customers are sorted by revenue contribution within the selected group.

  • Margin Rank – The customer’s position when customers are sorted by margin rate or margin contribution within the selected group.

The specific field names can vary by the source Transaction Datamart. The selected Group By fields define the table’s grouping hierarchy, while the measures determine which aggregated metrics appear as columns.

Series 2 (Avg Margin by Product Group)

Group By

Group By

Level

Product Group

Level 1

Measures

Measure

Label

Aggregation

Name

Description

Gross Margin

Avg Margin %

{ }

AvgMarginPct

The weighted gross margin rate.

Filters

Example
(Invoice Date >= custom N months ago 3 (08/09/2025)) AND (Invoice Price > 0) AND (Margin is not null) AND (Product Group is not null) AND (Quantity > 0)

Summary Table

Product Group

Avg Margin %

AC

0.248474458

Cooling

0.275944011

Join Series (Join Series)

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 Product Group

Product Group

Avg Margin by Product Group

Product Group

The specific measures may vary depending on the set of fields in your source Transaction Datamart.

Summary Table

customerId [Revenue and Margin by Customer and Product Group]

Name [Revenue and Margin by Customer and Product Group]

Product Group [Revenue and Margin by Customer and Product Group]

Customer Segment [Revenue and Margin by Customer and Product Group]

RevenueRank

MarginRank

MarginVariance

MarginLiftPotential

Revenue

MarginLiftPotentialPct

Current Margin Rate

Suggested margin Rate

Reference Margin Rate

Revenue Uplift

D-0001

Mahle GmbH

Auto Exterior

Cooling

0.867945824

0.862302483

0.006785883

2714.838448

800143.051

0.012543088

0.27050287

0.273895812

0.277288753

2714.838448

D-0002

Denso Corp

Auto Exterior

Cooling

0.906320542

0.913092551

-0.001176208

-557.0469944

947190.967

-0.00211195

0.278464962

0.277876857

0.277288753

-557.0469944

D-0003

Denso Corp

Auto Exterior

Cooling

0.906320542

0.913092551

-0.001176208

-557.0469944

947190.967

-0.00211195

0.278464962

0.277876857

0.277288753

-557.0469944

  • Margin Variance – The difference between a customer’s average margin percentage and the relevant benchmark.

  • Margin Lift Potential – The potential profit uplift per customer and product group if their margin rate were improved to the midpoint between their current margin percentage and the product group average.

  • Margin Lift Potential Pct – The potential profit uplift (percentage) per customer and product group if their margin rate were raised to the product group average.

  • Suggested Margin Rate – The recommended target margin percentage for a customer and product group, calculated as the midpoint between the customer’s current average margin percentage and the product group average margin percentage.

  • Reference Margin Rate – The benchmark margin percentage for a product group, calculated as the weighted average gross margin rate across all transactions within that product group for the selected period.

  • Revenue Uplift – The potential profit uplift per customer and product group if their margin rate were improved to the midpoint between their current average margin percentage and the product group average margin percentage.

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.

This Detection Rule defines a minimum‑margin policy. It flags any evaluated row in the selected series where the weighted gross margin rate falls below a configured threshold, indicating margin underperformance.

info Default thresholds are flexible, adjust as necessary.

Example

Series

Rules

Join Series (Join Series)

(RevenueRank > 0.8) AND (MarginRank < 0.2) AND (MarginLiftPotentialPct > 0.05) AND (MarginLiftPotential > 0)

Schedule

Set the preferred start date and frequency that you want the Agent to run.

Example

Start Date

Period

Interval

08/12/2025 11:01

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

Customer with High Revenue and Low Margin

The list below shows customers driving high revenue with very low margin and margin lift potential.

in 7 days

First Name Last Name

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

MarginLiftPotential

Profit

50

1

Revenue Uplift

Revenue

50

2

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.