home Home / Delivery Robot POS Integration Must Handle Orders That Change

Delivery Robot POS Integration Must Handle Orders That Change

Most integration proposals describe the happy path. A customer orders. The order appears on the kitchen screen. The kitchen prepares it. The robot is called. The robot delivers. The order closes.

Then the restaurant opens, and within an hour one table has added a dish after the robot left, another has cancelled a drink that is already on the tray, a third has moved to a different table, and one party has asked for everything to come at once rather than course by course. The integration that worked in the demonstration now produces a robot carrying food to a table that has been cleared.

The design question is not whether a POS can send an order to a robot. It is what happens to the robot when the order changes, and the answer has to be decided before the interface is written, because it determines the interface.

This article is about that design. It uses restaurant orders because that is where changing orders are a normal operating condition rather than an exception.

One Restaurant Order Can Produce Several Robot Trips

The first idea to fix is that an order and a delivery are the same thing. They are not.

An order is a commercial object, with lines, quantities, modifiers, and a payment state. A delivery is a physical act, with a tray, a payload, a destination, and a completion. One order can require several deliveries, and several orders can share one delivery. This is the same order separation across multi-stop deliveries that governs any route with more than one stop.

Consider a table of four. Two starters, two mains, two desserts, four drinks. The kitchen does not produce this at once, and the restaurant does not want it delivered at once. In practice this becomes three or four trips, possibly combined with another table's order to fill a tray. That mapping, from order lines to physical trips, is a decision the system has to make, and it is not the POS's decision, because the POS knows about the order and not about the tray.

So define the trip as a first-class object in your design, with its own identity, its own contents, and its own lifecycle. Then define the rule that maps order lines to trips. The rule can be simple, such as one trip per course per table, or configurable, such as grouping by destination within a time window. What matters is that the rule is explicit and that the robot is dispatched on trips, not on orders.

This also clarifies who can cancel what, and the useful thing to see at this point is that a cancellation comes at three different levels. A cancelled line is one item within a trip, and cancelling it should leave the rest of the trip to be delivered, provided the robot's payload tracking can represent a partial load. A cancelled trip is the whole physical delivery, and cancelling it removes the job from the robot's queue. A cancelled order may map to several trips, so cancelling the order has to be translated into which trips are affected. Keep those separate in the design, because a system that only knows one kind of cancel will either over-deliver or abandon food that is still wanted. A trip already in transit is a further case, and it is handled in the cancellation section below rather than excluded here, because a robot on the move may still be recallable or may still have to complete the delivery.

Decide Who Can Declare a Tray Ready

Between the kitchen finishing the food and the robot leaving with it, there is an event that has to be owned by exactly one role. The tray is ready.

If the POS declares it, based on all items being marked complete, then the robot may be called before the food is actually plated, because marking complete is a screen action and plating is a physical action. The gap between them is short in a good kitchen and unpredictable in a busy one.

If the kitchen staff declare it, by an action at a station or on a handheld, then the robot is called at the right moment and a person has taken responsibility.

If the robot's own loading area detects it, through a sensor or a weight check, then the declaration is physical, which is the most reliable and the most expensive.

Each of these has a failure mode. POS-declared readiness produces robots arriving to empty pass shelves. Staff-declared readiness produces calls that are forgotten during a rush. Sensor-declared readiness produces false positives when something else is placed on the tray.

The design decision is to pick one owner, state the rule, and add a fail-safe. The fail-safe is a timeout: if a trip has been declared ready and no tray is present within a defined period, the trip is held and a person is alerted, rather than the robot departing and returning empty. That timeout is a number you set from your own operation, and it is one of the few numbers in this design that is worth tuning after opening.

Handle Cancellations Before and After Loading Differently

This is where most integrations fail in production, and the failure is usually a single undifferentiated cancel event.

A cancellation before loading is the easy case, though even here the granularity matters. If the whole trip is cancelled, the trip is deleted, the robot is not dispatched or is redirected to another job, and nothing physical has happened. If one line within the trip is cancelled, the trip survives with its remaining lines, unless that line was the only content, in which case the trip collapses. Decide which of those your system does, because a restaurant that cancels a drink expects the mains to still arrive.

A cancellation after loading is a different problem entirely. Food is on the robot. The robot may be in a corridor, in a lift, or at the table. What has to happen?

Four possible behaviours, and the choice depends on the operation.

Return to a collection point, where a person deals with the food. Appropriate when the robot cannot be unloaded anywhere else, and when waste is acceptable. This depends on the recipient confirmation and return handling your site already operates for no-shows.

