
Core · Guide
ERP-PIM Integration Architecture: Events, Batch and the Enforcement Pipeline
- 01 Capture
- 02 Gates
- 03 PIM
- 04 Write-back
Why the integration layer decides whether ERP and PIM stay aligned
Most ERP-PIM projects spend their energy on the PIM data model and treat the connection to the ERP as plumbing. That is where they get hurt. A mapping that overwrites enriched titles, a retry that creates duplicate variants, or an event that arrives late and restores yesterday's weight all happen in the integration layer. The PIM only shows the damage.
This article describes the integration layer as an enforcement pipeline. It covers the three transport patterns, how the main ERP platforms emit changes, the four gates every message passes, the governed path back to the ERP, and what to require from an integration platform. The commerce stack explained shows where the integration layer sits among the ERP, PIM, OMS and the other systems.
What the integration layer is responsible for
The integration layer sits between the systems of record and the PIM. It has five jobs, and each one needs an owner and a design decision.
| Responsibility | What it covers | Failure if missing |
|---|---|---|
| Change capture | Consuming ERP events and running batch deltas | Changes never reach the PIM, or reach it hours late |
| Mapping and validation | Translating ERP structures into PIM attributes, checking codes against reference lists | Products land in no family, with unknown units or countries |
| Ownership enforcement | Removing fields the ERP may not write | Enriched content is overwritten by ERP defaults |
| Delivery guarantees | Idempotency, per-SKU ordering, retries, dead-letter queue and replay | Duplicates, regressions and silent data loss |
| Governed write-back | Sending approved PIM data the ERP needs | Two systems editing the same field |
The ownership itself is decided outside the integration. The split described in where ERP stops and PIM starts sets the rules: ERP owns identity, units, logistics, tax and lifecycle; PIM owns customer-facing content, taxonomies and asset assignments. The integration layer turns those rules into code that runs on every message.
Events, batch and reconciliation: three patterns side by side
No single transport pattern covers every attribute. A working architecture combines three, each matched to how often a field changes and how quickly channels need it.
| Pattern | Trigger | Typical latency target | Use for | Recovery |
|---|---|---|---|---|
| Event on create or change | Record committed in the ERP | Minutes | SKU identity, GTIN, item type, lifecycle status, units, weights and dimensions | Retry with backoff, dead-letter queue, replay |
| Scheduled batch delta | Time-based schedule | Hourly to daily | Cost, shelf life, storage conditions, pallet configuration | Re-run from the last committed watermark |
| Full reconciliation | Nightly or weekly | Daily or weekly | Every ERP-owned field | Drift report and steward tasks |
Events for fields that channels need quickly
A new SKU, a changed GTIN or a status change to Discontinued has to reach the PIM fast, because channels act on it. Event-driven capture gives you that speed. The ERP publishes a change, the integration consumes it, and the PIM updates within minutes.
Batch deltas for low-volatility fields
Standard cost, shelf life and storage conditions change rarely and are not time-critical for channels. A scheduled job that reads every record changed since the last run is simpler to operate and puts a predictable load on the ERP API. The job stores a watermark (the latest change timestamp it processed) and starts from there next time.
Reconciliation as the safety net
Events get lost and batch jobs fail. A periodic comparison of ERP and PIM, field by field, finds the drift that neither pattern reported. The sibling article on reconciling ERP and PIM data covers this in detail.
How the main ERP platforms emit changes
Each ERP exposes change capture differently, and the differences shape the integration design. The table below lists the common mechanisms. Confirm the exact options for your release and edition before you design around them.
| ERP | Event mechanism | Polling or batch alternative |
|---|---|---|
| SAP S/4HANA | Business events such as Product.Changed, published through SAP Event Mesh | ALE change pointers that generate MATMAS IDocs; OData reads filtered on change date |
| Dynamics 365 Business Central | Webhook subscriptions on API v2.0 entities such as items | API v2.0 reads filtered on lastModifiedDateTime |
| Dynamics 365 Finance & Operations | Business events delivered to endpoints such as Azure Service Bus, Event Grid, Event Hubs, Power Automate or HTTPS | Data management framework incremental export using change tracking |
| Oracle NetSuite | User event scripts (afterSubmit) that call an integration endpoint | Scheduled SuiteQL or saved search on last modified date |
Most ERP events are notifications
ERP events usually tell you what changed, without the full record. A typical S/4HANA product event carries the product number, and the consumer then calls the product API for the details. A Business Central webhook notification contains the resource path, the change type and a lastModifiedDateTime. Microsoft describes Finance & Operations business events as lightweight and states they are not intended to carry large payloads or to serve as a data export mechanism.
This shapes the design in a useful way. When the consumer reads the current record from the ERP after each notification, a late or duplicate notification does far less harm, because the consumer always fetches the latest state. You still need the gates described below, because two workers reading the same SKU at slightly different moments can still write in the wrong order.
Platform details that change the design
Three platform details deserve attention early. Business Central webhook subscriptions expire after three days unless the subscriber renews them, so renewal must be a scheduled, monitored job. Microsoft states that Finance & Operations does not guarantee that business events arrive in the order they were emitted, and that consumers should use the control number in the payload to detect duplicates. SAP's change pointer mechanism writes a pointer for each relevant field change and builds IDocs from unprocessed pointers, which suits batch distribution better than near-real-time sync.
The enforcement pipeline: four gates before any PIM write
Every inbound message passes four gates in a fixed order. A message that fails a gate never reaches the PIM, and every rejection is recorded.
- Gate A: schema and code-list check. Validate the payload structure and check every coded value (unit of measure, country, material group, brand, item type) against the current reference lists. Unknown codes send the record to quarantine. One new ERP material type without a PIM family mapping should produce one quarantine entry that a steward resolves once. The sibling article on validating inbound product data covers this gate.
- Gate B: attribute whitelist. Remove every field the ERP may not write. Titles, descriptions, channel taxonomies and asset assignments belong to the PIM, and the ERP has no write path to them. Each removed field is counted as a violation per integration user. The sibling article on field ownership between ERP and PIM explains the rules.
- Gate C: idempotency. Check whether this exact change has already been applied, using a key built from the ERP system key and the event ID. A message already applied is acknowledged and discarded. The write itself is a transactional upsert, so a crash never leaves half a record.
- Gate D: per-SKU ordering. Compare the source change timestamp with the watermark stored for the SKU. An event older than the watermark is discarded and logged. Arrival order never decides which value wins.
Messages that fail for a reason a retry cannot fix go to the dead-letter queue with their full payload and the reason for failure. Gates C and D, retries and replay are covered in the sibling article on reliable ERP to PIM integrations.
Why the order of the gates matters
Validation runs first because there is no point deduplicating or ordering a message that will be rejected anyway. The whitelist runs before idempotency so that a message containing only forbidden fields is recognized as a violation and does not advance the SKU watermark. Ordering runs last, directly before the write, so the watermark comparison and the write happen in the same transaction.
The outbound direction: governed write-back
Some data starts in the PIM and the ERP needs it. New-item requests, packaging composition for extended producer responsibility reporting and engineered values that the ERP uses in documents are common examples. This direction needs the same discipline as inbound sync.
Only approved change requests write back. Each write is serialized per SKU, sent through the ERP's standard API (for example the product OData API in S/4HANA, the items API in Business Central, a data entity in Finance & Operations, or the REST record API in NetSuite), and the ERP response is logged. When the ERP rejects a write, the error returns to the PIM as a task for the requester. A write-back without these controls creates two masters for the same field. The sibling article on new item creation across ERP and PIM covers this workflow.
Choosing the integration platform
The deciding question is whether the platform can host the full pipeline. Integration platforms (iPaaS products such as SAP Integration Suite, Boomi, MuleSoft, Celigo or Alumio), message brokers (Azure Service Bus, Apache Kafka, AWS EventBridge) and the native connectors some PIM vendors ship can all work. The names are neutral examples of each category.
Use these questions in vendor and partner conversations.
| Capability | Why it matters | Question to ask |
|---|---|---|
| Per-key ordering | Prevents old events from overwriting newer data | How do you guarantee that two changes to the same SKU are processed in order? |
| Idempotency store | Prevents duplicates on retry and replay | Where do you store processed message keys, and for how long? |
| Dead-letter queue with replay | Makes failures visible and recoverable | Can an administrator inspect a failed message, fix the cause and replay it without a developer? |
| Field-level mapping control | Enforces the whitelist | Can the mapping drop fields per integration user and count each drop? |
| Rate-limit handling | Keeps the ERP responsive | How do you honor HTTP 429 responses and Retry-After headers from the ERP? |
| Observability | Shows drift and backlog early | Which metrics are exposed for queue depth, message age and rejection reasons? |
A native PIM connector can be a sensible starting point for a single ERP and a modest catalog. Check whether it supports all four gates and a replayable failure path before you rely on it in production. The commerce stack overview shows where the integration layer sits relative to OMS, WMS and commerce platforms.
How to design the integration, step by step
Use this sequence for a new integration or to audit an existing one.
- Agree the field ownership matrix. List every attribute that crosses the boundary with its system of record, its direction and its latency target. Sign it off with the business owners.
- Assign a transport pattern to each field. Identity and lifecycle go on events. Low-volatility fields go on batch deltas. Every ERP-owned field is included in reconciliation.
- Choose the change capture mechanism per ERP. Decide between events, change pointers and polling based on what your ERP release supports and on its API limits.
- Define the message contract. Fix the payload schema, the ERP system key, the event ID and the source change timestamp. Every message must carry all three identifiers.
- Build gates A to D in that order. Test each gate in isolation with crafted messages before connecting live traffic.
- Build the failure path. Configure retries with backoff for transient errors, a dead-letter queue for everything else, and a replay function an administrator can use.
- Plan the initial load. Size it against the ERP's published API limits and run it through the same gates as live traffic.
- Schedule reconciliation. Run it from the first day of production so you have a baseline before any drift accumulates.
- Set up monitoring. Track queue depth, oldest message age, dead-letter count, whitelist violations and stale events discarded.
Common mistakes
- Building point-to-point mappings without gates. Each ERP release or new material type then becomes a data incident in the PIM. Gates catch the change at the boundary and route it to a queue someone owns.
- Sending full records from ERP to PIM. A full-record payload contains fields the ERP does not own, often with empty or default values. Without a whitelist, these overwrite enriched content.
- Trusting arrival order. Brokers, retries and parallel workers all reorder messages. Order by source change timestamp per SKU, and discard anything older than the stored watermark.
- Letting webhook subscriptions lapse. Subscriptions with an expiry date stop silently when renewal fails. Monitor renewal as a job with its own alert.
- Skipping reconciliation because events are in place. Event-driven sync drifts over time. Without a periodic comparison, the first sign of drift is a channel rejection weeks later.
Sources
- Working with webhooks in Dynamics 365 Business Central
- Business events overview, Dynamics 365 Finance and Operations
- Event-driven integration with SAP S/4HANA Cloud using SAP Event Mesh and SAP Integration Suite
- Managing business event endpoints, Dynamics 365 Finance and Operations
- Change tracking for data entities, Dynamics 365 Finance and Operations
- Change pointers, SAP Help Portal
- SuiteScript 2.1 user event script type, Oracle NetSuite Help
- Message sessions, Azure Service Bus
- Apache Kafka introduction
- RFC 6585: Additional HTTP Status Codes
Where to go from here
Frequently asked questions
What is the best way to integrate an ERP with a PIM?
Combine three patterns: events for identity and fast-changing fields, scheduled batch deltas for low-volatility fields, and a periodic full reconciliation. Route every inbound message through validation, an attribute whitelist, an idempotency check and a per-SKU ordering check before it writes to the PIM. Send failures to a dead-letter queue that an administrator can replay.
Should ERP to PIM integration be real-time or batch?
Use both. Fields that channels act on immediately, such as new SKUs, GTINs and lifecycle status, should move on events within minutes. Fields that change rarely, such as standard cost or shelf life, can move in hourly or daily batches with less load on the ERP.
Do I need an iPaaS to connect my ERP and PIM?
You need a place to run validation, ownership enforcement, idempotency, ordering and replay. An iPaaS, a message broker with custom services, or a native PIM connector can host that logic. Choose based on whether the option supports all of those functions and fits your team's skills, regardless of brand.
Why do ERP events not contain the full product record?
Many ERP events are designed as lightweight notifications that say a record changed. SAP S/4HANA product events typically carry the product key, and Microsoft states that Finance & Operations business events are not meant to carry large payloads. The consumer reads the current record from the ERP API after receiving the notification.
Which data should flow from PIM back to the ERP?
Only data the ERP needs and the PIM governs, such as new-item requests, packaging composition for compliance reporting, or approved technical values. Each write-back should be an approved change request, serialized per SKU, with the ERP response logged and errors returned to the PIM as tasks.
Diagnostic
Do you actually need a PIM?
Run the complexity index before you budget software or hire an SI.
Budget
Model a first-pass TCO
Translate catalog shape into a three-year cost range in under ten minutes.
