An assistant can understand a customer's request and still be unable to complete it reliably. Retail systems need an explicit contract for every promise, permission, transaction, and recovery step.
Executive Summary
AI Agents and Commerce Architecture | Published September 10, 2026Retail leaders should prepare for agents that request and execute business actions across systems. The difficult work begins when an assistant changes an order, spends a balance, reserves inventory, or starts a return. Each operation needs a defined business meaning, verified authority, current terms, permitted state transitions, a durable result, and a recovery owner. Adding a tool connection does not establish those conditions. Start with one bounded workflow, retain domain controls in the systems that own them, and require evidence that the journey remains correct through timeouts, changing inventory, partial failures, and human intervention. This is a framework for execution readiness, separate from the product discovery work that makes merchandise understandable to assistants.
Key takeaways
- Treat the agent interface as a business execution contract with explicit preconditions, effects, and completion evidence.
- Separate permission to observe an account from authority to change it or commit a customer's money.
- Bind approval to current products, quantities, prices, delivery terms, and the specific action being authorized.
- Design order and return transitions, duplicate protection, and compensation before exposing consequential actions.
- Measure correct completion and recovery cost across commerce, operations, finance, and service.
When Understanding Becomes Execution
A shopper asks an assistant to change a jacket from medium to large, preserve the discount, use the same payment method, and keep Friday delivery. The language is straightforward. The operation reaches into inventory allocation, order status, pricing, payment, warehouse activity, and customer communication. A fluent answer can conceal the fact that several of those systems have already moved beyond the point where the requested change is possible.
That is the interface challenge retail leaders need to address. A person using a website receives clues from the journey: a disabled button, a confirmation screen, a delivery warning, or an instruction to contact support. An agent needs those conditions expressed as explicit information and enforceable rules. Otherwise it has to infer business meaning from a successful request or a plausible sequence of screens.
Preparing for this does not require assuming that every customer will delegate shopping, or that one protocol will become universal. It means recognizing agents as another class of system client, with the ability to combine actions and repeat them quickly. The same operating foundation can support an internal service assistant, a retailer's customer agent, or an external buying assistant with an approved integration.
Discovery readiness makes a product understandable. Execution readiness makes the retailer's commitments dependable. Once an assistant can affect money, inventory, or service obligations, the design conversation belongs with operations and finance as well as digital product and technology.
Define the Business Contract Behind Each Tool
A tool called changeOrder is too broad to describe a trustworthy business capability. It could mean editing a draft, replacing an unfulfilled line, cancelling and recreating an order, or opening a service request. Those actions produce different financial and customer outcomes. The interface should expose a specific operation, identify its preconditions, and return the business state it actually reached.
For an order amendment, the contract should identify the customer and order, the allowed line changes, the version of the order inspected, the quote being accepted, and the approval authorizing the amendment. Its result should distinguish rejected, awaiting confirmation, accepted for processing, completed, and requiring recovery. Include a durable operation identifier so another component can inspect progress without repeating the command.
Errors also need business meaning. A changed price calls for a revised quote. A warehouse release may prohibit an amendment. An expired permission requires renewed authorization. A temporary timeout may require status retrieval. Returning the same generic failure for all four forces the assistant to improvise the next step and prevents leadership from seeing which operating constraint is creating friction.
Existing web standards provide useful building blocks. HTTP defines idempotent method semantics for repeatable requests and conditional requests such as If-Match for rejecting changes based on a stale resource version. Conditional requests support concurrency control; the retail application still has to define the allowed business effect. RFC 9110 explains idempotent methods. Its If-Match definition explains the precondition for a version check.
Implement the contract through a controlled service or adapter around the owning systems. Keep tool descriptions precise enough for selection, but enforce eligibility and limits in executable policy. Review a contract change when its business meaning changes, even if its JSON fields remain compatible.
The Retail Agent Execution Map
Map one customer request across four gates: authority, terms, commitment, and resolution. These are decision boundaries, not necessarily four new applications. A commerce platform may provide several capabilities; another retailer may distribute them across services. Assign an accountable owner at each boundary and record the evidence that allows work to pass through it.
The map makes hidden dependencies reviewable. A product owner can see where a quote becomes a commitment. Finance can see when money moves. Fulfillment can identify the last reversible step. Service can see which record supports an explanation to the customer. The agent consumes this operating model; it should not be left to invent it during a conversation.
Separate Identity, Authority, and Consent
Knowing who a customer is does not establish what an assistant may do for them. A customer may allow order lookup while retaining approval over address changes, loyalty redemption, and purchases. An employee's service role may allow a standard return but require a supervisor for an exception. Model these permissions by action, resource, limit, and duration.
Keep the human principal, the agent application, and the executing service distinguishable in the audit trail. A general integration account can otherwise make thousands of different customer decisions appear to come from one administrator. The policy check should verify access to the specific order or account, not merely possession of a valid token or an order number supplied in a conversation.
MCP's authorization specification addresses access to protected servers and requires audience validation for tokens under that mechanism. That is a connection-level security foundation. A retailer still needs its own rules for order ownership, spending limits, permitted changes, and delegation. See the MCP authorization specification.
Bind confirmation to a concrete proposal: these items, this total, this destination, this delivery commitment, and this use of balances. Preserve a reference to the approved terms and their expiry. If those terms materially change, follow the customer's documented tolerance or seek renewed confirmation. A general instruction to find a good alternative cannot silently authorize a more expensive order.
Consent for marketing or wider data use deserves a separate control from permission to fulfill a requested transaction. Give the agent the minimum customer context the task requires, and support revocation before subsequent actions. This separation makes the operating intent legible without requiring the assistant to interpret a privacy policy as an authorization engine.
Make Quotes Current and Committable
Price and availability are conditional facts. The selling price may depend on market, customer status, quantity, promotion, currency, and channel. Inventory may be physically present while reserved, unavailable for that destination, or unable to meet the requested delivery date. A cached product record is insufficient evidence for a commitment that depends on those conditions.
Provide an authoritative quote containing the exact variant and quantity, line prices, applied discounts, tax treatment, shipping charge, total, currency, destination assumptions, and delivery terms. Include when it was issued, when it expires, and what availability commitment it represents. If stock is reserved, expose the reservation and expiry. If it is only an availability observation, say so explicitly.
A quote can expire while the customer considers it. The commit operation should check the quote and affected resource versions against current rules. When the stock position or commercial terms have changed, return the changed conditions and a new proposal. The assistant can explain the difference; it should not choose which expired facts to preserve to make the journey appear continuous.
Set freshness requirements by business consequence. A product's care instructions and a flash-sale inventory allocation do not need identical refresh policies. Distinguish a source timestamp from the moment an adapter cached the response, and define what happens when a dependency cannot be reached. The permitted fallback may be an estimate, a delayed quote, or a service handoff, with wording that reflects its certainty.
Finance and merchandising should agree which conditions can be honored after a quote expires. If a price guarantee exists, encode its bounds and funding owner. Without that decision, the integration team ends up making commercial policy through retry behavior.
Design Retries Around One Customer Intention
A timeout creates uncertainty about an operation, not proof that nothing happened. A payment may have been authorized or an order created before the reply was lost. If an assistant responds by starting the same purchase again with a new request identity, it can turn a network problem into duplicate financial and fulfillment activity.
Assign a durable identifier to the business intention before execution. Keep that identifier through retries and connect it to downstream operation references. The command service should recognize a repeated request and return the known result or progress. A changed payload under the same identity needs an explicit rejection or amendment path rather than being treated as another attempt at identical work.
Stripe provides a concrete example: its idempotency mechanism saves the first result once endpoint execution begins, including success or failure, and checks reused keys against the original parameters. Validation failures and concurrent-request conflicts can occur before execution and do not save an idempotent result. Its documented retention behavior also shows why teams must understand the provider's retry window. An idempotency key is not an unlimited guarantee. Stripe's API reference describes the contract.
Protection at the payment provider does not deduplicate the OMS order, the warehouse request, or a loyalty debit. Each boundary needs a supported strategy, with a reconciliation record connecting the pieces. For a legacy system without native keys, constrain concurrency and use durable external references where supported; document any residual ambiguity instead of promising universal exactly-once execution.
Give the assistant a status operation and a clear pending response. The customer can receive a truthful processing message while the workflow retrieves the result. Suppressing uncertainty in the conversation makes recovery harder because service teams inherit an order the customer was already told had failed.
Make Order and Return States Explicit
An order's financial, fulfillment, and service states are related but different. Payment authorization does not mean dispatch. A cancellation request does not mean a warehouse has stopped picking. A refund instruction does not mean funds have reached the customer. Preserve those distinctions in the interface and define which evidence supports each customer-facing statement.
Use explicit transitions with preconditions and resulting states. An amendment might be eligible before release to fulfillment, require review during allocation, and become unavailable after dispatch. The final transition should validate current state, because another agent, staff member, or warehouse process may have changed the order since the original read.
Shopify's orderCancel operation illustrates why action names are insufficient: cancellation is irreversible, and the response includes an asynchronous job. A tool wrapping that operation needs to distinguish accepting the request from verifying completion, and expose the chosen refund, restocking, and notification behavior. See Shopify's orderCancel reference.
Returns need the same discipline. Shopify's returnCreate creates an open return and assumes the customer's return request has already been approved. That precondition belongs in the retailer's orchestration and permission model. It should never be inferred from a customer's question about whether an item is returnable. See Shopify's returnCreate reference.
For a retailer-specific return flow, document request, approval, receipt, inspection, disposition, and settlement separately. Identify which transitions require physical evidence and who can override them. Policy eligibility, receipt of goods, and refund completion answer different customer questions and should remain independently observable.
Coordinate the Retail Ecosystem Without Erasing Ownership
The commerce platform is rarely the whole execution environment. An OMS may own allocation and routing, a WMS may own physical pick and dispatch status, and an ERP may own financial posting and inventory valuation. CRM and service tools hold customer context; loyalty manages balances and earning rules; payment and tax services apply their own transaction logic. Confirm the actual ownership map rather than assigning roles from product labels.
Define one authoritative answer for each decision. The OMS can evaluate whether a promised delivery remains achievable while the WMS provides operational evidence. The payment provider can confirm authorization while the ERP later confirms accounting reconciliation. A service application should consume those facts and retain the customer conversation without becoming an unofficial competing source of order status.
Events connect these systems, but receiving an event does not establish that every downstream effect is complete. Stripe documents that webhooks can arrive out of order or more than once. Its guidance includes duplicate handling and retrieving objects when needed. Treat these as explicit integration conditions when building the payment leg of a retail workflow. Stripe documents event delivery behavior.
Carry operation and domain references through the workflow, verify event authenticity, and process events according to supported state transitions. Define reconciliation for missing acknowledgements and conflicting records. A dashboard that says the agent completed its tool calls cannot explain why the warehouse shipped an order that commerce considers cancelled.
The orchestration layer should coordinate these responsibilities while leaving domain validation intact. Avoid a second set of promotion, tax, or refund rules maintained inside prompts. When the authoritative system cannot support the requested decision, expose that constraint and fund the missing capability deliberately.
Plan for Partial Success Before Granting Autonomy
Consider an illustrative purchase flow in which inventory is reserved, a loyalty balance is debited, and payment is authorized, but order creation returns an ambiguous timeout. The correct first action is to resolve whether the order exists using the durable reference. Immediately refunding or retrying the purchase could conflict with an order that is already moving into fulfillment.
If reconciliation establishes that no order can be completed, the workflow needs an authorized recovery path. That might release the reservation, restore the loyalty debit, and void the authorization. The actual sequence depends on the retailer's integrations and commercial rules. Record each recovery action and any remaining customer impact rather than presenting recovery as an invisible rollback.
Microsoft's compensating transaction pattern explains that compensation is application specific, can itself fail, and does not necessarily restore the original state. This is useful architecture guidance for operations spread across multiple systems. It does not make every retail action reversible. See the Azure Architecture Center's compensation guidance.
Now consider an illustrative return where a customer has received an exchange item before inspection reveals that the original item is ineligible. That situation cannot be repaired by deleting a return record. The retailer needs an exception policy, a service owner, a customer communication path, and a financial treatment. An agent should identify the condition and route it with evidence.
Mark points of no return in the operating map. Before those points, require the evidence that reduces avoidable recovery. After them, use explicitly approved remedies. This gives executives a practical basis for deciding which operations can be delegated and which still need human judgment.
Give Exceptions an Operating Home
Human review works only when it is designed as a service. Specify the queue, owner, response expectation, authority, and information needed to decide. The handoff should include the customer request, approved terms, current system states, completed actions, unresolved uncertainty, and available next steps. A transcript alone makes the reviewer reconstruct the transaction under time pressure.
Make resumption explicit. A reviewer may approve a revised quote, authorize a policy exception, or close the request. The workflow should resume from a known state and record the decision, rather than asking the model to replay its earlier plan. Require fresh validation when the underlying order or inventory changes during the review wait.
Treat text from product descriptions, customer messages, documents, and external tool results as data that may contain misleading instructions. The tool layer should validate resource access, allowed fields, destinations, and action scope independently of the model's proposed call. An instruction encountered in a return note cannot grant refund authority or change where an export is sent.
Give operators a way to suspend a specific capability while preserving useful observation and support. If order amendments are producing inconsistent warehouse outcomes, stop that action and keep order lookup available where safe. An incident control that requires shutting down every assistance function creates pressure to tolerate a failing workflow.
The agent interface is complete only when an operator can explain what happened, determine what remains uncertain, and take the next authorized action without reconstructing the conversation.
JM Digital Corp
The Unpopular Opinion: Fewer Actions Can Create More Value
A broad tool catalogue looks persuasive in a demonstration. In production, every consequential capability creates another responsibility for permission, validation, monitoring, and recovery. An agent that can invoke fifty loosely defined actions may be commercially less useful than one that completes three important workflows with dependable outcomes.
Leadership should challenge coverage metrics that count connected systems or exposed tools without showing operational completion. The scarce resource is often the team's ability to maintain transaction rules and resolve exceptions across departments. Match the pace of capability expansion to that capacity, then invest where a missing contract limits a valuable customer journey.
Unpopular AI opinion: connecting more retail systems can make an agent less ready for production. Every new action adds a promise the business must validate, authorize, observe, and recover. Autonomy should grow at the speed of those capabilities.
JM Digital Corp
Measure the Completed Business Outcome
Define correct completion before launch. For an order amendment, it may require the correct variant, preserved authorized pricing, an achievable delivery promise, consistent payment treatment, and an accurate customer notification. Measure that result against eligible requests, then show rejected, abandoned, pending, and escalated requests separately. Otherwise the team can improve an apparent success rate by excluding difficult work.
Track quote expiry and revalidation rates, unauthorized action attempts blocked, duplicate effects, state conflicts, and time spent with an uncertain outcome. These are diagnostic measures. Connect them to customer and operating consequences: avoidable contacts, missed promises, review minutes, recovery expense, payment discrepancies, and margin lost through incorrect concessions.
Calculate cost per correctly completed workflow using model usage, infrastructure, integration operations, human review, and recovery. Compare equivalent request types, order values, and fulfillment conditions with the existing process. An easy order cohort should not be used to claim improvement over a service baseline containing complex exceptions.
Set progression criteria before the pilot so commercial pressure does not redefine success afterward. A small retailer may use a manual daily reconciliation; a larger operation may automate it. Both need evidence that the customer promise held and that exceptions stayed within the team's capacity. Treat unresolved financial discrepancies or repeated unauthorized effects as reasons to narrow the action scope while correcting the cause.
A 30/60/90 Day Sequence for Execution Readiness
Days 1 to 30: Establish the Contract and Baseline
Choose one bounded workflow with a clear commercial purpose, such as amending an unfulfilled order within the same market and payment method. Map its actual system owners, state transitions, authority requirements, and points of no return. Inspect representative exceptions with service, fulfillment, and finance. Record the current completion rate, handling effort, error cost, and customer impact.
Produce a reviewable operation contract, quote definition, permission matrix, and recovery map. Agree which cases are excluded from the first release and how they reach existing service channels. The first decision gate is whether the owning systems can provide the evidence and controls the workflow requires.
Days 31 to 60: Prove Behavior Under Failure
Implement the adapter and durable operation record in a controlled environment. Exercise concurrent changes, expired quotes, duplicate requests, interrupted responses, missing events, revoked access, warehouse cutoffs, and failed compensation. Test the customer wording as well as the system result, especially when completion remains uncertain.
Run the proposed workflow alongside the existing process using approved data and access. Have operators resolve the exception queue and verify that the handoff supports a real decision. Review domain records together, rather than accepting the agent's report as proof. The second gate is operational correctness and recoverability within the selected scope.
Days 61 to 90: Pilot Bounded Authority
Pilot with a limited eligible population, explicit transaction limits, named support coverage, and a tested suspension control. Retain customer or employee confirmation wherever the agreed authority model requires it. Reconcile financial and fulfillment effects, review incidents, and compare cost per correct outcome with the baseline.
Expand one dimension at a time: request volume, order complexity, market, or action authority. Each expansion changes the evidence required. The executive decision at day ninety should identify what can scale, what still requires review, and which system constraint deserves investment. The calendar organizes the work; it does not substitute for passing those gates.
The next interface for retail systems will be judged by whether an agent can make a valid request and leave the business in a known state. Fund that capability as part of the retail operating architecture. It remains valuable across changing models, channels, and protocols because it makes the underlying customer commitment clearer and more dependable.
Related reading
Continue the production-readiness path
These connected JM Digital Corp insights add architecture, data, workflow, and delivery context around the AI series.
Research references
This article is grounded in current platform, standards, and industry material. The links below are included for readers who want source context behind the recommendations.
- IETF: RFC 9110, HTTP Semantics
- Model Context Protocol: Authorization specification, November 2025 revision
- Stripe API: Idempotent requests
- Stripe: Webhook event delivery behavior
- Shopify GraphQL Admin API: orderCancel
- Shopify GraphQL Admin API: returnCreate
- Microsoft Azure Architecture Center: Compensating Transaction pattern
Assess the retail systems behind your next AI agent
Use the JM Digital AI Production Readiness Kit to structure the workflow, evidence, control, and ownership decisions before expanding agent authority. Pair it with the Retail Architecture Decision Kit when the constraint spans commerce, order management, finance, and fulfillment.