Continue and deliver, then flag the discrepancy to staff. Appropriate when the marginal cost of delivering an unwanted item is lower than the disruption of recalling the robot, which is often true for a drink.

Divert to a holding position, where the robot waits for a decision. Useful when the kitchen may re-purpose the item for another order, which happens with unclaimed dishes.

Abort in place with a staff alert. Rarely correct, and dangerous in a public corridor.

Write the rule for each case, and note that the rule may differ by item. A plated main and a sealed bottle are not equivalent.

There is also a state question that needs an answer before any of this can be implemented. Does the robot know what it is carrying, or only that it is carrying something? If the payload is not tracked per item, then a partial cancellation after loading cannot be represented, and the only options are all-continue or all-return. That is a design constraint of the robot interface, and it is worth establishing early, because it may rule out the granular behaviour the restaurant wants.

Keep Table Changes Separate from New Food

A table change is not a cancellation and it is not a new order. It is a change of destination for an existing physical object, and the correct handling depends on where that object is.

If the food has not been loaded, the destination is updated and nothing else changes.

If the food is loaded and the robot has not departed, the destination is updated in the robot's task.

If the robot is in transit, three options exist and they have different costs. Continue to the old destination and have staff walk the food to the new one. Redirect, if the robot can accept a destination change mid-task and if the new destination is reachable without a re-plan that would strand it. Return to a holding point and wait.

Note the physical constraint that makes this harder than it looks. A robot in a corridor carrying a tray may not be able to reverse, and a redirect may require a route that passes through a space it cannot turn in. So the "redirect" option has to be validated against the actual route geometry, not assumed because the software supports a destination change.

Keep the new-food case separate. A table that adds a dish creates a new trip, and it should not be merged into a trip already in transit, because merging requires either a second robot or a return. Merging is a scheduling decision, and it belongs to the dispatcher, not to the POS event.

One further distinction worth making, and it is the one that catches integrations that treat every commercial change as a move. A split bill, a transferred table, and a merged table are not the same event, and they do not all affect where food goes.

A split bill changes how the check is divided and who pays. The food still goes to the same table. At least one mainstream restaurant POS data model documents this directly, allowing several checks to sit against a single table, so a check division does not create a new table. That is one vendor's documented model rather than an industry-wide guarantee, so confirm it against your own platform's schema. If your integration reads a split as a destination change, the robot diverts for a financial event that never moved a plate.

A transferred table and a merged table can change the physical destination, but check that they actually did before you act. Some platforms record a transfer by moving the order's table reference, others by adjusting the checks, and which one your POS does is a platform fact you confirm in its schema rather than assume.

So the rule is narrower than it first appears: update the delivery destination only when the physical destination actually changes. Handle a check ownership change as a record update that the delivery never sees. Treating commercial events as destination updates produces duplicate trips, the same food dispatched twice, the customer receiving it once, and a tray arriving at a cleared table with nobody able to say which record was wrong. That kind of error costs a front-of-house team its trust in the robot fastest, because it looks like the system is not paying attention.

Reject Duplicate and Older Updates Without Losing Real Changes

Now the technical core, and it is the part that determines whether the system behaves correctly after any network hiccup.

Order updates arrive from a POS as events, and events can arrive twice, out of order, or late. A system that applies every event as it arrives will produce wrong states. A system that rejects anything unfamiliar will lose real changes.

The mechanism that solves this is well established in other domains and often missing here, but it has a precondition that decides whether it is safe. Each event carries a version or a monotonically increasing sequence number, and the receiving system compares it against the last applied version for that object. What the comparison is allowed to do depends on what the event carries, and there are three cases.

If the payload is a full authoritative snapshot, meaning the event contains the complete current state of the order, then a newer snapshot can replace the older state outright. Dropping an older snapshot is safe, because the newer one already contains everything the older one had.

If the payload is an incremental event, meaning it carries a change rather than a state, then discarding an older version because a newer one arrived can lose a real change that has not been applied. Incremental streams have to be handled in order with gaps detected, and any missing event fetched or replayed, not simply filtered by version.

If the payload is a notification, meaning it tells you the object changed and little more, then it is not a state at all, and you have to fetch the current object from the platform according to that platform's contract.

Establish which one your POS emits before you write the comparison logic, because the same code is correct in one case and destructive in another. Keep idempotency and version comparison as two separate mechanisms. Idempotency stops a duplicate from being applied twice. Version comparison stops stale state from overwriting current state. They solve different problems and neither replaces the other.

The requirement for monotonicity is not arbitrary. Order object models in adjacent ecosystems explicitly require that an update timestamp increase monotonically and recommend a hybrid logical clock for exactly this reason, because wall-clock time across distributed systems is not reliable for ordering. If your POS emits timestamps that can go backwards, or that come from multiple servers without coordination, the ordering has to come from a sequence number instead.

