Skip to main content
Industry Insights

Add voice to ordering without building a second ordering system

AWS's new WhatsApp sample separates text, voice notes, and calls while keeping menu, cart, order, and customer state behind one backend. That is the part worth copying.

Sean McLellan profile photo

Sean McLellan

Lead Architect & Founder

7 min read
A blank smartphone, small microphone, and ceramic vessel sit beside three brass intake lanes that meet at one stainless-steel preparation station.
Constructed diagramBaristaLabs constructed composition of several customer interfaces feeding one preparation system. It does not depict AWS or WhatsApp product UI, infrastructure, or a measured deployment.

AWS published a sample on September 4 for a restaurant ordering assistant that accepts WhatsApp text messages, voice notes, and live calls. The visible feature is multimodal conversation. The more important design choice is behind it: each channel gets its own runtime, while menus, carts, orders, locations, and customer state remain in one backend.

That separation matters to any business adding voice to an established text workflow. Voice needs different transport and timing, but it should not create another version of the order. This article explains the sample's boundaries, what should remain shared, and what a team should prove before customers move between channels.

What did AWS publish?

The AWS technical walkthrough and its sample repository implement three channels on one WhatsApp Business number. Text runs through Amazon Nova 2 Lite. Voice notes and live calls use Amazon Nova 2 Sonic for speech-to-speech interaction.

AWS separates the conversations into three AgentCore runtimes. All three reach the restaurant backend through tools exposed by AgentCore Gateway, which acts as a managed Model Context Protocol server in this design. DynamoDB stores customer profiles, menu items, carts, orders, and locations. One AgentCore memory, keyed by a hashed customer ID, supplies cross-channel conversational context.

The sample also separates receipt from processing. API Gateway receives the public webhook. A Lambda function acknowledges it quickly, and Amazon SQS carries work to a worker, with a dead-letter queue for messages that cannot be processed normally. A separate sender path returns the reply to WhatsApp.

This is a deployable reference implementation, not evidence that a restaurant improved conversion, accuracy, speed, or labor cost. AWS labels it an expert technical how-to, lists AWS and Meta prerequisites, and tells readers to evaluate production controls and costs. Treat it as architecture to inspect, not a business result to repeat.

Why should the channels remain separate?

Text, a recorded voice note, and a live call do not arrive or fail in the same way. A text message is a discrete payload. A voice note requires media retrieval and asynchronous processing. A live call maintains a real-time media session and, in AWS's sample, is the only agent runtime that needs a VPC path.

Forcing all three through one channel handler would hide those differences. A call needs connection and interruption behavior that a text worker does not. A voice note can tolerate a delayed reply but needs clear handling when media retrieval or audio processing fails. Text can usually enter the queue as soon as the webhook is accepted.

Separate adapters let each interface handle its own protocol, latency, retries, and observability. They also keep a voice-specific failure from changing how text orders are accepted. AWS's AgentCore Runtime documentation says microVM sessions isolate CPU, memory, and filesystem resources between user sessions. That runtime isolation is useful, but it does not replace authorization at the shared backend.

What should remain shared?

The business truth should not fork with the interface. A menu item's availability, a cart total, an order status, a store location, and the rules for changing an order should come from the same authoritative services whether the customer types or speaks.

In the AWS sample, the channel agent calls named backend tools rather than maintaining its own copy of ordering logic. That boundary is the transferable lesson. The agent can interpret a request and choose a permitted tool. The backend should still validate the requested operation, current state, required fields, prices, inventory rules, and identity before it changes an order.

If the text agent and voice agent each contain their own menu or discount rules, they will drift. A customer may hear one price on a call and see another in a message. Fixing the prompt in one runtime would not repair the other. Shared backend operations make the correction apply to every channel.

The same rule applies beyond restaurants. A service business adding voice notes to appointment booking should keep one availability service and booking record. A field operation adding calls to dispatch should keep one job state and assignment rule. The channel translates the request; it does not become a new system of record.

A blank smartphone and microphone feed a sealed center canister through brass tubes, with one output tube reaching a plain pickup tray.
Constructed diagramBaristaLabs illustration: channel adapters can differ while one queue and backend carry the order. It is not a vendor architecture diagram.

Why does the queue belong before the agent?

A webhook sender should not have to wait for model inference, tool calls, and reply generation before it learns that the event was received. AWS puts SQS between fast webhook acknowledgment and the slower worker path. That reduces the chance that slow processing causes the sender to retry the entire inbound event.

