On this page
Why this happens
Tags are easy to filter and edit but do not enforce a state model. A single order can contain contradictory tags, and multiple integrations can update them independently.
Implementation
Define a namespaced order metafield for the processing state and another for the external reference if needed. Keep tags as derived indicators for staff. Use a single writer for state transitions or concurrency checks when updating state. Reconcile state with the external service before retries.
Example
For an export workflow, store pending, exported or failed as the state and retain the external order identifier separately. A failed retry should not create another external order if the external reference already exists.
- Test success and failure
- replay the same event
- manually remove a tag
- confirm the integration still recognizes its exported order
- test a concurrent update and recover from a timeout.

