An order arrives from somewhere else
Zomato, Swiggy, the outlet's own online menu — an order posted as JSON lands as a ticket, once, with unmapped items refused by name.
An aggregator's order used to be typed into the POS from the aggregator's own tablet, by a captain, during service. The receiving half is now built: an outlet gives each channel a secret, the channel posts the order, and it lands as a ticket with the channel's price.
What is done on arrival
- The payload is stored whole before anything reads it, so a body that fails to parse is still there afterwards.
- The sender's own reference makes the order idempotent — a retried delivery, and every aggregator retries, makes one ticket and not four.
- Each of the channel's item ids is mapped to a dish; an unmapped item is refused naming the item, not silently dropped from the ticket.
- The channel's own price for the dish is used, because the aggregator's menu is marked up on purpose.
What is not done
The product does not push the menu to the aggregator or accept an order on its behalf; that half is written from the aggregator's side, on their API, once a restaurant is connected. The receiving door works with anything that can post JSON today.