Keep the ERP authoritative by defining exactly what the workflow layer may read, own and write.
Keep one source of truth by defining, field by field, what the workflow layer reads, owns and may write back. That agreement is the system-of-record integration contract. A system of record is the one system whose value counts when two disagree. The workflow layer may own its own preparation work; it must never become a second, competing version of your customers, prices, stock or orders.
What a workflow layer may legitimately own
Some data exists only because of the work the layer supports. It belongs there:
- Preparation state — in progress, waiting for supplier, ready for review.
- Annotations — notes, reasons for a product choice, clarifications received.
- Variants — alternative offers built from the same inputs (offer variants).
- Open issues and review decisions — what is unresolved, who approved what.
- Source references — which ERP record, price file or document each value came from, and when.
None of this competes with the ERP. The problem starts when the layer keeps its own editable copy of an ERP-owned record — a customer's address, an item's list price — and people begin correcting it there.
Data-ownership matrix
Fill one in before any build. This example is for a quote-preparation layer at a wholesaler.
Ways to connect, and their trade-offs
- Supported APIs (application programming interfaces). The preferred route: documented, versioned, permissioned. Check rate limits, write capabilities and whether access needs an extra license.
- Imports and exports — scheduled CSV or XML files, EDI messages. Simple and robust, but batch-based, so data has a known delay. File formats drift; validate every file.
- Vendor-supported middleware or connectors. Useful when the vendor maintains them; another dependency when it doesn't.
- Direct database access. Reading from a replica with the vendor's approval can be acceptable. Writing directly into ERP tables bypasses the ERP's own business logic, can void support and tends to break on upgrade. Don't.
- Screen automation — software that operates the ERP's user interface like a person. Brittle: it breaks when a screen changes. A temporary last resort at most, with monitoring.
When there is no API
No API does not automatically end the project:
- Ask the vendor or partner. An API sometimes exists behind a license or a newer version, or the ERP has an import module nobody uses.
- Read through scheduled exports. Most ERPs can export customers, items and prices on a schedule.
- Write through the ERP's own import function. A person loads and checks an import batch; the ERP applies its own validation.
- Keep a person on the final step. The layer produces a validated, ready-to-enter packet and someone enters it. This still removes most of the preparation effort (The Work Before the Quote).
Contract mechanics
- Stable identifiers. Link records by ERP customer and item numbers, never by names. When the layer creates something in the ERP, store the layer's own reference in an ERP field, so either side can find the other.
- Validation before writing. Required fields present, item exists and is active, customer not blocked. Prices are calculated by the ERP, not sent to it as overrides.
- Synchronization by object. Decide per object whether it is read on demand, on a schedule or on an event — and record when each value was read.
- Reconciliation. Periodically compare both sides: every approved packet has exactly one ERP quote, and every ERP quote created by the layer has a packet. Mismatches go to a named person.
- Controlled write boundary. The layer may perform specific operations — for example, "create draft quote" — and nothing else. It never updates master data. It uses a dedicated technical user with minimal permissions.
Start read-only where you can
A proportionate first phase reads from the ERP and writes nothing; people transfer the results by hand. This proves data access, field mapping and business value before you take on the risks of writing. If manual entry is itself the main cost, you will need writes eventually — but you will design them knowing the data.
Failure example: the duplicate quote
The layer sends "create quote" to the ERP. The network times out. No response arrives. Did the quote get created?
A naive retry creates a second quote. If that quote later becomes an order, the customer may receive two shipments and two invoices.
A safer design:
- Each submission carries an idempotency key — a unique request ID that makes repeating the same request harmless, if the ERP interface supports it. If not, the layer's reference in an ERP field serves the same purpose.
- The uncertain result gets its own status: "submission unconfirmed", not "failed".
- Before any retry, the layer queries the ERP by its reference.
- If the outcome still cannot be determined, a person decides. The software does not guess.
- Reconciliation catches anything that slips through.
Architecture at a glance
SOURCES WORKFLOW LAYER SYSTEM OF RECORD
RFQ emails, PDFs ─┐
Supplier price files ─┼──▶ Preparation state ──▶ Review ──▶ ERP
CRM (read) ─┤ variants, open issues and customers, items,
ERP exports / API ─┘ dated source snapshots approval prices, quotes
▲ │
└──────────── timestamped reads ◀────────────────────┤
▼
controlled write: create draft quote
(validated, idempotent, reconciled)This article covers the contract. Orchestration, security hardening and deployment are separate design work and should be specified separately.
When integration isn't worth it
If volume is low, entering a validated packet by hand can be cheaper than building and maintaining a write path. If the ERP will be replaced within a year, keep the integration read-only and file-based so little is lost in the migration. Whether a custom layer is the right answer at all is covered in Configure the ERP, Buy SaaS or Build a Workflow Layer?.
What to measure
Write success rate; number of unconfirmed submissions and how long they stay unresolved; reconciliation mismatches per period; age of source data at the moment it is used; and manual corrections made in the ERP after transfer. During a pilot, these belong in the acceptance criteria (How to Scope a First Automation Project).
Three questions for the walkthrough
- If a customer's discount differs between the ERP and the CRM today, which one does your team believe — and is that written down?
- When someone enters data into the ERP from another source, how do they know they haven't entered it already?
- Has your ERP supplier confirmed in writing which interfaces you may use for reading and for writing?
We define this read-own-write boundary before an integration is allowed to touch the system of record.