Governed trade-promotion intelligence for consumer-goods companies. Informatica IDMC golden records for products and retailers feed five MuleSoft-orchestrated agents (promo performance, cannibalization, forward-buy, deduction reconciliation, field rep brief) that compute adjusted promotion ROI and match retailer deductions to accruals. Agentforce topics expose adjusted ROI, deduction recommendations, and pre-call briefs to account managers. Covers master data keys, idempotent deduction handling, shared policy configuration, security, and phased rollout.
Tags: consumer-goods, trade-promotion, deduction-management, informatica, mdm, agent-fabric, agentforce, salesforce, api-led, data-quality, lineage
Trade Promotion Intelligence: Informatica Master Data, Agent Fabric, and Agentforce
Deliverable: A governed trade-promotion intelligence layer for a consumer-goods company: Informatica-mastered product and retailer data, five MuleSoft-hosted agents that compute true promotion ROI and reconcile retailer deductions, and Agentforce topics that give account managers adjusted ROI, deduction recommendations, and pre-call briefs from one question.
Objective: CPG companies spend a large share of revenue on trade promotions and still cannot say which ones paid back. POS sell-through arrives weeks late, deduction claims land in AR unlinked to promotion accruals, the same retailer carries a different ID in ERP, EDI, and the TPM system, and apparent lift is inflated by retailer forward-buying and by cannibalized sister SKUs. Working looks like this: each promotion has one adjusted ROI built on mastered keys, every deduction is matched to an accrual or routed to a human, and the account manager sees both before the buyer call, not two weeks after the promotion ends.
What's Getting Built
- Master data System API (Informatica IDMC golden records) — products, retailers, hierarchies, lineage, data-quality scores ·
GET /mdm/products, GET /mdm/products/search?q=, GET /mdm/products/{id}, GET /mdm/customers/{id}, GET /mdm/hierarchy/products, GET /lineage/{entity_type}/{id}, GET /quality/scores, GET /quality/scores/{entity_type}/{id}
- Promotion and deduction System API (TPM, POS, shipments, AR) — promotions joined to computed actuals, claims joined to accruals ·
GET /promotions, GET /promotions/{id}, GET /promotions/{id}/actuals, GET /promotions/{id}/deductions, GET /promotions/pos-data/{promo_id}, GET /deductions, GET /deductions/{id}
- Agent orchestration Process API (Agent Fabric coordinator) — runs one of five agents, records every run and event, streams progress ·
POST /agents/run, GET /agents/runs, GET /agents/runs/{id}, GET /agents/status, GET /agents/events (SSE)
- Agents —
promo-performance, deduction-reconciliation, cannibalization-detection, forward-buy-detection, field-rep-brief
- Agentforce Experience API (Salesforce-facing) — copilot sessions, cases, alerts, briefs ·
POST /copilot/session, POST /copilot/message, GET /cases, POST /cases/{id}/resolve, GET /alerts, POST /alerts/{id}/acknowledge, GET /briefs/{retailer_id}, POST /briefs/generate
- Salesforce metadata — objects
Trade_Promotion__c, Promo_Actuals__c, Promo_Accrual__c, Deduction__c; three topics (Promo Performance, Deduction Management, Field Rep Brief); prompt templates; one permission set
Prerequisites
- Informatica IDMC with MDM (or your existing hub) holding golden records for product and retailer, with cross-reference keys from ERP, EDI processor, TPM, and the syndicated POS provider. Unfinished match-and-merge rules are a stop: every number downstream joins on those keys.
- Read access to TPM plans and accruals, shipments, weekly POS (Nielsen/IRI-type), and the AR deduction feed. POS licensing and retailer data-sharing terms are the long-lead items.
- Anypoint Platform org with Agent Fabric and API Manager, a non-production environment, and a secrets vault; a Salesforce org with Agentforce enabled.
- Written deduction policy from Finance (tolerance, escalation threshold, aging buckets); the agents encode it, they must not invent it.
- Named owners for MDM, TPM, AR, and Salesforce admin.
Choose your path
- Agents in the integration tier (this plan) — Choose this when promotion math must be reproducible, auditable, and shared by more than one consumer (Agentforce, a dashboard, finance reporting). Agentforce calls governed APIs; it never computes ROI itself.
- Agentforce-native topics over Salesforce objects only — Choose this when promotions already live in Salesforce and Finance accepts a nightly ROI job. You lose per-run lineage and the adjusted-ROI pipeline.
Architecture
1. Master the keys before anything computes
- Publish golden records through the Master Data System API. Every row the agents read (POS, shipments, deductions, promotions) carries a retailer code and product ID; those must be golden-record keys, not whichever alias the source system used. Keep the alias map (source aliases on customers, source-system IDs on products) so ERP, EDI, and TPM spellings of one retailer resolve to one record.
- Expose data quality as a first-class API.
GET /quality/scores/{entity_type}/{id} returns per-rule scores (completeness, uniqueness, consistency, timeliness) plus a composite. Have the coordinator read it before a run and refuse, or flag the output, when a retailer or product is below a threshold agreed with Finance.
- Expose lineage (
GET /lineage/{entity_type}/{id}) so Finance can trace a number.
- Failure this prevents: lift on un-mastered data. If one retailer has two IDs, baseline and promotion windows draw from different subsets and lift is wrong with no error raised.
2. Promotion and deduction System API
- Join promotions to computed actuals in one read. Keep POS (consumer demand) and shipments (retailer orders) as distinct feeds; the gap between them is the forward-buy signal.
- Record source and receipt time on POS rows. POS arrives weeks late, so every ROI must state which weeks it covers.
3. Agent coordinator (Process API)
POST /agents/run takes {agent_name, input, trigger_event}. Reject an unknown agent_name or a non-object input with 400.
- Register each agent in Agent Fabric so consumers discover it by contract; keep
POST /agents/run as the stable entry point.
- Write a run record before the agent starts (status
running, input, trigger) and an event per step. A failed agent updates the run to failed with the error and returns the record, so a trigger never hangs a caller.
- Serve events over SSE at
GET /agents/events with a heartbeat. GET /agents/status (last run and failure counts per agent) is your health view.
- Chain order matters. Run
promo-performance, then cannibalization-detection, then forward-buy-detection; the first reads whatever adjustments exist, the later two write them. Re-run promo-performance last or compute adjusted ROI in one place, or stored adjusted ROI reflects the previous cycle.
4. The five agents: what each computes and where it breaks
- promo-performance (
promo_id): baseline is average weekly POS units over the 8 weeks before the promotion, scaled to promotion length; incremental units are actual minus baseline, floored at zero; ROI is incremental units times gross margin divided by trade spend (shipment-based, falling back to planned spend). Alert under a ROI threshold Finance owns. Take margin from the product golden record, never a per-category constant.
- cannibalization-detection (
promo_id): compares sister SKUs in the same category and retailer during the promotion against their own 8-week baseline, flagging declines of 8% or more. Take sister-SKU membership from the product hierarchy (GET /mdm/hierarchy/products), not name matching.
- forward-buy-detection (
promo_id): compares weekly shipments in a 4-week pre window, the promotion, and a 4-week post window. Excess promotion shipments over pre-window velocity are the load-in estimate; a post-promotion week under 50% of the pre-window average confirms the trough, and without one the estimate is discounted. It needs the post window, so it is not final on an active promotion. Use the same margin source as promo-performance; two margin assumptions make the agents disagree on adjusted ROI.
- deduction-reconciliation (
deduction_id): maps the deduction type to compatible accrual types, picks the closest open accrual by amount, and resolves automatically when the difference is within 5% of the accrual; otherwise marks the claim disputed with the overage. No promotion link or no open accrual also means disputed.
- field-rep-brief (
retailer_id, user_id): reads the last eight completed promotions with actuals, deductions per promotion, tactic ROI by retailer, and an efficiency score weighted across adjusted ROI (40), lift (30), and deduction rate (30). Take retailer names from mastered records.
- Keep tolerances and weights in one Finance-owned configuration, not scattered across agent code.
5. Make the deduction path idempotent
- Check deduction status before searching, and mark the accrual consumed in the same transaction. Otherwise a replay (retry, duplicate EDI delivery) consumes a second open accrual of the same type and double-counts spend. Reject runs on deductions not in
pending and key the run by claim ID.
- One accrual matching one claim breaks when a retailer short-pays a promotion across several claims. Track matched and remaining amount on the accrual (
Promo_Accrual__c has Matched_Amount__c and Remaining_Amount__c) so partial consumption is possible.
- Triggers: POS file receipt starts
promo-performance; an EDI claim starts deduction-reconciliation; the post-promotion marker starts the cannibalization and forward-buy chain; a calendar sync starts field-rep-brief. Set trigger_event so history shows why each ran.
6. Agentforce: data model, topics, and policy
- Model four objects.
Trade_Promotion__c carries plan and result (Planned_Spend__c, Adjusted_Lift_Pct__c, ROI__c, ROI_Adjusted__c, Forward_Buy_Units__c, Cannibalization_Units__c, Total_Deductions__c, Alert_Flag__c). Promo_Actuals__c holds each computation with Agent_Run_Id__c. Promo_Accrual__c and Deduction__c (Claim_Amount__c, Accrual_Amount__c, Variance_Amount__c, Days_Open__c, Status__c, Auto_Resolved__c) carry the AR side.
- Three topics. Promo Performance: present adjusted ROI as the primary metric; flag adjusted ROI more than 15% below gross as likely forward-buy inflation, and under 1.0 as unprofitable. Deduction Management: policy and aging buckets. Field Rep Brief: best tactic by adjusted ROI, open deduction total, below-plan promotions, next-cycle recommendation.
- Keep the dispute tolerance in one place. A typical approval policy is auto-approve within 5% of accrual, review between 5% and 15%, escalate above 15% or over $25,000. If the agent's tolerance and the Salesforce policy disagree, claims auto-approve that policy would route to Finance. Make the agent the single authority.
- Agentforce reads through the Experience API (
POST /copilot/message) or records the agents wrote; it does not compute ROI.
- Close the loop on cases:
POST /cases/{id}/resolve requires resolution_note, accepts resolution_type and auto_resolved, and sets Auto-Resolved or Closed. Make the Deduction__c.Status__c picklist values (Pending, Approved, Disputed, Resolved) match exactly what the agents write, including case, or loads silently fail.
- Route both brief endpoints through a
field-rep-brief run via POST /agents/run, not a separate path.
7. Security and compliance
- Authenticate every consumer at the gateway with API Manager policies (OAuth or client ID enforcement, rate limiting) and your IdP.
- Least privilege: account managers read results; only the integration user writes agent output.
- Trade pricing, accruals, and POS are commercially sensitive. Confirm POS license scope and whether a brief may show one retailer's data to another's account manager.
- Audit: keep run and event records immutable. Log IDs and amounts, never free-text notes. Keep deduction data inside the Trust Layer.
- All secrets come from a vault or environment, never source. Treat SOX controls as in scope because agents auto-resolve deductions and change accrual status; get Internal Audit to approve the tolerance before enabling auto-resolution.
Sample payload: a deduction outside tolerance
Request to POST /agents/run:
{
"agent_name": "deduction-reconciliation",
"input": { "deduction_id": "{deduction_id}" },
"trigger_event": "edi_deduction_received"
}
output of the returned run for a $31,500 claim against a $28,000 open accrual (12.5% over):
{
"deduction_id": "{deduction_id}",
"matched": true,
"approved": false,
"accrual_id": "{accrual_id}",
"accrual_amount": 28000,
"deduction_amount": 31500,
"dispute_amount": 3500,
"resolution": "Exceeds accrual by 13% — requires manual review"
}
Deterministic checks
POST /agents/run with an unknown agent_name returns 400 listing valid agents; a missing or non-object input returns 400; an unknown promo_id yields a run with status failed and output.error, never an unhandled 500.
- Every run writes one run row plus ordered events, returned by
GET /agents/runs/{id}.
- Reconciliation boundary: a claim exactly 5% over the accrual resolves; one cent more becomes
disputed. A claim with no promotion link or no open accrual is disputed, never resolved.
- Idempotency: replaying a resolved claim ID returns the original outcome and consumes no second accrual.
- Policy parity: for a claim within agent tolerance but over the escalation amount, the agent and the Agentforce topic return the same outcome.
- Adjusted incremental units are never negative, and adjusted ROI is at most gross ROI when forward-buy or cannibalization units are above zero. Both ROI agents use the same margin.
GET /quality/scores/{entity_type}/{id} composite equals the mean of its rule scores; an entity with no scores returns 404.
POST /cases/{id}/resolve without resolution_note returns 400; an unknown case 404.
- Suite: per-agent unit tests on closed-promotion fixtures plus a contract test per endpoint.
Testing and validation
- Replay three or more closed promotions that have a known post-mortem answer from Finance or sales analytics, and compare gross ROI, adjusted ROI, forward-buy units, and cannibalization units. A mismatch is usually a key or baseline problem, not agent logic.
- The edge case that breaks a naive build: one retailer under two IDs. Replay on raw IDs and again on golden-record IDs; lift should move. If not, match rules are not applied upstream.
- Also test: no pre-period POS; a still-active promotion; a deduction type not in the accrual map; two claims against one accrual.
- Agentforce answers must match the API: adjusted ROI equals
GET /promotions/{id}, and deduction amounts equal Deduction__c.
Phased rollout
Phase 1 — Connect
- Stand up both System APIs on real sources for one retailer and brand; prove auth and DQ retrieval.
Phase 2 — Map and validate
- Run the three ROI agents on closed promotions and reconcile with Finance. Run
deduction-reconciliation in recommend-only mode (it records the proposed outcome, Finance applies it). Deploy the Salesforce metadata to a sandbox and test the topics with account managers.
Phase 3 — Production
- Enable event triggers, turn on auto-resolution only at the tolerance Finance approved, expand retailer by retailer, and put agent failure counts and DQ scores on the platform dashboard.
Success metrics
- Time to detect an underperforming promotion against today's post-mortem cycle; baseline it first.
- Share of deductions resolved without manual touch, and share Finance later reverses (the quality check).
- Platform: agent run success rate and duration, and share of runs flagged by DQ score.
Troubleshooting
- Lift looks wrong for one retailer — Likely cause: more than one retailer ID across feeds. Fix: remap to the golden record and rerun.
- Every promotion shows ROI of zero — Likely cause: no pre-start POS rows, so the baseline is zero. Fix: load eight weeks of history or use an approved baseline.
- Adjusted ROI differs between agents — Likely cause: each applies its own margin assumption. Fix: one margin source from the product golden record.
- Adjusted ROI does not change after the chain runs — Likely cause:
promo-performance ran first and read earlier adjustments. Fix: rerun it last or compute adjusted ROI in one place.
- A deduction resolved but a second accrual is also consumed — Likely cause: a replayed claim. Fix: reject runs on non-pending deductions and key by claim ID.
- Large claims auto-resolve but Agentforce says escalate — Likely cause: agent tolerance and topic policy differ. Fix: one policy authority.
- Deductions missing from Salesforce list views — Likely cause: status values loaded in a different case than the picklist. Fix: normalize before load.