Platform / Idempotency & Integration is where ERP discipline either begins or breaks.
Idempotent Retry of a Duplicated Create (external_id Anchor) looks operational from far away. In a real finance team, it is a chain of assertions: the right actor started the work, the required records existed, the control policy was applied, the state change was preserved, and the outcome can be explained later without rebuilding the transaction from emails and spreadsheets.
The expected business outcome is specific: Duplicate submissions and re-syncs produce exactly one row; re-running the seeder on day 3 writes zero new rows; cross-system identity is stable and corruption-free.
The control flow a finance team actually needs.
Step 1
Every Retry-Able Business Resource...
Step 2
Create Path Is INSERT … ON CONFLICT DO...
Step 3
Identity Is The Caller-Stable External...
Step 4
Durable Beyond The 24h HTTP...
Step 5
Same Fixture → Same External Id → Same...
The ERP surface involved.
Module
Platform / Idempotency & Integration
Actors
Integration Sync, Seeder, API Caller, Owning Service
Tier
Tier 1
Finance area
Cross-Cutting Edge Cases & Failure Modes
Region lens
US and UK finance teams
Publication date
June 28, 2026
every retry-able business resource carries a caller-controlled `external_id` + partial unique index on `(tenancy, external_id)`; create path is `INSERT … ON CONFLICT (tenancy, external_id) DO UPDATE … RETURNING id`, never a plain insert; identity is the caller-stable `external_id`, NOT a hash of mutable business fields (a field edit must not change identity); durable beyond the 24h HTTP idempotency-key TTL; same fixture → same `external_id` → same logical row across dev/staging/prod; second create returns the original id and zero new rows; audit reflects an update, not a second create.
US and UK teams have different compliance hooks, but the same control problem.
US teams usually care about clean evidence for audit support, vendor records, payment controls, tax reporting, and management review. UK teams usually care about VAT-ready records, approval evidence, digital-record discipline, and traceable postings. The country-specific details differ, but the operating pattern is the same: the ERP needs controlled records, explicit ownership, defensible state changes, and evidence that survives beyond the person who completed the task.
The control matrix.
| Control area | Requirement | Acceptance proof |
|---|---|---|
| Control 1 | | |
| Control 2 | | when the same create payload is submitted again with the same external_id after the 24h HTTP idempotency cache has expired |
| Control 3 | | then the response returns the original record id, zero new rows are inserted, mutable fields are updated in place, and the audit trail reflects an update not a second create |
| Control 4 | durable beyond the 24h HTTP idempotency-key TTL | |
| Control 5 | | Duplicate submissions and re-syncs produce exactly one row; re-running the seeder on day 3 writes zero new rows; cross-system identity is stable and corruption-free. |
| Control 6 | second create returns the original id and zero new rows | Duplicate submissions and re-syncs produce exactly one row; re-running the seeder on day 3 writes zero new rows; cross-system identity is stable and corruption-free. |
Audit evidence is a chain, not a folder.
| Evidence layer | What should be preserved |
|---|---|
| Business event | |
| Control rules | |
| Acceptance proof | |
| Data record | |
| System event | |
| Lifecycle state | |
The useful version of this workflow is not only fast. It is inspectable. A controller, auditor, or operator should be able to move from source event to system record to state transition to final business outcome without guessing.
Implementation contracts.
Reference data model
`vendor` { id: string, entity_id: string, name: string, external_id: string, status: enum, created_at: timestamp, updated_at: timestamp }; partial unique index on `(entity_id, external_id) WHERE external_id IS NOT NULL`; (reference, product may differ).API and events
`POST /v1/vendors` { name, external_id, ... } -> 201 on first call { id, external_id }; -> 200 on duplicate external_id { id, external_id, updated: true }; `GET /v1/vendors/{id}`; idempotent via `external_id`; does NOT use name as uniqueness key.State transitions
`ACTIVE -> ARCHIVED`; guard: duplicate external_id triggers upsert not 409; plain insert without external_id on a retry-able resource is structurally blocked by service layer.Common implementation traps.
Treating the workflow as data entry
If the ERP only stores the final record, the team loses the decision trail that explains how the record became valid.
Hiding exception logic
Exceptions need owners, reason codes, and time stamps. A vague pending state is not a control.
Posting without recovery design
Retries, duplicate submissions, and partial failures must be explicit so the system does not create inconsistent records.
Skipping evidence design
A workflow that cannot produce evidence on demand will eventually push finance teams back into manual screenshots and spreadsheets.
Where Rivane fits.
Rivane is built for finance workflows where automation must stay tied to source documents, approvals, state transitions, ledger impact, reporting, and audit evidence. Use this guide as a checklist for evaluating whether an ERP workflow is merely digitized or actually controlled.
References and source basis.
These sources provide the standards, regulatory, or government context around the flow. They are included so the guide is useful to finance operators, auditors, and implementation teams, not only buyers reading software copy.