Agree on the cart event
Let the restaurant backend resolve menu aliases, availability, and prices. After applying a finalized turn, have it send the entire cart with a revision number for this order. Send the transcript in the customer’s language and address items by a stable menu ID. Partial speech can update a caption without changing the cart. For example, a correction to one dosa produces a new snapshot withquantity: 1. The first snapshot can arrive twice or arrive late. The UI keeps the highest revision. If the server starts a different order, mount a fresh cart using the new order ID as its React key.
Try an order and a correction
Installorb-ui in a React app and render this component. The buttons replay finalized turns in English and Hindi. They let you test the cart and review step without a restaurant backend or a microphone.
Connect the real voice and checkout flows
Feed your backend’s cart snapshots intoreceive. For a customer-facing edit control, send the requested change and display the resulting authoritative snapshot. Keep microphone state and agent playback in a separate OrbSignal. Pass that signal to the orb so an audible reply can animate while the customer reviews the cart. A finalized transcript alone cannot tell you whether the microphone or speakers are active. Pipecat adapter · Microphone-driven orb
In production, confirmation sends the order ID and reviewed revision to the server. Recheck prices, availability, and the current revision there. Use an idempotency key for that confirmation so a network retry places one order. If a newer revision exists, show its items and ask the customer to review again. The demo’s confirmation stays local.