The second mechanism is idempotency. Each operation carries a unique key, and the receiving side treats a repeated key as a repeat rather than as a new request. This is standard practice in payment APIs and it is what prevents a retried delivery call from producing two robot trips. Retries are unavoidable, since any network call can fail after the far side has already acted, so the design has to make retries safe rather than prevent them.

A specific behaviour to specify, because it is where partial success hides. Some platform batch interfaces are documented as all-or-nothing per batch, with a malformed batch being ignored while other batches in the same request succeed, though this varies between platforms and has to be read in each platform's own documentation rather than assumed. Where it applies, an update can be partially applied and the caller may still receive a success response. Check the behaviour explicitly on the POS platform you have selected.

Then specify the behaviour on the robot side for a rejected update. If the robot receives an older version of a trip, it should ignore it and not report an error that alarms an operator. If it receives a version it cannot reconcile, it should hold and alert rather than guess.

Reconcile the Kitchen, the POS, and the Robot After an Outage

An outage produces three systems with three different beliefs about the same tray. The reconciliation procedure is part of the design, not a support script.

After reconnection, three questions have to be answered for every trip that was in flight.

What does the POS believe about the order. Whether items are open, complete, or cancelled.

What does the kitchen believe. Whether the food was plated and placed on the robot, held, or discarded.

What does the robot believe. Where it is, what it is carrying, and what it was doing.

Where the three agree, close the event. Where they disagree, the resolution rule has to be defined in advance, and it should be biased toward the physical reality rather than toward the software's record. If the robot has a tray and the POS says cancelled, a person has to deal with the tray. The system's job is to surface that discrepancy to a human quickly, not to resolve it silently.

Two design choices make this tractable. First, every trip should have an identifier that appears in all three systems, so the reconciliation can be done by joining on one key. Second, the robot should log what it physically did, with timestamps, independent of what it was told to do. Without that log, the reconciliation is an argument rather than a comparison.

Ask your POS provider what event history is available after an outage, since platforms differ in whether they expose an event log or a subscription mechanism that can replay missed events. A platform that can replay missed events changes the reconciliation from an investigation into a process. A platform that cannot means you need a polling comparison as a backstop.

Test the Changes Your Restaurant Actually Makes

The test plan should come from your operation, not from a generic list.

Sit with the manager and the head chef and list the order changes that actually happen, with their frequency. Add a dish after the mains went out. Cancel a drink. Move a table. Split a bill. Hold a dessert until the customer asks. Combine two tables into one delivery. Ask which of these happen weekly, which happen monthly, and which have never happened but would be catastrophic.

Then test those, in that order, and record the result as a behaviour rather than as a pass or a fail. What the robot did. What the staff saw. How long it took to recover. Whether the customer was affected.

Include three cases that are always worth testing and are almost never in the acceptance plan. Two trips to the same destination in quick succession, which tests whether the dispatcher and the destination logic handle a queue. A cancellation received while the robot is in a lift or in a corridor with no alternative route, which tests the fallback. And a POS restart in the middle of a delivery, which tests whether the robot's state survives the loss of its counterpart.

What to Put in the Interface Specification

The document that makes an integration quote comparable contains six things, and it is best built as an interface control document for signals and states rather than as a set of prose requirements.

The trip object definition, with identity, contents, destination, and lifecycle states. The readiness rule, with the role that owns it and the timeout that protects it. The cancellation rules, separated by whether loading has occurred, and itemised per class of item. The destination change rules, including which transit states permit a redirect. The versioning and idempotency mechanism, with the key structure and the rejection behaviour. And the reconciliation procedure after an outage, with the fields that make the three-way join possible and the alert path when they disagree.

Add a scope statement that is honest about what is being bought. A POS platform's capabilities, an event subscription mechanism, an order status model, and an API rate limit are platform properties, and they differ. A robot's ability to accept a destination change, to report its payload, or to be recalled mid-route is a robot property, and they differ too. Neither can be assumed from the other, and a proposal should state which system supplies which capability, with a document reference.

Bring us your POS event documentation, the robot task API you are considering, and the order changes your restaurant handles most often. We turn them into the trip model, the change event list, and the interface specification in this article, and we route the open questions to the right supplier so both sides answer the same scenario. Software development, POS certification, and site commissioning stay with the POS provider and the robot manufacturer or their integrator. The fastest way to find out whether you have an integration or a demo is to write down the three order changes your restaurant makes most often and ask what the robot does in each. If the answer is that it depends what the POS sends, the interface does not exist yet.

Contact Us