EN
E-Commerce

Replacing an ERP Connector While Orders Are Still in Flight

Replacing an ERP Connector While Orders Are Still in Flight

Time to read: 5 minutes

Content

  1. Set the cutoff where work is assigned
  2. Carry an in-flight order ledger through the switch
  3. Rehearse the stop, not just the switch
Bookmark

Switch new orders to the replacement ERP connector only when you can say who owns every unfinished order and who is allowed to send its next update. For one sales channel, give the old connector a defined set of orders to finish and the new connector a separate set to start. Run the replacement in a mode that cannot write first. If you cannot keep the two paths from writing the same business operation, use a controlled pause in ERP dispatch rather than overlapping writes.

Set the cutoff where work is assigned

Before picking a time, list the store, ERP and connector versions, then walk through the actual contracts for orders, reservations and status updates. Include where order IDs are mapped, what counts as ERP acceptance, how long duplicate protection lasts, who releases a reservation and how delayed status updates are matched to a shipment. Include inventory queues, scheduled exports, retry workers and manual replay tools: changing the storefront route can leave any of them writing to the ERP.

At cutover, record a durable dispatch position and store the assigned connector against each order. Use that assignment, not the order's checkout time, to route retries and later actions. If work can arrive out of order, use a recorded assignment rather than trying to reconstruct ownership from timestamps. Keep the same store/order reference and the same operation identity on retries; the replacement must not give a retried create a fresh identity. Test duplicate protection where the business record is written. Two independent connector-side logs won't prevent both connectors from creating the same ERP order.

ERP connector cutover: one writer per order Compare in a test path with no writes. Record the cutover position and assign every order to a connector. The old path drains assigned work; the new path starts its own orders. Reconcile orders, reservations and statuses before retiring the old path. One writer per order 1 · Compare without writes 2 · Record the cutoff 3 · Restrict each writer 4 · Reconcile, then retire Check both sets of mappings. Save each order's assignment. Old path finishes assigned work. New path starts its own orders. Match orders, holds and statuses.
Figure 1. The connectors can run at the same time, but only the assigned path can write an operation for an order.

Carry an in-flight order ledger through the switch

Fictional rehearsal, not a client cutover or an executed test. A dealer site records dispatch position 740 as the final position assigned to the old connector. Existing assignments stay with the old route; position 741 starts the new route. The team assumes one ERP business order per storefront order. Status updates are applied against linked ERP order and shipment references, not whichever connector delivered the latest message.

Order at the cutoffOwner and authorized actionEvidence required to close
D-510 · 738. ERP order E-89 exists; four of six units have shipped.Old connector keeps the order. Operations expects the remaining shipment update on E-89; the new connector must not recreate it.The two shipments account for all six units against E-89; storefront status agrees.
D-511 · 739. Create timed out; ERP outcome unknown.Old route retains the assignment. The ERP owner checks the original reference and pending work. If the write didn't take effect, the owner can authorize recovery under the tested duplicate-handling contract. No resend while the outcome is unknown.Close only after reconciling one linked ERP order and its expected reservation or documented hold, whether found or recovered. Authorization alone leaves the row open. If transferred, record it as unresolved with an accepting owner, next action and deadline.
D-512 · 740. Assigned but not sent.Old connector sends once under the agreed contract. New connector may compare its mapping but may not write.One linked ERP order with the correct reservation or documented business hold.
D-513 · 741. First order assigned after the cutoff.New connector writes. The old export and its retry worker skip this order.One linked ERP order; status returns on time; the old worker produces no side effect.

For a real run, add the last attempted operation and time, its stable operation reference, the last confirmed ERP state, and the named person and deadline for any unresolved row. Keep late callbacks tied to the original business record; a delayed “accepted” message must not move a shipped order backward.

Rehearse the stop, not just the switch

  1. Compare mappings without writes. Use an approved test environment and compare the old and new payloads for the same samples. Check variant, unit and warehouse mapping. For control SKUs, compare the same availability definition at the same inventory cutoff and within the agreed delay. If the connector also publishes inventory, designate one writer per feed; splitting order ownership doesn't split a shared stock feed.
  2. Prove the boundary under failure. In rehearsal, give the old worker a job before the stop, reassign the order, then let that worker attempt its write. It must be blocked, or you must prove the old work has drained before the new owner writes. Also rehearse an ERP create that commits just before the reply is lost and a late shipment callback. The commerce and ERP owners check business records, not just job counts. Agree limits on status lag and the age of unresolved orders before the release.
  3. Stop writes on a duplicate or a broken ownership boundary. For the affected operations, the release lead contains every path still able to write, including both connectors and their retry workers, until the offending path is isolated. Operations and the ERP owner account for requests already submitted, reconcile their effects and hold any operation whose outcome is still unknown. Switching back does not erase an ERP create. Resume only after the rehearsal proves stale writes are blocked or the old work is drained. At the actual handoff, verify the block or drain before granting the new owner write authority. Keep taking checkout orders during a pause only if you have tested durable capture and operations can honor the resulting promises.
  4. Retire the old route when its work is accounted for. An empty queue doesn't prove it is done. Check for scheduled retries, unresolved writes, status callbacks and open orders. Close each row on business evidence, or transfer it explicitly as unresolved with its ID, last confirmed state, accepting owner, next action and deadline. Have operations accept the ledger and the ERP and commerce owners confirm that only the intended routes remain active.

Counterexample: If the old connector sweeps all open orders on a timer and cannot exclude the new ones—and the ERP cannot enforce a common write boundary—don't run the two in parallel with writes enabled. Pause dispatch, drain or reconcile the old path, and bring up one writer. If you cannot preserve queued work or verify uncertain writes, defer the switch.

The SanMar ERP case describes Dinarys building a connector to translate legacy ERP data into formats Magento could use for product and order exchange.

Start with one channel. Ask the ERP and commerce owners to fill the ledger for one queued order, one partial shipment and one uncertain write. Then name who can stop dispatch and what evidence they need to resume it. If you're scoping the replacement with a partner, bring that sanitized ledger and the current versions to an ecommerce ERP integration discussion.

Lassen Sie Profis Ihre Herausforderung meistern

Unsere zertifizierten Spezialisten finden die optimale Lösung für Ihr Unternehmen.

Bitte einen gültigen Namen eingeben
Bitte geben Sie ein gültiges Unternehmen ein
Bitte geben Sie eine gültige Telefonnummer an
Bitte geben Sie eine gültige E-Mail-Adresse ein
Kurze Botschaft

    Ihre Nachricht wurde erfolgreich verschickt. Wir melden uns in Kürze! Success icon