The queue is not only a scaling component. It creates an operational boundary. The business can observe accepted work, processing lag, retry attempts, and messages moved to the dead-letter queue. A failed model request does not need to look like a failed webhook receipt.

This design still needs idempotency. If Meta retries an event or a worker repeats after a timeout, the backend must recognize that the same customer event is being handled again. The queue alone does not prevent duplicate cart additions or duplicate order submission. Use the provider event ID or another stable request key, store the result of the first accepted operation, and make repeat handling return that result instead of performing the action twice.

That idempotency recommendation is BaristaLabs' interpretation of the asynchronous pattern. The AWS article documents the queue and dead-letter queue but does not report duplicate-event test results for a production restaurant.

What does shared memory not solve?

AWS uses one AgentCore memory keyed by a hashed customer ID so a customer can carry context between text, voice notes, and calls. AgentCore's memory documentation distinguishes immediate conversational context from longer-lived retained knowledge.

A shared key can improve continuity, but hashing an identifier does not make the record anonymous or settle its policy. The implementation still needs to define which facts may persist, how long they remain, who can retrieve them, how a customer corrects or deletes them, and what happens when a phone number changes owners.

Do not use conversational memory as the order ledger. “The customer wanted two drinks” is context; an accepted cart line with a current price and item identifier is business state. The agent may use memory to understand a follow-up such as “make the second one decaf,” but the backend should resolve that request against the current cart and return the resulting state.

This post does not repeat the full governance decision. Our guide to persistent account context explains freshness, source precedence, correction, and permission requirements. The immediate architecture rule is simpler: memory can help the conversation continue, but the ordering backend decides what the business has accepted.

What should a channel-extension test prove?

Begin with an existing text path that already reaches the authoritative backend. Add voice notes before live calls if asynchronous speech covers a useful customer need; it has fewer real-time connection states to operate. Keep high-consequence changes, payment actions, exceptions, and refunds behind the existing approval or verification boundary.

Use a fixed set of ordinary and adversarial cases across both interfaces. The test should show whether the same request produces the same permitted backend action, not whether the voices sound impressive. Include interrupted audio, background noise, an unavailable item, a changed price, a repeated webhook, an expired cart, a customer who switches from voice to text, and a request outside the tool's authority.

Record channel receipt, stable event key, queue result, selected tool, validated backend request, prior state, resulting state, customer reply, retry behavior, and any human escalation. Compare text and voice outcomes for the same business intent. A fluent spoken reply is not a pass if the cart differs.

Pause the extension when a channel maintains its own business rules, retries can repeat an action, a dead-lettered request has no owner, memory can override current backend state, or staff cannot reconstruct what changed. Expand only after the new adapter can fail without corrupting the shared order and a customer can continue through another channel without creating a second version of the transaction.

AWS's sample makes multimodal ordering concrete. The durable lesson is not that every restaurant needs an AI phone agent. It is that a new interface should add a new way to communicate while preserving one way to determine and record what the business actually did.

BaristaLabs can review one channel extension from intake through queue, tools, authoritative records, reply, and recovery. Our process automation service covers the broader implementation path.

Sources

AWS supplies the sample architecture and service descriptions. BaristaLabs supplies the interpretation, idempotency recommendation, channel-extension test, and operating boundaries. The sources do not establish restaurant outcomes, production reliability, total cost, order accuracy, or return on investment.

Customer-channel architecture review

Add an interface without duplicating business state

BaristaLabs can help map one text or voice interaction to the queue, tools, authoritative records, permissions, and failure recovery behind it.

Bring a sanitized flow, system inventory, and failure examples. Do not send customer messages, credentials, payment data, or access tokens.

Turn this idea into a pilot

Which workflow should go first?

Use the readiness check to compare impact, effort, risk, owner, and next step before requesting a review.

  • 3-5 minutes
  • Deterministic score
  • No sensitive data
Check workflow readiness

Practical AI Workflow Notes

Want more practical AI operations ideas?

Get short notes on applying AI inside real small-business workflows — from document handling and customer follow-up to internal reporting, compliance, and automation guardrails.

A useful next step if you’re still exploring and not ready to request a 20-minute workflow assessment.

Occasional emails. Practical workflow guidance only. Unsubscribe anytime.