Skip to main content

Conflict Handling

Conflicts can occur when the POS and the external OMS act on the same customer order simultaneously. For example, a store associate may be handing out an order to a customer at the same time the external OMS is cancelling that order. This scenario applies to both the Proxy and Events integration approaches.

How Conflicts Are Handled​

Events Approach​

When using the events approach, the Customer Order service handles conflicts automatically:

  • The service ensures the most up-to-date information is processed, and resolves conflicts in a way that keeps the order consistent.
  • 🛑 Pickup takes precedence over cancellation. Once the POS has handed an order to the customer, that order is closed to further change. A cancellation arriving afterwards is refused — the goods have gone, and no message can undo that.

Pickup takes precedence over cancellation. At 17:30 Anna collects order C7K2M9P at the Stockholm till, the order becomes FULFILLED and the update is published to your OMS. At 17:31 your OMS, not yet having acted on it, sends a cancellation. It is refused with 409 Conflict, because a fulfilled order is closed.

How you find out. The refusal comes back on the request itself, so check the response rather than assuming acceptance.

You will also already have known: the pickup was published to you on the order updates stream when it happened, before you sent the cancellation. What the refusal does not produce is a second, separate notification — so do not wait for one.

⚠ The same rule applies to any closed order or fulfillment, not only to cancellation after pickup: once something is fulfilled or cancelled, it is final.

Proxy Approach​

When using the proxy approach, the external OMS is responsible for implementing conflict resolution logic on its own side. The external OMS must:

  • Monitor PosLog events to detect when orders have been picked up or otherwise updated at the POS.
  • Implement logic to prevent conflicting operations (e.g., cancelling an order that has already been picked up).
  • Ensure data consistency between its own system and the POS by reacting to PosLog events in a timely manner.