<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Anass Ez-zouaine | Backend, AI &amp; Shopify Engineer | Shopify</title><description>Shopify posts from Anass Ez-zouaine | Backend, AI &amp; Shopify Engineer.</description><link>https://ansezz.com/</link><item><title>Buyer-linked tokens for agent checkout</title><link>https://ansezz.com/blog/buyer-linked-tokens-agent-checkout/</link><guid isPermaLink="true">https://ansezz.com/blog/buyer-linked-tokens-agent-checkout/</guid><description>Exchange a Shop session for a Shopify buyer-linked JWT (~60 minutes, no refresh) so signed-in agents can personalize catalog and complete checkout.</description><pubDate>Tue, 29 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A Token-tier agent credential identifies &lt;strong&gt;your app&lt;/strong&gt;. A &lt;strong&gt;buyer-linked token&lt;/strong&gt; also carries the signed-in Shop customer.&lt;/p&gt;

- A buyer-linked token turns &quot;an agent is shopping&quot; into &quot;this buyer is shopping through an agent.&quot;
- You get it in three server-side hops: Shop OAuth, token exchange for a JWT grant, then a redeem at Shopify.
- The grant lives about 60 seconds. The token lives about 60 minutes and never refreshes, so plan to remint.

&lt;p&gt;As of Sep 2026, Shopify documents a UCP delegated identity provider flow: authorize with Shop (&lt;code&gt;accounts.shop.app&lt;/code&gt;), exchange the Shop access token for a short-lived JWT grant, redeem that grant at Shopify for a buyer-linked JWT.&lt;/p&gt;
&lt;p&gt;The resulting token lasts about &lt;strong&gt;60 minutes&lt;/strong&gt; and &lt;strong&gt;does not refresh&lt;/strong&gt;. When it expires, remint from the Shop session.&lt;/p&gt;
&lt;p&gt;Official reference: &lt;a href=&quot;https://shopify.dev/docs/agents/profiles/buyer-linked-tokens&quot;&gt;Create a buyer-linked token&lt;/a&gt;. Pair with &lt;a href=&quot;https://ansezz.com/blog/ucp-agent-profiles-are-the-new-oauth-app/&quot;&gt;UCP agent profiles&lt;/a&gt;, &lt;a href=&quot;https://shopify.dev/docs/agents/profiles/auth-and-rate-limiting&quot;&gt;auth and rate limiting&lt;/a&gt;, and &lt;a href=&quot;https://ansezz.com/blog/secure-agentic-commerce-shopify/&quot;&gt;secure agentic commerce&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Why buyer linkage matters&lt;/h2&gt;
&lt;p&gt;With a buyer-linked token you can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Return &lt;strong&gt;personalized&lt;/strong&gt; Global Catalog search results&lt;/li&gt;
&lt;li&gt;Sign the buyer into a &lt;strong&gt;merchant store&lt;/strong&gt; checkout path&lt;/li&gt;
&lt;li&gt;Apply automatic discounts that depend on the signed-in customer&lt;/li&gt;
&lt;li&gt;Operate at Token-tier limits with purchase scopes when granted (for example &lt;code&gt;dev.ucp.shopping.checkout:manage&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Without it, you may still build carts anonymously or with an app-only token, but you miss buyer-aware behavior and you still need the right permission story for &lt;code&gt;complete_checkout&lt;/code&gt;.&lt;/p&gt;

  &lt;div&gt;An agent is shopping. Carts work, but nothing knows who the buyer is.&lt;/div&gt;
  &lt;div&gt;This buyer is shopping through an agent, with personalized results and signed-in checkout.&lt;/div&gt;

&lt;p&gt;Think of it as identity linking for agentic checkout, not as a forever API key.&lt;/p&gt;
&lt;h2&gt;The three-step chain (server-side)&lt;/h2&gt;
&lt;figure&gt;
&lt;p&gt;&lt;strong&gt;Confidential client secret stays on a server you control.&lt;/strong&gt; Public clients cannot complete this flow safely. Do not ship the secret in browser or mobile binaries.&lt;/p&gt;
&lt;p&gt;Discover endpoints at runtime (do not hard-code forever):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Resource server &lt;code&gt;/.well-known/oauth-protected-resource&lt;/code&gt; → Shopify authorization server&lt;/li&gt;
&lt;li&gt;Shopify UCP business profile → &lt;code&gt;dev.ucp.common.identity_linking&lt;/code&gt; → Shop as delegated IdP&lt;/li&gt;
&lt;li&gt;Shop &lt;code&gt;/.well-known/oauth-authorization-server&lt;/code&gt; → authorize + token endpoints&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then run the three steps below.&lt;/p&gt;
&lt;h3&gt;1. Authorize the customer with Shop&lt;/h3&gt;
&lt;p&gt;Standard OAuth authorization code against Shop. Reuse Dev Dashboard client id/secret and redirect URI.&lt;/p&gt;
&lt;p&gt;Request every scope you plan to redeem later (include checkout manage if you will call checkout tools).&lt;/p&gt;
&lt;p&gt;You receive a Shop &lt;strong&gt;access_token&lt;/strong&gt; (example responses show &lt;code&gt;expires_in: 3600&lt;/code&gt;).&lt;/p&gt;
&lt;h3&gt;2. Exchange at Shop for a JWT grant&lt;/h3&gt;
&lt;p&gt;Token exchange (RFC 8693) at Shop&apos;s token endpoint:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;grant_type=urn:ietf:params:oauth:grant-type:token-exchange&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;subject_token&lt;/code&gt; = Shop access token&lt;/li&gt;
&lt;li&gt;&lt;code&gt;requested_token_type&lt;/code&gt; = JWT&lt;/li&gt;
&lt;li&gt;&lt;code&gt;audience&lt;/code&gt; = &lt;code&gt;api.shopify.com&lt;/code&gt; (Global Catalog) or the &lt;strong&gt;merchant store domain&lt;/strong&gt; for store checkout&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The returned &lt;code&gt;access_token&lt;/code&gt; is a &lt;strong&gt;JWT authorization grant&lt;/strong&gt;: signed, &lt;strong&gt;single-use&lt;/strong&gt;, about &lt;strong&gt;60 seconds&lt;/strong&gt; to live. It is not your API bearer yet. To inspect its claims while you debug, paste a test token into my &lt;a href=&quot;https://ansezz.com/tools/jwt-decoder/&quot;&gt;JWT decoder&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;3. Redeem at Shopify for the buyer-linked token&lt;/h3&gt;
&lt;p&gt;JWT bearer assertion (RFC 7523) at Shopify&apos;s (or the store&apos;s) token endpoint with the scopes you need. Shopify verifies the grant against Shop&apos;s keys, resolves the customer, and issues the buyer-linked JWT.&lt;/p&gt;
&lt;p&gt;For merchant checkout, discovery points at the store&apos;s authorization server. Set audience to the store domain and request scopes such as &lt;code&gt;openid&lt;/code&gt; and &lt;code&gt;dev.ucp.shopping.checkout:manage&lt;/code&gt; as documented for signed-in checkout tools.&lt;/p&gt;

Write down which `audience` each of your flows needs (Global Catalog or a store domain) before you write any exchange code.

&lt;h2&gt;TTL reality: 60s grant, ~60 min token, no refresh&lt;/h2&gt;
&lt;figure&gt;
&lt;p&gt;Two clocks, often confused:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Artifact&lt;/th&gt;
&lt;th&gt;Lifetime (documented)&lt;/th&gt;
&lt;th&gt;Refresh?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;JWT authorization grant from Shop&lt;/td&gt;
&lt;td&gt;~60 seconds, single-use&lt;/td&gt;
&lt;td&gt;No; re-exchange if needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Buyer-linked token from Shopify&lt;/td&gt;
&lt;td&gt;~60 minutes&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;No refresh token&lt;/strong&gt;; remint via the chain&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Build session handling around reminting, not around &lt;code&gt;refresh_token&lt;/code&gt; muscle memory from classic OAuth apps. Cache the buyer-linked JWT only within its lifetime, keyed to the buyer and resource server, on the server.&lt;/p&gt;
&lt;p&gt;Build session handling around reminting, not around refresh_token muscle memory.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;complete_checkout&lt;/code&gt; still fails with a Token-tier client, check purchase permission and merchant/agent eligibility separately. Community threads show scope alone is not always sufficient; treat platform policy as part of the design.&lt;/p&gt;

Add a remint step that runs a few minutes before the 60 minute mark, instead of waiting for a 401.

&lt;h2&gt;Implementation checklist&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Keep client secret server-side only.&lt;/li&gt;
&lt;li&gt;Discover auth URLs from well-known metadata; honor cache headers.&lt;/li&gt;
&lt;li&gt;OAuth the buyer to Shop with the scopes you will redeem.&lt;/li&gt;
&lt;li&gt;Exchange with the correct &lt;code&gt;audience&lt;/code&gt; (global vs store).&lt;/li&gt;
&lt;li&gt;Redeem promptly before the 60s grant expires.&lt;/li&gt;
&lt;li&gt;Send the buyer-linked JWT as Bearer on MCP calls that need buyer context.&lt;/li&gt;
&lt;li&gt;Remint near expiry; do not expect a refresh token.&lt;/li&gt;
&lt;li&gt;Pair with a real &lt;a href=&quot;https://ansezz.com/blog/ucp-agent-profiles-are-the-new-oauth-app/&quot;&gt;agent profile&lt;/a&gt; and the right trust tier expectations.&lt;/li&gt;
&lt;li&gt;Prefer Cart MCP for browsing; Checkout MCP when committing (&lt;a href=&quot;https://ansezz.com/blog/migrate-storefront-mcp-cart-to-ucp/&quot;&gt;cart migration notes&lt;/a&gt;).&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Failure modes to expect&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grant expired or reused:&lt;/strong&gt; exchange again; grants are single-use and short.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wrong audience:&lt;/strong&gt; catalog grant redeemed at a store (or the reverse).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Browser exchange:&lt;/strong&gt; secret leakage; move the flow to your backend.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Missing checkout scope:&lt;/strong&gt; token works for search but not manage checkout.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Assuming refresh:&lt;/strong&gt; sessions die at ~60 minutes unless you remint.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Log correlation ids and HTTP status from each hop. Do not ask the model to &quot;retry checkout&quot; when the token is simply dead.&lt;/p&gt;

- Buyer-linked tokens bind a Shop customer to your agent credential for personalized and signed-in commerce.
- Flow: Shop OAuth, then token exchange (JWT grant), then Shopify JWT bearer redeem.
- Run exchange and redeem only on a confidential server.
- Grant ~60s single-use; buyer-linked token ~60 minutes with **no refresh**.
- Discover endpoints; set audience to global catalog or merchant store deliberately.
- Remint from the Shop session; design UX for re-link, not silent forever tokens.

&lt;p&gt;When your agent&apos;s checkout fails at minute 61, is the model confused about tools, or did you forget that buyer-linked JWTs die without a refresh token?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>agentic-commerce</category><category>security</category><category>mcp</category><category>ai</category><category>agentic-ai</category></item><item><title>UCP agent profiles are the new OAuth app</title><link>https://ansezz.com/blog/ucp-agent-profiles-are-the-new-oauth-app/</link><guid isPermaLink="true">https://ansezz.com/blog/ucp-agent-profiles-are-the-new-oauth-app/</guid><description>Host a UCP agent profile URL, declare cart and checkout capabilities, and climb Anonymous, Signed, and Token trust tiers for Shopify MCP.</description><pubDate>Mon, 28 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In the OAuth decade you registered an app and got a client id. In agentic commerce you host a &lt;strong&gt;UCP agent profile&lt;/strong&gt;: a public JSON document at a URL you control.&lt;/p&gt;

- Every Shopify Cart MCP and Checkout MCP call asks for your agent profile URL.
- Declare cart and checkout together if you want to turn a cart into a checkout.
- Anonymous, Signed and Token trust tiers decide your rate limits and whether `complete_checkout` is possible.


  &lt;div&gt;Register an app, get a client id, and merchants decide whether to trust you.&lt;/div&gt;
  &lt;div&gt;Host a profile URL. Merchants fetch it, negotiate capabilities and check your keys.&lt;/div&gt;

&lt;p&gt;Every Cart MCP and Checkout MCP call on Shopify asks for that URL in &lt;code&gt;meta.ucp-agent.profile&lt;/code&gt;. The merchant fetches it, negotiates capabilities, and (for signed traffic) checks your published keys.&lt;/p&gt;
&lt;p&gt;No profile, no serious cart/checkout conversation.&lt;/p&gt;
&lt;p&gt;This post covers what to put in the profile, why cart and checkout belong together, and how Anonymous / Signed / Token tiers change what you can do.&lt;/p&gt;
&lt;p&gt;Cross-read &lt;a href=&quot;https://ansezz.com/blog/shopify-ucp-quick-start/&quot;&gt;Shopify UCP quick-start&lt;/a&gt;, &lt;a href=&quot;https://ansezz.com/blog/secure-agentic-commerce-shopify/&quot;&gt;secure agentic commerce&lt;/a&gt;, and the &lt;a href=&quot;https://ansezz.com/blog/migrate-storefront-mcp-cart-to-ucp/&quot;&gt;Storefront MCP cart → UCP migration&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Official guides: &lt;a href=&quot;https://shopify.dev/docs/agents/get-started/profile&quot;&gt;Define your agent profile&lt;/a&gt; and &lt;a href=&quot;https://shopify.dev/docs/agents/profiles/auth-and-rate-limiting&quot;&gt;Auth and rate limiting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Version pins below are as of Sep 2026; check them against the current docs.&lt;/p&gt;
&lt;h2&gt;What the profile is&lt;/h2&gt;
&lt;p&gt;An agent profile is a JSON document that declares:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The UCP version your agent speaks (examples in Shopify docs use &lt;code&gt;2026-08-25&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;The capabilities you support, with versions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Minimal cart + checkout profile (from Shopify&apos;s published examples):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;ucp&quot;: {
    &quot;version&quot;: &quot;2026-08-25&quot;,
    &quot;capabilities&quot;: {
      &quot;dev.ucp.shopping.cart&quot;: [{ &quot;version&quot;: &quot;2026-08-25&quot; }],
      &quot;dev.ucp.shopping.checkout&quot;: [{ &quot;version&quot;: &quot;2026-08-25&quot; }]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Where to host it&lt;/h3&gt;
&lt;p&gt;Host it somewhere stable and HTTPS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Static host (&lt;code&gt;https://your-app.example/profiles/agent.json&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Or a well-known path on your domain&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then send that URL on every MCP cart/checkout request. Merchants treat it like app metadata: fetch, cache per directives, negotiate intersection of capabilities.&lt;/p&gt;
&lt;p&gt;For signed requests, the profile also carries the public key material used to verify HTTP Message Signatures (RFC 9421 / ECDSA P-256 per UCP). That is the &quot;app credentials&quot; half of the story without a browser consent screen on every call.&lt;/p&gt;

Publish the minimal profile above on a stable HTTPS URL, then fetch it with `curl` from outside your network to confirm a merchant could read it.

&lt;h2&gt;Why cart and checkout both matter&lt;/h2&gt;
&lt;figure&gt;
&lt;p&gt;Passing a &lt;code&gt;cart_id&lt;/code&gt; into &lt;code&gt;create_checkout&lt;/code&gt; requires &lt;strong&gt;both&lt;/strong&gt; capabilities to negotiate successfully. A cart-only profile is fine for browse-and-share (&lt;code&gt;continue_url&lt;/code&gt;). It is not enough for the purchase handoff.&lt;/p&gt;
&lt;p&gt;Declare what you actually implement. Inflating capabilities you cannot fulfill is how you fail negotiation or fail later in checkout.&lt;/p&gt;
&lt;p&gt;Under-declaring is how you debug &quot;why won&apos;t create_checkout accept my cart&quot; for an afternoon.&lt;/p&gt;
&lt;p&gt;Keep exploratory line-item work on Cart MCP; open Checkout MCP when the buyer is ready. Rate limits are stricter on checkout at every trust tier.&lt;/p&gt;
&lt;h2&gt;Trust tiers are the new permission story&lt;/h2&gt;
&lt;figure&gt;
&lt;p&gt;Shopify classifies UCP MCP traffic by how the agent identifies itself (as of the Sep 2026 auth docs):&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;How you identify&lt;/th&gt;
&lt;th&gt;Catalog / cart / checkout build&lt;/th&gt;
&lt;th&gt;&lt;code&gt;complete_checkout&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;Relative limits&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Anonymous&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No auth or signature&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Lowest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Signed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;HTTP Message Signatures; key in profile&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Mid&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Token&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Bearer JWT (Dev Dashboard / customer / shop / buyer-linked)&lt;/td&gt;
&lt;td&gt;Yes (buyer-linked can personalize)&lt;/td&gt;
&lt;td&gt;When purchase permission is granted&lt;/td&gt;
&lt;td&gt;Highest&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Order tools (&lt;code&gt;get_order&lt;/code&gt;) sit on the Token tier with the right scopes, and only for orders placed through your agent.&lt;/p&gt;
&lt;h3&gt;Reading the tiers&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; is for demos and early browse. Expect tight throttling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Signed&lt;/strong&gt; proves which agent you are without a full OAuth dance on every request. Still cannot complete checkout.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Token&lt;/strong&gt; is where purchase completion and stronger limits live. Buyer-linked tokens additionally carry the Shop customer identity for personalized catalog and signed-in checkout behavior.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Climb tiers on purpose. Do not ask for &lt;code&gt;complete_checkout&lt;/code&gt; from an anonymous client and treat the 401 as a model failure.&lt;/p&gt;

Write down which tier your agent runs on today, and what it would take to reach the next one.

&lt;h2&gt;Profile hygiene checklist&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Host one canonical HTTPS URL; avoid rotating paths weekly.&lt;/li&gt;
&lt;li&gt;Declare only capabilities you implement; pin versions you tested.&lt;/li&gt;
&lt;li&gt;Include cart &lt;strong&gt;and&lt;/strong&gt; checkout if you convert carts.&lt;/li&gt;
&lt;li&gt;Publish signing keys if you use the Signed tier; rotate with overlap.&lt;/li&gt;
&lt;li&gt;Pass &lt;code&gt;meta.ucp-agent.profile&lt;/code&gt; on every cart/checkout tool call.&lt;/li&gt;
&lt;li&gt;Prefer Cart MCP for iteration; Checkout MCP for commit.&lt;/li&gt;
&lt;li&gt;Move to Token (and buyer-linked when needed) before promising one-click complete.&lt;/li&gt;
&lt;li&gt;Keep secrets off the profile document. Public keys yes; client secrets never.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Think of the profile as your OAuth app listing plus capability manifest.&lt;/p&gt;
&lt;p&gt;Merchants will judge your profile by what it claims and what your traffic tier can actually do.&lt;/p&gt;
&lt;h2&gt;Relation to MCP-first product design&lt;/h2&gt;
&lt;p&gt;If you also host your own MCP servers (Laravel or otherwise), you already know the pain of fat tool lists and weak auth.&lt;/p&gt;
&lt;p&gt;UCP profiles are the commerce-protocol cousin of that discipline: &lt;strong&gt;advertise operable capabilities&lt;/strong&gt;, then back them with auth that matches risk.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&quot;https://ansezz.com/blog/mcp-first-is-the-new-mobile-first/&quot;&gt;MCP first&lt;/a&gt; and &lt;a href=&quot;https://ansezz.com/blog/api-vs-mcp/&quot;&gt;API vs MCP&lt;/a&gt; for the product-side framing; this post is the Shopify UCP instantiation.&lt;/p&gt;

- The UCP agent profile URL is how merchants negotiate who you are and what you can do.
- Declare `dev.ucp.shopping.cart` and `dev.ucp.shopping.checkout` together when you convert carts.
- Anonymous, Signed, and Token tiers gate rate limits and whether `complete_checkout` is even on the table.
- Signed proves agent identity via profile keys; Token is required for purchase completion permissions.
- Keep the profile stable, versioned, and honest. Capability theater fails in negotiation or at checkout.

&lt;p&gt;If you shipped a shopping agent tomorrow, would your public profile URL survive a merchant fetch right now, and which trust tier are you actually operating on when you say &quot;we support checkout&quot;?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>agentic-commerce</category><category>mcp</category><category>security</category><category>ai</category><category>agentic-ai</category></item><item><title>Commerce RAG is not document RAG</title><link>https://ansezz.com/blog/commerce-rag-is-not-document-rag/</link><guid isPermaLink="true">https://ansezz.com/blog/commerce-rag-is-not-document-rag/</guid><description>Shopify Plus catalog RAG needs hybrid lexical plus vector search, then commerce ranking on stock, velocity, and margin. Not LangChain on PDFs.</description><pubDate>Sun, 27 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If your &quot;catalog AI&quot; is a PDF tutorial wearing a Shopify hoodie, you will ship confident answers that recommend out-of-stock, low-margin, or dead SKUs.&lt;/p&gt;

- Document RAG optimizes for passage relevance. Commerce RAG has to optimize for sellable, profitable products.
- Retrieve with hybrid lexical plus vector search, then rank on live stock, velocity, margin and merchandising rules.
- Keep price and inventory out of the embedding. Read them live at query time.

&lt;p&gt;Document RAG optimizes for &lt;strong&gt;passage relevance&lt;/strong&gt;. Commerce RAG optimizes for &lt;strong&gt;sellable, profitable, in-policy products&lt;/strong&gt;. Same family of techniques. Different system design.&lt;/p&gt;
&lt;p&gt;This post is the cut line for Shopify Plus (and any large catalog) work: hybrid lexical + vector retrieval, then a &lt;strong&gt;commerce ranking&lt;/strong&gt; layer that uses live stock, velocity, margin, and merchandising rules.&lt;/p&gt;
&lt;p&gt;Pair it with &lt;a href=&quot;https://ansezz.com/blog/why-your-rag-is-failing/&quot;&gt;why your RAG is failing&lt;/a&gt;, &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;7 RAG mistakes in production&lt;/a&gt;, and agent-facing catalog tools via &lt;a href=&quot;https://ansezz.com/blog/shopify-ucp-quick-start/&quot;&gt;Shopify UCP quick-start&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Document RAG assumed a handbook&lt;/h2&gt;
&lt;p&gt;Classic demo loop:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Chunk a PDF or help center.&lt;/li&gt;
&lt;li&gt;Embed chunks once.&lt;/li&gt;
&lt;li&gt;Retrieve top-k by cosine similarity.&lt;/li&gt;
&lt;li&gt;Stuff passages into the prompt.&lt;/li&gt;
&lt;li&gt;Generate an answer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That works when the truth is mostly static prose. Policies, runbooks, warranty text.&lt;/p&gt;
&lt;p&gt;It fails when the &quot;document&quot; is a &lt;strong&gt;product graph&lt;/strong&gt; whose price, inventory, and variants change every minute.&lt;/p&gt;
&lt;p&gt;A product is not a paragraph.&lt;/p&gt;
&lt;p&gt;It is title, options, collections, metafields, media, and a set of &lt;strong&gt;volatile facts&lt;/strong&gt; that should never be baked into the only retrieval score.&lt;/p&gt;
&lt;h2&gt;What catalog RAG actually has to do&lt;/h2&gt;
&lt;p&gt;For storefront search, chat commerce, and agent tools (including UCP &lt;code&gt;search_catalog&lt;/code&gt; / &lt;code&gt;get_product&lt;/code&gt; on &lt;code&gt;/api/ucp/mcp&lt;/code&gt;), the job is closer to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Understand intent&lt;/strong&gt; (gift under $50, waterproof trail shoe, restock of last order).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retrieve candidates&lt;/strong&gt; that match language &lt;em&gt;and&lt;/em&gt; identifiers (SKU, barcode, vendor code).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filter&lt;/strong&gt; to what can actually sell in this market right now.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rank&lt;/strong&gt; by business outcomes, not only semantic score.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ground the agent&lt;/strong&gt; with live fields before it speaks price or availability.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Shopify&apos;s Storefront Catalog MCP gives agents a search surface. It does not replace your ranking philosophy for a custom Plus app, Hydrogen search, or internal shopping agent.&lt;/p&gt;
&lt;p&gt;Treat MCP as a channel. Own retrieval quality behind it when you build custom.&lt;/p&gt;
&lt;h2&gt;Stage 1: hybrid lexical + vector&lt;/h2&gt;
&lt;p&gt;Pure vector search misses exact SKUs, model numbers, and brand strings the embedding smoothed away. Pure BM25 / keyword search misses &quot;shoes for wide feet on wet rock&quot; when the title says &quot;trail runner.&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hybrid retrieval&lt;/strong&gt; runs both and fuses ranks (reciprocal rank fusion or a tuned weighted blend). That is the same medicine as general production RAG (&lt;a href=&quot;https://ansezz.com/blog/why-your-rag-is-failing/&quot;&gt;why your RAG is failing&lt;/a&gt;), applied to product text fields: title, description, tags, option names, curated metafields.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;Practical embedding content:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prefer stable descriptive text and attributes.&lt;/li&gt;
&lt;li&gt;Keep identifiers searchable in the lexical index.&lt;/li&gt;
&lt;li&gt;Re-embed on content changes (product update webhooks), not on every inventory tick.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are on pgvector in Laravel, the hybrid pattern still holds: SQL &lt;code&gt;tsvector&lt;/code&gt; / external search engine for lexical, ANN for semantic, fuse, then rank.&lt;/p&gt;
&lt;p&gt;Stack choice is secondary to the split. See &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;picking the right RAG stack&lt;/a&gt; when you are still selecting stores.&lt;/p&gt;

Search your catalog assistant for an exact SKU and for a plain-language need. If one of them fails, you need the other half of hybrid retrieval.

&lt;h2&gt;Stage 2: commerce ranking is not optional&lt;/h2&gt;
&lt;p&gt;Retrieval returns a candidate set. Commerce ranking decides what a buyer or agent should see first.&lt;/p&gt;
&lt;p&gt;Signals that belong &lt;strong&gt;after&lt;/strong&gt; hybrid retrieve (illustrative, tune per vertical):&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;In-stock / location available&lt;/td&gt;
&lt;td&gt;Semantic winners that cannot ship are false friends&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sales velocity (7/30-day)&lt;/td&gt;
&lt;td&gt;Preference for what actually converts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Margin / contribution&lt;/td&gt;
&lt;td&gt;Ambiguous queries should not default to junk economics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Return rate&lt;/td&gt;
&lt;td&gt;High semantic fit with high returns hurts trust&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Campaign pins / suppressions&lt;/td&gt;
&lt;td&gt;Merchandising is policy, not cosine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Newness / overstock&lt;/td&gt;
&lt;td&gt;Launch windows and aging inventory need soft boosts&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;A product that is &quot;perfectly similar&quot; and converts poorly is a bad recommendation. The embedding does not know that unless you engineer the signal into ranking (or into a learned reranker that consumes those features).&lt;/p&gt;
&lt;p&gt;Do not pretend one cosine score encodes margin. It does not.&lt;/p&gt;
&lt;h2&gt;Keep volatile fields out of the vector&lt;/h2&gt;
&lt;figure&gt;
&lt;p&gt;Common failure mode: concatenate &lt;code&gt;&quot;price: $49 in stock: 3 margin: high&quot;&lt;/code&gt; into the embedding text. Overnight a sale and a sell-through change the truth; the vector still argues yesterday.&lt;/p&gt;

  &lt;div&gt;Price, stock and margin are concatenated into the embedding text, and the vector still argues yesterday.&lt;/div&gt;
  &lt;div&gt;The index holds descriptive content. Price and stock come in at query time. Margin and velocity feed the ranker.&lt;/div&gt;

&lt;p&gt;Better split:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;In the index:&lt;/strong&gt; descriptive and categorical content you are willing to re-embed on product edits.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;At query time:&lt;/strong&gt; price, inventory, availability by market, active discounts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;In the ranker:&lt;/strong&gt; margin, velocity, return rate, pins, from a fast store updated by Admin/webhooks or ShopifyQL-style metrics exports.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Inventory especially: listen to inventory webhooks (or poll InventoryLevel), keep a KV / Redis / table of live quantities, &lt;strong&gt;filter or demote&lt;/strong&gt; after retrieval. Regenerating embeddings on every stock change is expensive and still races reality.&lt;/p&gt;
&lt;p&gt;This is the ecommerce version of &quot;don&apos;t RAG what should be an API call.&quot; Policies and size guides can live in document RAG. &quot;How many left in EU warehouse?&quot; should not.&lt;/p&gt;

Grep your embedding text builder for price, stock and margin fields, and move each one to a live read.

&lt;h2&gt;Agents make the gap louder&lt;/h2&gt;
&lt;p&gt;A human scanning a PLP can mentally skip sold-out cards. An agent that trusts top-k embeddings will propose them unless you enforce availability and policy in the tool layer.&lt;/p&gt;
&lt;p&gt;For agentic commerce:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ground answers with &lt;code&gt;get_product&lt;/code&gt; (or Admin/Storefront live reads) before stating price or stock.&lt;/li&gt;
&lt;li&gt;Prefer catalog tools that already filter &lt;code&gt;available&lt;/code&gt; when the Shopify catalog extension is in play; still verify before checkout.&lt;/li&gt;
&lt;li&gt;Put ranking rules in code and skills, not only in prompt text. Prompts drift; filters do not.&lt;/li&gt;
&lt;li&gt;Secure the path: agents should not hold broad Admin credentials. See &lt;a href=&quot;https://ansezz.com/blog/secure-agentic-commerce-shopify/&quot;&gt;secure agentic commerce on Shopify&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Agent channels (UCP / MCP) amplify whatever retrieval quality you already have. They do not invent merchandising judgment.&lt;/p&gt;
&lt;h2&gt;A minimal architecture checklist&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Separate &lt;strong&gt;document corpora&lt;/strong&gt; (policies, FAQs) from &lt;strong&gt;catalog indices&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Hybrid retrieve on catalog text; fuse lexical + vector.&lt;/li&gt;
&lt;li&gt;Filter with &lt;strong&gt;live&lt;/strong&gt; stock and market availability.&lt;/li&gt;
&lt;li&gt;Rank with velocity, margin, returns, and campaign rules.&lt;/li&gt;
&lt;li&gt;Re-embed on content webhooks; never on pure inventory ticks.&lt;/li&gt;
&lt;li&gt;Eval with commerce metrics (purchase rate, regret, stock-miss rate), not only nDCG on title similarity.&lt;/li&gt;
&lt;li&gt;For chat/agents, require a live product read before money language.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You do not need a research lab to start. You need the humility to stop treating SKUs like PDF chunks.&lt;/p&gt;

- Document RAG optimizes passage relevance; commerce RAG must optimize sellable outcomes.
- Hybrid lexical + vector retrieval catches SKUs and semantic intent; neither alone is enough at catalog scale.
- Ranking on stock, velocity, margin, and merchandising rules comes **after** retrieval.
- Keep price and inventory out of embeddings; read them live.
- Agents will confidently recommend bad stock unless tools and filters enforce reality.
- Evaluate with commerce outcomes, not only embedding similarity demos.

&lt;p&gt;If your catalog assistant still chunks product CSVs like a handbook, which false recommendation would hurt more this week: an out-of-stock hero SKU, or an in-stock low-margin substitute that crowds out the product you actually wanted to sell?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>rag</category><category>ai</category><category>llm</category><category>agentic-commerce</category><category>pgvector</category></item><item><title>Migrate Storefront MCP carts to UCP Cart MCP</title><link>https://ansezz.com/blog/migrate-storefront-mcp-cart-to-ucp/</link><guid isPermaLink="true">https://ansezz.com/blog/migrate-storefront-mcp-cart-to-ucp/</guid><description>Storefront MCP get_cart and update_cart on /api/mcp are deprecated. Move agents to UCP Cart MCP at /api/ucp/mcp with create, get, update, and cancel.</description><pubDate>Fri, 25 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If your shopping agent still calls &lt;code&gt;get_cart&lt;/code&gt; and &lt;code&gt;update_cart&lt;/code&gt; on &lt;code&gt;https://{shop}.myshopify.com/api/mcp&lt;/code&gt;, you are running on deprecated tools.&lt;/p&gt;

- Storefront MCP cart tools on `/api/mcp` lost maintenance on August 31, 2026. Move to UCP Cart MCP at `/api/ucp/mcp`.
- UCP gives you four tools: `create_cart`, `get_cart`, `update_cart` and `cancel_cart`, and every call needs your agent profile.
- `update_cart` replaces the whole cart. Send the full state every time or you will empty carts.

&lt;p&gt;Shopify announced the deprecation on June 24, 2026. Maintenance for those Storefront MCP cart tools ended on &lt;strong&gt;August 31, 2026&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Agents that have not moved are now on unmaintained tools, and they can fail mid-conversation while buyers still expect a cart.&lt;/p&gt;
&lt;p&gt;The replacement is &lt;strong&gt;UCP Cart MCP&lt;/strong&gt; at &lt;code&gt;https://{shop-domain}/api/ucp/mcp&lt;/code&gt;. Same commerce job. Different endpoint, tool set, and request shape.&lt;/p&gt;
&lt;p&gt;This post is the migration map: what breaks, what replaces it, and a checklist you can run against any agent still wired to &lt;code&gt;/api/mcp&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For the broader agent-ready storefront story, start with the &lt;a href=&quot;https://ansezz.com/blog/shopify-ucp-quick-start/&quot;&gt;Shopify UCP quick-start&lt;/a&gt; and &lt;a href=&quot;https://ansezz.com/blog/secure-agentic-commerce-shopify/&quot;&gt;secure agentic commerce on Shopify&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;What is being deprecated&lt;/h2&gt;
&lt;p&gt;On Storefront MCP (&lt;code&gt;/api/mcp&lt;/code&gt;), cart support was essentially two tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;get_cart&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;update_cart&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Those tools mixed &quot;create if missing&quot; behavior into update, patched line items like a classic AJAX cart, and lived next to policy search on the legacy storefront MCP surface.&lt;/p&gt;
&lt;p&gt;UCP Cart MCP implements the UCP cart capability (&lt;code&gt;dev.ucp.shopping.cart&lt;/code&gt;, version &lt;code&gt;2026-08-25&lt;/code&gt; in current Shopify docs) and exposes four tools on &lt;code&gt;/api/ucp/mcp&lt;/code&gt;:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Job&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;create_cart&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Start a cart with line items and optional buyer context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_cart&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Read current cart state and estimated totals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;update_cart&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Replace&lt;/strong&gt; the full cart state (PUT semantics)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cancel_cart&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete the cart; requires an idempotency key&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Catalog discovery (&lt;code&gt;search_catalog&lt;/code&gt;, &lt;code&gt;lookup_catalog&lt;/code&gt;, &lt;code&gt;get_product&lt;/code&gt;) already moved toward the UCP endpoint. Cart is catching up. Treat &lt;code&gt;/api/mcp&lt;/code&gt; cart calls as a compatibility shim, not a long-term contract.&lt;/p&gt;
&lt;p&gt;Official references: &lt;a href=&quot;https://shopify.dev/changelog/storefront-mcp-cart-tools-are-being-deprecated-in-favour-of-ucp-cart-mcp&quot;&gt;deprecation changelog&lt;/a&gt; and &lt;a href=&quot;https://shopify.dev/docs/agents/carts-and-checkout/cart-mcp&quot;&gt;Cart MCP docs&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Endpoint and request shape&lt;/h2&gt;
&lt;p&gt;Point every cart &lt;code&gt;tools/call&lt;/code&gt; at:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;POST https://{shop-domain}/api/ucp/mcp
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cart tools accept &lt;strong&gt;unauthenticated&lt;/strong&gt; requests. That lets an agent estimate totals and share a &lt;code&gt;continue_url&lt;/code&gt; before the buyer signs in.&lt;/p&gt;
&lt;p&gt;Checkout is a different server with stricter auth and rate limits; keep exploratory work on Cart MCP.&lt;/p&gt;
&lt;h3&gt;The meta block&lt;/h3&gt;
&lt;p&gt;Every cart call must include &lt;code&gt;meta&lt;/code&gt; in &lt;code&gt;arguments&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;meta&quot;: {
    &quot;ucp-agent&quot;: {
      &quot;profile&quot;: &quot;https://your-agent.example/.well-known/ucp&quot;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That profile URI is how the merchant negotiates capabilities. Skipping it is not a soft warning; it is a failed request.&lt;/p&gt;
&lt;p&gt;Hosting that profile is the agent equivalent of registering an OAuth app. Pair this post with the secure agentic commerce guidance when you harden trust tiers.&lt;/p&gt;
&lt;h3&gt;Ids and responses&lt;/h3&gt;
&lt;p&gt;For &lt;code&gt;get_cart&lt;/code&gt;, &lt;code&gt;update_cart&lt;/code&gt;, and &lt;code&gt;cancel_cart&lt;/code&gt;, pass the cart id as a &lt;strong&gt;top-level&lt;/strong&gt; &lt;code&gt;id&lt;/code&gt; in &lt;code&gt;arguments&lt;/code&gt;. Do not nest &lt;code&gt;id&lt;/code&gt; inside the &lt;code&gt;cart&lt;/code&gt; object on write.&lt;/p&gt;
&lt;p&gt;Responses land in &lt;code&gt;result.structuredContent&lt;/code&gt;. Read the &lt;code&gt;cart&lt;/code&gt; object there.&lt;/p&gt;
&lt;p&gt;Business problems (expired cart, quantity adjusted) often arrive as a successful JSON-RPC &lt;code&gt;result&lt;/code&gt; with entries in &lt;code&gt;cart.messages&lt;/code&gt;, not as a protocol &lt;code&gt;error&lt;/code&gt;. If your client only checks JSON-RPC errors, you will miss quantity adjustments and &lt;code&gt;not_found&lt;/code&gt;.&lt;/p&gt;

Add a check in your tool wrapper that reads `structuredContent.cart.messages` on every response, even when JSON-RPC reports success.

&lt;h2&gt;create_cart is not optional&lt;/h2&gt;
&lt;p&gt;Legacy &lt;code&gt;update_cart&lt;/code&gt; often created a cart when no id was sent. UCP splits that out.&lt;/p&gt;
&lt;p&gt;Use &lt;code&gt;create_cart&lt;/code&gt; when the buyer has selected variants and you want estimated totals, multi-turn edits, or a shareable &lt;code&gt;continue_url&lt;/code&gt; without starting checkout. Include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cart.line_items[]&lt;/code&gt; with &lt;code&gt;quantity&lt;/code&gt; and &lt;code&gt;item.id&lt;/code&gt; (variant GID, which my &lt;a href=&quot;https://ansezz.com/tools/shopify-gid-decoder/&quot;&gt;Shopify GID decoder&lt;/a&gt; can unpack)&lt;/li&gt;
&lt;li&gt;optional &lt;code&gt;context&lt;/code&gt; (&lt;code&gt;address_country&lt;/code&gt;, region, postal code) for pricing and availability hints&lt;/li&gt;
&lt;li&gt;optional &lt;code&gt;attribution&lt;/code&gt; (UTM / click ids) if you will later convert to checkout&lt;/li&gt;
&lt;li&gt;optional &lt;code&gt;buyer&lt;/code&gt; for personalized estimates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you plan to call Checkout MCP &lt;code&gt;create_checkout&lt;/code&gt; with this cart, set attribution on the cart &lt;strong&gt;before&lt;/strong&gt; conversion. The merchant uses the cart&apos;s line items, context, buyer, and attribution when creating checkout and ignores overlapping fields in the checkout payload.&lt;/p&gt;
&lt;p&gt;When the buyer is ready to pay, pass the cart &lt;code&gt;id&lt;/code&gt; as &lt;code&gt;cart_id&lt;/code&gt; into &lt;code&gt;create_checkout&lt;/code&gt;. Conversion is idempotent for the same cart id.&lt;/p&gt;
&lt;h2&gt;PUT semantics will break naive agents&lt;/h2&gt;
&lt;p&gt;This is the sharp edge of the migration.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;update_cart&lt;/code&gt; on UCP Cart MCP &lt;strong&gt;replaces&lt;/strong&gt; the cart. Omit &lt;code&gt;line_items&lt;/code&gt;, &lt;code&gt;context&lt;/code&gt;, or &lt;code&gt;attribution&lt;/code&gt; and those fields are removed. There is no server-side merge.&lt;/p&gt;
&lt;p&gt;That differs from Storefront API and AJAX cart mutations, and from the old Storefront MCP patch-style mental model.&lt;/p&gt;

  &lt;div&gt;Send only the field that changed and let the server merge it.&lt;/div&gt;
  &lt;div&gt;Send the entire desired cart, including `attribution` and `context`, on every update.&lt;/div&gt;

&lt;figure&gt;
&lt;p&gt;Practical rules for agent tool wrappers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Keep the last known full cart snapshot in your session store.&lt;/li&gt;
&lt;li&gt;Apply the buyer&apos;s delta in your code (qty change, remove line, new postal code).&lt;/li&gt;
&lt;li&gt;Send the &lt;strong&gt;entire&lt;/strong&gt; desired &lt;code&gt;cart&lt;/code&gt; object on every &lt;code&gt;update_cart&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Resend &lt;code&gt;attribution&lt;/code&gt; and &lt;code&gt;context&lt;/code&gt; if you still want them.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you teach the model &quot;just send the field that changed,&quot; you will empty carts in production.&lt;/p&gt;
&lt;p&gt;Put that rule in the tool description and in your skill playbook, not only in a human README.&lt;/p&gt;
&lt;h2&gt;cancel_cart needs an idempotency key&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;cancel_cart&lt;/code&gt; requires &lt;code&gt;meta[&quot;idempotency-key&quot;]&lt;/code&gt; as a &lt;a href=&quot;https://ansezz.com/tools/uuid-generator/&quot;&gt;UUID&lt;/a&gt; in addition to &lt;code&gt;ucp-agent.profile&lt;/code&gt;. Cancel removes the cart from storage. Later &lt;code&gt;get_cart&lt;/code&gt; returns a business &lt;code&gt;not_found&lt;/code&gt; outcome.&lt;/p&gt;
&lt;p&gt;Use cancel when the buyer abandons, or when you need to clear a stale cart before starting clean.&lt;/p&gt;
&lt;p&gt;Retries without a stable idempotency key are how you get confusing double-cancel paths. The same discipline shows up in &lt;a href=&quot;https://ansezz.com/blog/mcp-idempotency-laravel-mutations/&quot;&gt;MCP idempotency for Laravel mutations&lt;/a&gt; even when the server is Shopify&apos;s, not yours.&lt;/p&gt;
&lt;h2&gt;Cart vs checkout: keep exploration cheap&lt;/h2&gt;
&lt;p&gt;Carts are long-lived browsing containers. Checkouts are short-lived purchase sessions with stricter freshness and rate limits.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use case&lt;/th&gt;
&lt;th&gt;Prefer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Multi-turn browsing and total estimates&lt;/td&gt;
&lt;td&gt;Cart MCP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Share a link with the buyer&lt;/td&gt;
&lt;td&gt;Cart MCP &lt;code&gt;continue_url&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Buyer ready to purchase&lt;/td&gt;
&lt;td&gt;Checkout MCP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complete payment in your app&lt;/td&gt;
&lt;td&gt;Checkout MCP&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Rate limits scale with how the agent identifies itself (Bearer, signed, anonymous). Anonymous Cart MCP works for exploration; Checkout MCP does not. Keep chatty quantity tweaks off checkout tools.&lt;/p&gt;
&lt;p&gt;This split matches the &lt;a href=&quot;https://ansezz.com/blog/mcp-vs-a2a-vs-acp/&quot;&gt;MCP vs A2A vs ACP&lt;/a&gt; idea: pick the protocol surface that matches the job, not the one your first tutorial used.&lt;/p&gt;
&lt;h2&gt;Migration checklist for agents on /api/mcp&lt;/h2&gt;
&lt;figure&gt;
&lt;p&gt;Run this against every agent, skill, and integration that still mentions Storefront MCP carts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Find callers.&lt;/strong&gt; Search for &lt;code&gt;/api/mcp&lt;/code&gt;, &lt;code&gt;get_cart&lt;/code&gt;, and &lt;code&gt;update_cart&lt;/code&gt; in agent configs, MCP client URLs, and tool wrappers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retarget the endpoint&lt;/strong&gt; to &lt;code&gt;/api/ucp/mcp&lt;/code&gt; for cart tools.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add &lt;code&gt;create_cart&lt;/code&gt;&lt;/strong&gt; as an explicit step; stop inventing carts inside update.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Require &lt;code&gt;meta.ucp-agent.profile&lt;/code&gt;&lt;/strong&gt; on every cart call.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Store and resend full cart state&lt;/strong&gt; on &lt;code&gt;update_cart&lt;/code&gt; (PUT semantics).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pass cart id as top-level &lt;code&gt;id&lt;/code&gt;&lt;/strong&gt; for get, update, and cancel.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add UUID &lt;code&gt;idempotency-key&lt;/code&gt;&lt;/strong&gt; for &lt;code&gt;cancel_cart&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parse &lt;code&gt;structuredContent.cart.messages&lt;/code&gt;&lt;/strong&gt; for business outcomes (&lt;code&gt;not_found&lt;/code&gt;, &lt;code&gt;quantity_adjusted&lt;/code&gt;, and friends).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wire checkout separately:&lt;/strong&gt; cart id into &lt;code&gt;create_checkout&lt;/code&gt; only when the buyer commits.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dogfood on staging before you cut over.&lt;/strong&gt; Hit a staging shop with create → update (full replace) → get → cancel → create_checkout.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you are still designing the product around agents rather than bolting MCP onto a human-only flow, the &lt;a href=&quot;https://ansezz.com/blog/mcp-first-is-the-new-mobile-first/&quot;&gt;MCP first&lt;/a&gt; framing helps: ship the cart tools and skills as the capability contract, then let the chat UI sit on top.&lt;/p&gt;

Start with step 1 today: search your agent configs and tool wrappers for `/api/mcp` and list every hit.


- Storefront MCP `get_cart` / `update_cart` on `/api/mcp` are deprecated; maintenance ended August 31, 2026. Migrate now.
- Migrate cart traffic to UCP Cart MCP at `/api/ucp/mcp` with `create_cart`, `get_cart`, `update_cart`, and `cancel_cart`.
- Every request needs `meta.ucp-agent.profile`; cancel also needs a UUID idempotency key.
- `update_cart` is full replacement. Partial payloads wipe omitted fields.
- Keep browsing on Cart MCP; move to Checkout MCP only when the buyer is ready to pay.
- Treat `cart.messages` as first-class outcomes, not optional log noise.

&lt;p&gt;If your agent still hard-codes &lt;code&gt;/api/mcp&lt;/code&gt; for carts, which step fails first in staging: missing agent profile, empty cart after a partial update, or a checkout call that never saw a real cart id?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>agentic-commerce</category><category>mcp</category><category>agentic-ai</category><category>ai</category></item><item><title>One Shopify claims pipeline for every claim type</title><link>https://ansezz.com/blog/shopify-claims-pipeline-claimify/</link><guid isPermaLink="true">https://ansezz.com/blog/shopify-claims-pipeline-claimify/</guid><description>A returns policy is not a returns process. Build one Shopify claims pipeline for returns, damage, and warranty: file, eligibility, queue, Shopify resolve.</description><pubDate>Mon, 21 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Your returns policy PDF is not a returns process.&lt;/p&gt;

- One pipeline can carry returns, damage claims and warranty, as long as the claim type decides rules, evidence and resolutions.
- A claim counts as done only after a refund, replacement or credit lands in Shopify with an audit record.
- Let rules handle the routine claims so your team spends its time on the hard ones.

&lt;p&gt;A customer emails a blurry photo of a cracked box. Support digs through orders to confirm the purchase. Someone promises a refund in Slack.&lt;/p&gt;
&lt;p&gt;Three days later the same claim is still &quot;waiting on photos,&quot; and nobody can say who owns it. That is not a claims system. That is an inbox wearing a policy hat.&lt;/p&gt;
&lt;p&gt;I built &lt;a href=&quot;https://apps.shopify.com/claimify&quot;&gt;Claimify&lt;/a&gt; because I kept seeing the same pattern on Shopify stores: every claim type sprawling into its own spreadsheet, helpdesk macro, or ad-hoc Google Form. Returns in one place. Damage in another. Warranty buried in a shared mailbox.&lt;/p&gt;
&lt;p&gt;The fix is not a prettier form. It is one end-to-end pipeline that every claim type walks through, from the moment a customer files to the moment Shopify actually refunds, replaces, or credits.&lt;/p&gt;
&lt;h2&gt;Policy is not process&lt;/h2&gt;
&lt;p&gt;A policy answers &lt;em&gt;what&lt;/em&gt; you allow. A process answers &lt;em&gt;how&lt;/em&gt; it moves.&lt;/p&gt;

  &lt;div&gt;&quot;You have 30 days to return unused items.&quot;&lt;/div&gt;
  &lt;div&gt;The customer files from their order, eligibility checks the fulfilment date and product tags, the claim lands in a queue with an owner, photos are required when the type needs them, and resolution writes back to Shopify with an audit trail.&lt;/div&gt;

&lt;p&gt;If you only publish the policy, every exception becomes a negotiation in email. If you only build a form without states, you get a ticket graveyard.&lt;/p&gt;
&lt;p&gt;The pipeline is the missing middle: typed claim in, typed resolution out, with explicit transitions in between.&lt;/p&gt;
&lt;h2&gt;What &quot;any claim type&quot; actually means&lt;/h2&gt;
&lt;p&gt;&quot;Claims&quot; is not a synonym for returns. On a real storefront you usually need at least:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Returns and exchanges (RMA)&lt;/strong&gt; with tracking states: requested, label issued, in transit, received, inspected, resolved.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Damage on arrival&lt;/strong&gt; with photo requirements up front, not after three reply-all threads.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Warranty&lt;/strong&gt; as a first-class lifecycle: policies, registration, serials, coverage windows. Not a renamed return form with the word &quot;warranty&quot; in the title.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Refund and goodwill paths&lt;/strong&gt; that are still claims, even when no product comes back.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One queue can hold all of them if the type is a field on the claim, not a separate product.&lt;/p&gt;
&lt;p&gt;Claim type drives which eligibility rules run, which evidence is required, and which resolutions are legal for that SKU. That is the difference between a generic &quot;support form&quot; and a claims system.&lt;/p&gt;

List every place a claim can arrive today (email, chat, forms, DMs). Each one is a queue nobody owns.

&lt;h2&gt;Customer file to merchant resolve&lt;/h2&gt;
&lt;figure&gt;
&lt;p&gt;The loop should be boring and complete.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Customer side.&lt;/strong&gt; File from the account page, from an order action, or from a theme app block on a help page. Pick the order line, pick the claim type, describe the issue, attach evidence. No copying order numbers into a contact form that pretend-matches later.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Merchant side.&lt;/strong&gt; The claim opens in Shopify Admin with live order context: line items, fulfilment dates, customer tags, previous claims on the same order.&lt;/p&gt;
&lt;p&gt;Assign an owner. Move it through a Kanban (new, review, resolve) or list view. Comment with history that does not vanish when someone leaves the company.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Integrations.&lt;/strong&gt; Status changes should fire webhooks and talk to the tools you already run: Shopify Flow, Gorgias, Klaviyo, Zapier, Make. The helpdesk does not need to &lt;em&gt;be&lt;/em&gt; the system of record. It needs to stay in sync with it.&lt;/p&gt;
&lt;p&gt;If a claim can die in a thread without a state change, you do not have a pipeline. You have chat.&lt;/p&gt;
&lt;h2&gt;Warranty is its own lifecycle&lt;/h2&gt;
&lt;p&gt;Warranty is where most &quot;claims apps&quot; quietly fail. They slap a warranty label on a return flow and call it done.&lt;/p&gt;
&lt;p&gt;That breaks the moment you need registration, a serial number, a coverage window that starts at fulfilment (or at first activation), or a different resolution set than a 30-day return.&lt;/p&gt;
&lt;p&gt;Treat warranty as a product surface:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Register&lt;/strong&gt; against the order and serial when you care about authenticity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Policy&lt;/strong&gt; with explicit windows, covered failure modes, and excluded SKUs or vendors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Claim&lt;/strong&gt; with the evidence that policy demands.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resolve&lt;/strong&gt; into Shopify: refund, replacement draft order, gift card, discount, store credit, or a custom out-of-band path that still records the decision.&lt;/li&gt;
&lt;/ol&gt;
&lt;figure&gt;
&lt;p&gt;I shipped Claimify with warranty as a first-class path for exactly this reason. The App Store listing is under XCO Apps; the product thesis is the same either way: warranty is not a renamed form.&lt;/p&gt;
&lt;p&gt;Details and constraints from the build are on the &lt;a href=&quot;https://ansezz.com/work/claimify-warranty-claims/&quot;&gt;Claimify work page&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Resolutions that hit Shopify, not spreadsheets&lt;/h2&gt;
&lt;p&gt;A claim is not resolved when someone types &quot;approved&quot; in Slack. It is resolved when money or inventory moves in Shopify and the audit row says who did it, when, and why.&lt;/p&gt;
&lt;p&gt;That means resolution actions should map to real Admin API outcomes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Refund against the original order (partial or full).&lt;/li&gt;
&lt;li&gt;Replacement via draft order (or your fulfilment path) so inventory and shipping are first-class.&lt;/li&gt;
&lt;li&gt;Gift card, discount code, or store credit when that is the goodwill path.&lt;/li&gt;
&lt;li&gt;Custom resolution when the merchant still needs a recorded decision without an automatic money move.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Copy-pasting order IDs between tabs is how refunds get double-issued and how replacements ship without a paper trail.&lt;/p&gt;
&lt;p&gt;Keep order context live from the GraphQL Admin API. Do not cache a stale snapshot as the source of truth for money.&lt;/p&gt;
&lt;h2&gt;Rules that take the easy half of the queue&lt;/h2&gt;
&lt;p&gt;Not every claim needs a human. Auto-approval and eligibility rules can handle the boring cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Time since fulfilment (or since delivery) for returns vs warranty windows.&lt;/li&gt;
&lt;li&gt;Product tags, collections, vendors, and customer tags.&lt;/li&gt;
&lt;li&gt;Required photos for damage and some warranty types.&lt;/li&gt;
&lt;li&gt;Claim type and order totals that are safe to auto-approve under a cap.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The point is not to remove judgment. It is to stop burning senior support time on &quot;yes, this is inside the 14-day window and the tag says returnable.&quot;&lt;/p&gt;
&lt;p&gt;Humans stay on the edge cases. Rules handle the rest, and every auto decision still writes an audit event.&lt;/p&gt;
&lt;p&gt;Public numbers from the Claimify listing, nothing invented: 5.0 from 6 reviews, plans at $9 / $19 / $49, and a 3-day trial. Useful as a product fact. Useless as a substitute for your own ops metrics.&lt;/p&gt;

Pull last month&apos;s claims and mark the ones a simple rule (window, tag, photo present) could have approved. That share is your first auto-approval target.

&lt;h2&gt;Engineering notes from shipping it&lt;/h2&gt;
&lt;p&gt;A few constraints that mattered when I built this as an embedded Shopify app (Laravel backend, Remix + App Bridge + Polaris admin, evidence on S3/R2):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stay in Admin.&lt;/strong&gt; Merchants abandon separate portals. App Bridge + Polaris keep triage where they already work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Live order context.&lt;/strong&gt; Pull line items and fulfilment from the GraphQL Admin API at decision time. Do not resolve against a stale copy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explicit state transitions.&lt;/strong&gt; Every move is an event: for audit history, for webhooks, for Flow and helpdesk sync.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evidence off the app servers.&lt;/strong&gt; Signed uploads to object storage so photo blobs never choke the app process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Protected customer data&lt;/strong&gt; handled to Shopify&apos;s requirements, because claims are full of PII by nature.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are scoping a similar public or private app, the same shape shows up on &lt;a href=&quot;https://ansezz.com/services/shopify-plus-apps/&quot;&gt;Shopify Plus apps&lt;/a&gt;: embedded admin, billing, webhooks, and a real resolution path into Shopify.&lt;/p&gt;

- A policy PDF is not a process. Inbox volume is not a claims system.
- Returns, damage, and warranty can share one pipeline if claim type drives rules, evidence, and allowed resolutions.
- Warranty needs registration, policy windows, and serials as first-class concepts, not a renamed return form.
- Resolution means Shopify money or inventory moved, with an audit row, not a Slack emoji.
- Auto-approval should clear the easy half of the queue; humans keep the edge cases.
- Embed in Admin, keep order context live, treat state changes as events, store evidence outside the app process.

&lt;p&gt;If your claims still live in a shared inbox, which claim type is creating the most silent backlog right now, and what would change if it had to move through one queue with an owner and a Shopify resolution?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>api-design</category><category>production</category><category>architecture</category></item><item><title>Building secure agentic commerce on Shopify in 2026</title><link>https://ansezz.com/blog/secure-agentic-commerce-shopify/</link><guid isPermaLink="true">https://ansezz.com/blog/secure-agentic-commerce-shopify/</guid><description>How agentic commerce on Shopify stays safe: UCP negotiation, an MCP governance layer, scoped credentials, signed requests, and human approval at checkout.</description><pubDate>Fri, 07 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;An AI agent can discover a product, build a cart, and reach checkout faster than a human. It can also make an expensive mistake in seconds.&lt;/p&gt;

- Never hand an agent broad Shopify credentials. Put an MCP governance server between the agent and the store.
- UCP profile negotiation, signed requests and idempotency keys are security controls, not formalities.
- Human approval is a checkout state. Respect `requires_escalation` instead of routing around it.

&lt;p&gt;Agentic commerce changes the security boundary of a Shopify store. A storefront is no longer only serving pages to people.&lt;/p&gt;
&lt;p&gt;It exposes product data, pricing, inventory, fulfillment options, checkout actions, and order state to autonomous software.&lt;/p&gt;
&lt;p&gt;That creates a real problem. If an agent receives broad Shopify credentials, a prompt injection or an implementation bug can expose customer data or trigger an unauthorized transaction.&lt;/p&gt;
&lt;p&gt;The fix isn&apos;t to block agents. It&apos;s to give them a narrow, observable, policy-controlled path through the commerce stack. The principle is short:&lt;/p&gt;
&lt;p&gt;Let the agent reason about commerce, but never let it define its own permissions.&lt;/p&gt;
&lt;h2&gt;The security problem in agentic commerce&lt;/h2&gt;
&lt;p&gt;Traditional Shopify integrations assume a known application, a fixed workflow, and a human reviewing the final checkout screen. Autonomous agents remove all three assumptions.&lt;/p&gt;
&lt;p&gt;A buyer agent may:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Interpret a natural-language request.&lt;/li&gt;
&lt;li&gt;Search product catalogs.&lt;/li&gt;
&lt;li&gt;Compare variants, prices, and delivery options.&lt;/li&gt;
&lt;li&gt;Build a cart across multiple turns.&lt;/li&gt;
&lt;li&gt;Select a payment handler.&lt;/li&gt;
&lt;li&gt;Complete checkout or hand the buyer to a merchant page.&lt;/li&gt;
&lt;li&gt;Monitor fulfillment, refunds, returns, or cancellations.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Every step carries model uncertainty. The agent may misread intent. Product data may be stale. A tool description may be too broad. An external page may carry malicious instructions. A retry may duplicate an action that moves money.&lt;/p&gt;
&lt;p&gt;This is why agentic commerce needs a different engineering model. The agent should never hold unrestricted access to Shopify Admin APIs. It should reach approved commerce capabilities through a controlled protocol layer.&lt;/p&gt;
&lt;h2&gt;How Shopify agentic commerce works with UCP&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Universal Commerce Protocol (UCP)&lt;/strong&gt; gives agents and merchants a standard way to describe capabilities, negotiate compatibility, and execute commerce workflows.&lt;/p&gt;
&lt;p&gt;Shopify&apos;s UCP implementation covers the main buyer journey:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Negotiation and authentication&lt;/li&gt;
&lt;li&gt;Product discovery&lt;/li&gt;
&lt;li&gt;Cart creation and updates&lt;/li&gt;
&lt;li&gt;Checkout creation and completion&lt;/li&gt;
&lt;li&gt;Order monitoring and post-purchase events&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;UCP is not a replacement for Shopify&apos;s commerce APIs. It&apos;s a standardized interaction layer so different agents and merchant systems can speak in shared commerce concepts.&lt;/p&gt;
&lt;p&gt;It supports multiple transports (REST, JSON-RPC, MCP, and A2A, plus the JSON-RPC 2.0 channel behind Shopify&apos;s Embedded Checkout Protocol) while the business logic stays the same.&lt;/p&gt;
&lt;h3&gt;Profile negotiation&lt;/h3&gt;
&lt;p&gt;The mechanism that matters for security is profile negotiation. A merchant publishes a business profile, usually at:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;https://store.example.com/.well-known/ucp
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On Shopify, that profile is tied to the merchant storefront. It&apos;s a self-contained document declaring &lt;code&gt;version&lt;/code&gt;, &lt;code&gt;services&lt;/code&gt;, &lt;code&gt;capabilities&lt;/code&gt;, &lt;code&gt;payment_handlers&lt;/code&gt;, and (via &lt;code&gt;supported_versions&lt;/code&gt;) the profile URIs for older protocol versions. (See the &lt;a href=&quot;https://ansezz.com/blog/shopify-ucp-quick-start/&quot;&gt;Shopify UCP quick-start&lt;/a&gt; for getting the manifest live.)&lt;/p&gt;
&lt;p&gt;The agent hosts its own platform profile at an HTTPS URL and passes that URL on every request through the &lt;code&gt;UCP-Agent&lt;/code&gt; header. The platform profile mirrors the business one and adds a &lt;code&gt;signing_keys&lt;/code&gt; registry.&lt;/p&gt;
&lt;p&gt;That single document is both the capability declaration and the key-resolution mechanism, which is why profile validation is a security control, not a formality.&lt;/p&gt;
&lt;p&gt;Shopify then computes the intersection:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;merchant capabilities ∩ agent capabilities = negotiated capabilities
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Only compatible capabilities become active. Extensions (&lt;code&gt;dev.ucp.shopping.discounts&lt;/code&gt;, &lt;code&gt;dev.ucp.shopping.buyer_consent&lt;/code&gt;, &lt;code&gt;dev.ucp.shopping.fulfillment&lt;/code&gt;) carry an &lt;code&gt;extends&lt;/code&gt; field naming their parent capability, and they never auto-activate. If the parent isn&apos;t in the negotiated set, the extension drops out with it.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;A trimmed platform profile, showing the shape rather than a complete document:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;version&quot;: &quot;2026-04-08&quot;,
  &quot;services&quot;: {
    &quot;dev.ucp.shopping&quot;: {}
  },
  &quot;capabilities&quot;: {
    &quot;dev.ucp.shopping.cart&quot;: {},
    &quot;dev.ucp.shopping.checkout&quot;: {}
  },
  &quot;signing_keys&quot;: [
    {
      &quot;kty&quot;: &quot;EC&quot;,
      &quot;crv&quot;: &quot;P-256&quot;,
      &quot;kid&quot;: &quot;agent-2026-08&quot;,
      &quot;x&quot;: &quot;...&quot;,
      &quot;y&quot;: &quot;...&quot;
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Protocol versions are still moving through 2026. Check the &lt;a href=&quot;https://ucp.dev/specification/reference/&quot;&gt;UCP specification&lt;/a&gt; for the current registry shape.&lt;/p&gt;
&lt;p&gt;Pin the version your integration uses, validate it strictly, and test version negotiation before rollout. Never silently downgrade to an older capability set.&lt;/p&gt;
&lt;p&gt;For the wider shift from visual storefronts to programmable commerce, see &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;why agentic commerce will change the way you build Shopify stores&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How do you build secure agentic commerce?&lt;/h2&gt;
&lt;p&gt;You need an intermediate control plane between the agent and Shopify:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;buyer
  ↓
AI agent
  ↓
MCP client
  ↓
intermediate MCP governance server
  ↓
UCP commerce tools
  ↓
Shopify storefront and checkout services
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That governance server is the whole point. It keeps the model off sensitive APIs and gives the team one place to enforce policy.&lt;/p&gt;
&lt;h3&gt;1. Expose task-specific tools&lt;/h3&gt;
&lt;p&gt;Don&apos;t expose a generic &lt;code&gt;shopify_admin_request&lt;/code&gt;. Create narrow tools with explicit inputs and outputs:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;search_products(query, filters)
get_variant(variant_id)
create_cart(lines, buyer_country)
update_cart(cart_id, lines)
create_checkout(cart_id)
get_order(order_id)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One tool, one well-defined job, every parameter validated against a schema before any downstream request.&lt;/p&gt;
&lt;p&gt;Never accept arbitrary GraphQL from an agent. Use fixed queries and allowlisted fields. That prevents data overexposure and shrinks the blast radius of prompt injection.&lt;/p&gt;

  &lt;div&gt;One generic `shopify_admin_request` tool that accepts arbitrary GraphQL.&lt;/div&gt;
  &lt;div&gt;Narrow tools like `search_products` and `create_checkout`, fixed queries and allowlisted fields.&lt;/div&gt;

&lt;h3&gt;2. Keep Admin tokens server-side&lt;/h3&gt;
&lt;p&gt;Admin API tokens belong in a secret manager. Never in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Agent prompts&lt;/li&gt;
&lt;li&gt;Tool responses&lt;/li&gt;
&lt;li&gt;Browser JavaScript&lt;/li&gt;
&lt;li&gt;Client-side logs&lt;/li&gt;
&lt;li&gt;Model context&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agents.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Product descriptions or metafields&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The governance server holds the credential and calls only the minimum Shopify operations required. For public product discovery, prefer Storefront API access with appropriate scopes. Reserve Admin API access for back-office operations that genuinely need it.&lt;/p&gt;
&lt;p&gt;Use separate credentials for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Catalog reads&lt;/li&gt;
&lt;li&gt;Cart and checkout operations&lt;/li&gt;
&lt;li&gt;Order status reads&lt;/li&gt;
&lt;li&gt;Fulfillment or refund workflows&lt;/li&gt;
&lt;li&gt;Internal administrative actions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Revocation and incident analysis get much easier when the blast radius is already partitioned.&lt;/p&gt;

Search your prompts, tool responses, logs and `agents.md` for any Admin API token. Move every one you find into a secret manager.

&lt;h3&gt;3. Apply capability and state policies&lt;/h3&gt;
&lt;p&gt;Authorization depends on both the tool and the current commerce state.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Commerce state&lt;/th&gt;
&lt;th&gt;Allowed actions&lt;/th&gt;
&lt;th&gt;Approval requirement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Discovery&lt;/td&gt;
&lt;td&gt;Search products, read public availability&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cart building&lt;/td&gt;
&lt;td&gt;Add or remove line items, estimate totals&lt;/td&gt;
&lt;td&gt;Optional&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pre-checkout&lt;/td&gt;
&lt;td&gt;Select fulfillment, validate buyer data&lt;/td&gt;
&lt;td&gt;Buyer confirmation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Checkout completion&lt;/td&gt;
&lt;td&gt;Submit payment mandate or complete checkout&lt;/td&gt;
&lt;td&gt;Strong authentication&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Post-purchase&lt;/td&gt;
&lt;td&gt;Read order status, track fulfillment&lt;/td&gt;
&lt;td&gt;Scoped buyer access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;A signed agent is not automatically allowed to complete a purchase. High-risk actions need the right authorization tier, scope, buyer identity, and payment consent.&lt;/p&gt;
&lt;p&gt;Treat every checkout completion as a state transition, not an ordinary tool call.&lt;/p&gt;
&lt;h2&gt;Secure the protocol and the request envelope&lt;/h2&gt;
&lt;p&gt;The protocol has to authenticate more than the model. It authenticates the agent profile, request origin, capability set, and transaction context.&lt;/p&gt;
&lt;p&gt;UCP signs every HTTP-based transport with &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc9421.html&quot;&gt;RFC 9421 HTTP Message Signatures&lt;/a&gt;. Signing is asymmetric: ES256 is mandatory, ES384 optional.&lt;/p&gt;
&lt;p&gt;Public keys are JWKs (RFC 7517) published in the &lt;code&gt;signing_keys&lt;/code&gt; array of the signer&apos;s profile, and the body is bound in through a &lt;code&gt;Content-Digest&lt;/code&gt; header (RFC 9530) computed over the raw body bytes.&lt;/p&gt;
&lt;h3&gt;What the signature covers&lt;/h3&gt;
&lt;p&gt;A request signature covers &lt;code&gt;@method&lt;/code&gt;, &lt;code&gt;@authority&lt;/code&gt;, &lt;code&gt;@path&lt;/code&gt;, the query, &lt;code&gt;ucp-agent&lt;/code&gt;, &lt;code&gt;idempotency-key&lt;/code&gt;, and the content headers. Responses cover &lt;code&gt;@status&lt;/code&gt; instead of the method.&lt;/p&gt;
&lt;p&gt;That component list is the security property worth internalizing. The idempotency key is &lt;em&gt;inside&lt;/em&gt; the signature, so a replayed request can&apos;t be re-pointed at a new operation without invalidating it.&lt;/p&gt;
&lt;p&gt;UCP deliberately handles replay protection at the business layer through idempotency keys rather than at the signature layer; the RFC 9421 &lt;code&gt;created&lt;/code&gt; parameter is optional. If your governance server treats idempotency as an optional convenience, you&apos;ve removed the replay control.&lt;/p&gt;
&lt;p&gt;At the governance layer, verify:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The profile URL from &lt;code&gt;UCP-Agent&lt;/code&gt; uses HTTPS.&lt;/li&gt;
&lt;li&gt;The profile is valid JSON and within size limits.&lt;/li&gt;
&lt;li&gt;The declared UCP version is supported.&lt;/li&gt;
&lt;li&gt;Capabilities use compatible versions.&lt;/li&gt;
&lt;li&gt;Extension &lt;code&gt;extends&lt;/code&gt; dependencies are satisfied.&lt;/li&gt;
&lt;li&gt;The signing key resolves from the declared profile&apos;s &lt;code&gt;signing_keys&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The signature base reconstructs from the required components.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Content-Digest&lt;/code&gt; matches the raw body you actually read.&lt;/li&gt;
&lt;li&gt;Idempotency keys are enforced, stored, and honored on retry.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;HMAC for your own endpoints&lt;/h3&gt;
&lt;p&gt;For custom endpoints, webhooks, or internal proxy routes, HMAC adds a shared-secret check. HMAC does not replace UCP&apos;s asymmetric message-signature model. It&apos;s an extra control where both parties already share a secret.&lt;/p&gt;
&lt;p&gt;A webhook verifier should:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Read the raw request body.&lt;/li&gt;
&lt;li&gt;Compute the HMAC using the expected secret.&lt;/li&gt;
&lt;li&gt;Compare signatures with a constant-time function.&lt;/li&gt;
&lt;li&gt;Reject stale timestamps.&lt;/li&gt;
&lt;li&gt;Record the event ID to prevent replay.&lt;/li&gt;
&lt;li&gt;Process the event idempotently.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In Laravel terms:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$expected = hash_hmac(
    &apos;sha256&apos;,
    $timestamp . &apos;.&apos; . $rawBody,
    $sharedSecret
);

if (!hash_equals($expected, $receivedSignature)) {
    abort(401, &apos;Invalid signature&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Never verify an HMAC over a parsed and re-serialized JSON object. Whitespace and key ordering change the bytes. Verify the original payload.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Human approval is a protocol state&lt;/h2&gt;
&lt;p&gt;Autonomous doesn&apos;t mean every action is automatic.&lt;/p&gt;
&lt;p&gt;UCP models graceful escalation through checkout states such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;incomplete&lt;/code&gt;: required information is missing&lt;/li&gt;
&lt;li&gt;&lt;code&gt;requires_escalation&lt;/code&gt;: buyer input is needed&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ready_for_complete&lt;/code&gt;: everything is collected and the agent may finalize programmatically&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Those three sit alongside &lt;code&gt;complete_in_progress&lt;/code&gt;, &lt;code&gt;completed&lt;/code&gt;, and &lt;code&gt;canceled&lt;/code&gt; in the checkout state machine. A checkout can move back and forth between &lt;code&gt;incomplete&lt;/code&gt; and &lt;code&gt;requires_escalation&lt;/code&gt;, and it can reach &lt;code&gt;canceled&lt;/code&gt; from anywhere.&lt;/p&gt;
&lt;p&gt;An agent may select a product and calculate shipping but still need buyer input for a 3DS challenge, address validation, terms acceptance, age verification, or custom selling terms.&lt;/p&gt;
&lt;h3&gt;Escalation is not an error&lt;/h3&gt;
&lt;p&gt;A &lt;code&gt;requires_escalation&lt;/code&gt; response must carry a &lt;code&gt;continue_url&lt;/code&gt; and at least one message at escalation severity. That&apos;s the merchant handing you a place to send the buyer, plus the reason. Send them there with the cart intact instead of starting over.&lt;/p&gt;
&lt;p&gt;Your agent should not try to route around this state. It should surface the escalation messages verbatim and preserve the exact checkout context the merchant returned.&lt;/p&gt;
&lt;p&gt;The same applies to compliance disclosures. A &lt;code&gt;warning&lt;/code&gt; message with &lt;code&gt;presentation: &quot;disclosure&quot;&lt;/code&gt; (Prop 65, allergens, age restrictions) must be displayed next to the item it applies to, never collapsed or auto-dismissed. If your surface can&apos;t render it faithfully, escalate to &lt;code&gt;continue_url&lt;/code&gt; rather than silently downgrading.&lt;/p&gt;
&lt;p&gt;Add approval gates for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Checkout completion&lt;/li&gt;
&lt;li&gt;Orders above a configured threshold&lt;/li&gt;
&lt;li&gt;Address changes&lt;/li&gt;
&lt;li&gt;Discounts outside policy&lt;/li&gt;
&lt;li&gt;Refunds and cancellations&lt;/li&gt;
&lt;li&gt;Regulated or age-restricted products&lt;/li&gt;
&lt;li&gt;Unusual quantity or velocity patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use idempotency keys on every money-moving request. A retry must not create a second checkout or a duplicate order.&lt;/p&gt;
&lt;h2&gt;Use &lt;a href=&quot;http://agents.md&quot;&gt;agents.md&lt;/a&gt; for discovery and operational policy&lt;/h2&gt;
&lt;p&gt;An &lt;code&gt;agents.md&lt;/code&gt; file helps compatible tools discover how your application expects agents to behave. Treat it as documentation and policy guidance, never as proof of identity or authorization.&lt;/p&gt;
&lt;p&gt;A useful file describes safe defaults, tool boundaries, and failure handling:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Commerce agent guidance

## Safe defaults

- Use catalog tools for product discovery.
- Never request or expose Shopify Admin tokens.
- Ask for buyer confirmation before checkout completion.
- Respect `requires_escalation` responses.

## Tool boundaries

- Do not call arbitrary GraphQL.
- Do not infer inventory when the API returns unknown.
- Do not modify orders without an authenticated buyer session.

## Failure handling

- Retry read operations with backoff.
- Use idempotency keys for writes.
- Log tool name, request ID, policy decision, and result status.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Keep it version-controlled and review changes like code. Sign or hash the policy bundle if your architecture supports it. A compromised instruction file must never grant permissions the server itself doesn&apos;t enforce.&lt;/p&gt;
&lt;p&gt;For more on MCP tool boundaries and context control, see &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;Claude MCP and real-time developer tools&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The same least-privilege rules apply to commerce agents, and the &lt;a href=&quot;https://ansezz.com/blog/agentic-workflows-vibe-coding/&quot;&gt;agentic workflow architecture guide&lt;/a&gt; covers human approval and stateful tool loops.&lt;/p&gt;
&lt;h2&gt;Launch checklist&lt;/h2&gt;
&lt;p&gt;Secure agentic commerce is an API and policy engineering problem, not a prompt design problem. Before launch:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Publish and validate UCP profiles over HTTPS.&lt;/li&gt;
&lt;li&gt;Pin supported protocol and capability versions.&lt;/li&gt;
&lt;li&gt;Put an intermediate MCP governance server between agents and Shopify.&lt;/li&gt;
&lt;li&gt;Expose narrow, schema-validated tools instead of arbitrary API access.&lt;/li&gt;
&lt;li&gt;Keep Admin tokens in a server-side secret manager.&lt;/li&gt;
&lt;li&gt;Use scoped credentials for catalog, checkout, orders, and administration.&lt;/li&gt;
&lt;li&gt;Verify HTTP Message Signatures and rotate keys.&lt;/li&gt;
&lt;li&gt;Add HMAC verification to custom webhooks and proxy endpoints.&lt;/li&gt;
&lt;li&gt;Require idempotency for all writes and payment-related operations.&lt;/li&gt;
&lt;li&gt;Model checkout as explicit states with human escalation.&lt;/li&gt;
&lt;li&gt;Treat &lt;code&gt;agents.md&lt;/code&gt; as guidance, never as authorization.&lt;/li&gt;
&lt;li&gt;Log every tool call, policy decision, signature result, and transaction identifier.&lt;/li&gt;
&lt;li&gt;Test malformed profiles, replay attempts, prompt injection, stale inventory, duplicate retries, and unauthorized checkout attempts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The opportunity in agentic commerce is large, but trust decides which implementations survive production. If you want a second pair of eyes on that boundary, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I work with teams&lt;/a&gt;.&lt;/p&gt;

- Keep the agent on narrow, schema-validated tools behind a governance server. Admin tokens stay server-side.
- Validate UCP profiles, pin versions, and verify signatures and content digests on every request.
- Idempotency keys are your replay control. Treat them as required.
- Model checkout as states, and send the buyer to `continue_url` when escalation is needed.

&lt;p&gt;What authorization boundary stops your Shopify agent from turning a reasonable buyer request into an unauthorized transaction?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>agentic-commerce</category><category>mcp</category><category>security</category><category>ai</category><category>architecture</category></item><item><title>Shopify UCP quick-start: make your store agent-ready</title><link>https://ansezz.com/blog/shopify-ucp-quick-start/</link><guid isPermaLink="true">https://ansezz.com/blog/shopify-ucp-quick-start/</guid><description>AI agents are becoming buyers, and they look for a UCP profile before they can check out. A quick-start to making your Shopify store agent-ready.</description><pubDate>Thu, 28 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;AI agents now shop for people inside ChatGPT, Google AI Mode, Gemini, Copilot and Meta. Before an agent can check out on your store, it reads one JSON file at &lt;code&gt;/.well-known/ucp&lt;/code&gt;.&lt;/p&gt;

- The Universal Commerce Protocol (UCP) is an open standard, co-developed by Shopify and Google, that tells AI agents what your store sells and how to check out.
- On Shopify, agentic storefronts are on by default for eligible stores, and Shopify publishes your UCP profile for you. Check it under Sales channels &amp;gt; Agentic.
- Headless and custom stacks often break discovery by not passing `/.well-known/ucp` through, so open that URL and confirm you get JSON back.

&lt;p&gt;Your store can be invisible to a fast-growing group of buyers: AI agents acting for shoppers.&lt;/p&gt;
&lt;p&gt;If an agent can&apos;t find a machine-readable profile for your Shopify store, it can still mention your products, but it can&apos;t complete a purchase for the shopper.&lt;/p&gt;
&lt;h3&gt;Built for agents with wallets&lt;/h3&gt;
&lt;p&gt;Traditional SEO was built for humans with eyeballs. UCP is built for agents with wallets.&lt;/p&gt;
&lt;p&gt;The rollout is moving fast, and every new AI channel that adopts UCP can sell your products without a new integration. Here is how to make sure your store is ready.&lt;/p&gt;
&lt;h2&gt;Why classic SEO falls short&lt;/h2&gt;
&lt;p&gt;For ten years we tuned meta tags and JSON-LD schema. That was enough when Google was a list of links. We&apos;ve now moved into &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;agentic commerce on Shopify&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Three questions an agent asks&lt;/h3&gt;
&lt;p&gt;Agents don&apos;t browse your collections or look at hero banners. They want three answers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What do you sell?&lt;/li&gt;
&lt;li&gt;Can I buy it right now?&lt;/li&gt;
&lt;li&gt;Which API do I call to check out?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If your site doesn&apos;t answer these in a standard way, the agent moves on to a store that does. Product schema tells an agent what a product &lt;em&gt;is&lt;/em&gt;. UCP tells it how to &lt;em&gt;transact&lt;/em&gt;.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Classic SEO and schema&lt;/th&gt;
&lt;th&gt;UCP profile&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Audience&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Search crawlers and humans&lt;/td&gt;
&lt;td&gt;AI shopping agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Describes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pages and products&lt;/td&gt;
&lt;td&gt;Services, capabilities and payment handlers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lives at&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Page markup&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/.well-known/ucp&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lets the reader&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Rank and display products&lt;/td&gt;
&lt;td&gt;Build a cart and complete checkout&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;figure&gt;
&lt;h2&gt;What is the Universal Commerce Protocol?&lt;/h2&gt;
&lt;p&gt;UCP is an open standard co-developed by Shopify and Google. Shopify lists backers including Amazon, American Express, Etsy, Mastercard, Meta, Microsoft, Salesforce, Stripe, Target, Walmart and Visa.&lt;/p&gt;
&lt;p&gt;It defines a handshake between a business and an AI agent, covering cart creation, checkout, payment and post-purchase.&lt;/p&gt;
&lt;h3&gt;The profile at &lt;code&gt;/.well-known/ucp&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The core of the handshake is a JSON profile at &lt;code&gt;/.well-known/ucp&lt;/code&gt;. When an agent reaches your domain, it fetches this file to learn what you support, then negotiates the capabilities you have in common.&lt;/p&gt;
&lt;p&gt;The spec requires &lt;code&gt;version&lt;/code&gt;, &lt;code&gt;services&lt;/code&gt; and &lt;code&gt;payment_handlers&lt;/code&gt; inside the &lt;code&gt;ucp&lt;/code&gt; object, and &lt;code&gt;capabilities&lt;/code&gt; is optional. Versions are dates; the latest stable release is 2026-08-25. Shopify&apos;s own Admin and Storefront APIs use dated versions too, released every quarter, and my &lt;a href=&quot;https://ansezz.com/tools/shopify-api-versions/&quot;&gt;Shopify API version calendar&lt;/a&gt; shows which ones are still supported.&lt;/p&gt;
&lt;p&gt;Here is a trimmed version of the profile a live Shopify store serves today:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;ucp&quot;: {
    &quot;version&quot;: &quot;2026-08-25&quot;,
    &quot;services&quot;: {
      &quot;dev.ucp.shopping&quot;: [
        {
          &quot;version&quot;: &quot;2026-08-25&quot;,
          &quot;transport&quot;: &quot;mcp&quot;,
          &quot;endpoint&quot;: &quot;https://your-store.myshopify.com/api/ucp/mcp&quot;,
          &quot;schema&quot;: &quot;https://ucp.dev/2026-08-25/services/shopping/mcp.openrpc.json&quot;
        }
      ]
    },
    &quot;capabilities&quot;: {
      &quot;dev.ucp.shopping.checkout&quot;: [
        {
          &quot;version&quot;: &quot;2026-08-25&quot;,
          &quot;schema&quot;: &quot;https://ucp.dev/2026-08-25/schemas/shopping/checkout.json&quot;
        }
      ],
      &quot;dev.ucp.shopping.cart&quot;: [{ &quot;version&quot;: &quot;2026-08-25&quot; }],
      &quot;dev.ucp.shopping.catalog.search&quot;: [{ &quot;version&quot;: &quot;2026-08-25&quot; }]
    },
    &quot;payment_handlers&quot;: {
      &quot;dev.shopify.shop_pay&quot;: [{ &quot;id&quot;: &quot;shop_pay&quot;, &quot;version&quot;: &quot;2026-04-08&quot; }],
      &quot;com.google.pay&quot;: [{ &quot;id&quot;: &quot;gpay&quot;, &quot;version&quot;: &quot;2026-01-11&quot; }]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The agent learns which capabilities you support and where to send each request. No scraping, and no guessing where the add-to-cart button is.&lt;/p&gt;
&lt;p&gt;If an agent can&apos;t read your checkout, it shops somewhere else.&lt;/p&gt;
&lt;h2&gt;How to enable UCP on Shopify&lt;/h2&gt;
&lt;p&gt;On a standard Shopify or Shopify Plus store, you don&apos;t write this JSON by hand. Shopify generates and hosts the profile, and agentic storefronts are active by default for eligible stores.&lt;/p&gt;
&lt;h3&gt;Check the Agentic channel&lt;/h3&gt;
&lt;p&gt;Open &lt;strong&gt;Sales channels &amp;gt; Agentic&lt;/strong&gt; in your Shopify admin. &lt;strong&gt;Allow Shopify to manage for me&lt;/strong&gt; is on by default. It shares your products through Shopify Catalog, turns on direct checkout where it&apos;s supported and enrolls you in new AI channels automatically.&lt;/p&gt;
&lt;p&gt;Turn it off if you want to control Shopify Catalog access, direct checkout and auto-enrollment yourself, channel by channel. For Google AI Mode and Gemini, products also come through the Google &amp;amp; YouTube channel or Google Merchant Center.&lt;/p&gt;
&lt;h3&gt;Headless stores&lt;/h3&gt;
&lt;p&gt;On Hydrogen or a custom frontend, your domain may not serve Shopify&apos;s profile at all. Make sure your edge or middleware passes &lt;code&gt;/.well-known/ucp&lt;/code&gt; through to Shopify.&lt;/p&gt;
&lt;p&gt;I often see agentic discovery break because Vercel or Netlify rewrites, or a catch-all route, swallow the &lt;code&gt;.well-known&lt;/code&gt; directory and return the homepage instead.&lt;/p&gt;

  &lt;div&gt;The headless app&apos;s catch-all route answers every path, so `/.well-known/ucp` returns the homepage HTML with a 200. The agent gets no profile.&lt;/div&gt;
  &lt;div&gt;A rewrite sends `/.well-known/ucp` to the store&apos;s myshopify domain before the catch-all runs, and the agent receives the JSON profile.&lt;/div&gt;


Open the Agentic channel in your Shopify admin and write down which AI channels are on, and whether direct checkout is active for each one. Decide on purpose whether you want &quot;Allow Shopify to manage for me&quot; left on.

&lt;h2&gt;Why this matters now&lt;/h2&gt;
&lt;p&gt;Search is shifting from links to agents. Shopify&apos;s agentic storefronts already reach ChatGPT, Google AI Mode and Gemini, Microsoft Copilot and Meta, and when a new AI platform adopts UCP, Shopify stores are ready to sell there with no extra integration.&lt;/p&gt;
&lt;p&gt;This sits next to the Model Context Protocol work covered in &lt;a href=&quot;https://ansezz.com/blog/mcp-context-aware-agents/&quot;&gt;MCP context-aware agents&lt;/a&gt;. UCP even lists MCP as one of its transports, which is how the profile above exposes the shopping service.&lt;/p&gt;
&lt;h3&gt;The black box problem&lt;/h3&gt;
&lt;p&gt;If your profile is missing, your store is a black box. An agent might see your products in a search index, but it can&apos;t fulfill &quot;buy me the best hiking boots from a local store.&quot; It picks a store where it can confirm checkout right away.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Auditing your implementation&lt;/h2&gt;
&lt;p&gt;Don&apos;t flip a switch and hope. Confirm the profile is reachable from outside.&lt;/p&gt;
&lt;h3&gt;A two-minute check&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Open a private browser window.&lt;/li&gt;
&lt;li&gt;Go to &lt;code&gt;https://yourdomain.com/.well-known/ucp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You should see a raw JSON object with a &lt;code&gt;ucp&lt;/code&gt; key.&lt;/li&gt;
&lt;li&gt;If you get a 404, HTML or a redirect to your homepage, your theme, app or proxy is blocking the path.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Check &lt;code&gt;robots.txt&lt;/code&gt; too, and make sure you aren&apos;t disallowing the &lt;code&gt;.well-known&lt;/code&gt; directory.&lt;/p&gt;
&lt;h3&gt;Custom backends&lt;/h3&gt;
&lt;p&gt;If a custom Laravel backend sits in front of your store, add an explicit route or proxy rule for this path. I often see middleware strip hidden directories for &quot;security&quot; reasons. Here, that rule only costs you sales.&lt;/p&gt;

Run `curl -s https://yourdomain.com/.well-known/ucp` from a terminal and pipe it into my [JSON formatter](/tools/json-formatter/). If the output is HTML or an error, fix the route before you touch anything else.


- **Confirm agentic storefronts** under Sales channels &amp;gt; Agentic in your Shopify admin.
- **Verify `/.well-known/ucp`** returns valid JSON on your own domain, not only on myshopify.com.
- **Check the payment handlers** in the profile (for example Shop Pay and Google Pay) match what you expect.
- **Fix headless rewrites** so the `.well-known` path reaches Shopify.
- **Check your proxy configs** if you host custom middleware, for example on [Coolify Docker SaaS hosting](/blog/coolify-docker-saas-hosting/), so the path isn&apos;t dropped.

&lt;p&gt;Commerce is moving from a web built for clicks to one built for agents, and UCP is the first real step toward making your store a first-class seller there. If your store is headless or runs custom middleware, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help Shopify brands get agent-ready&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Are you letting agents shop your store yet, or are you still building only for people who click?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>agentic-commerce</category><category>ai</category><category>hydrogen</category><category>agentic-ai</category></item><item><title>Shopify Storefront Web Components: headless light</title><link>https://ansezz.com/blog/shopify-storefront-web-components/</link><guid isPermaLink="true">https://ansezz.com/blog/shopify-storefront-web-components/</guid><description>Headless used to mean six engineers and a Hydrogen rebuild. Shopify Storefront Web Components drop products, collections, and cart into any page with a script.</description><pubDate>Tue, 19 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Headless used to mean a team of engineers just to show a &quot;Buy&quot; button. Shopify Storefront Web Components put products, collections and a cart on any page with one script tag.&lt;/p&gt;

- Storefront Web Components are standard custom elements that talk to the Storefront API for you: no React, no build step, just HTML.
- You load one module script, set the store with ``, pick a product with `` and render fields with `` and ``.
- Use them for buy buttons, landing pages and content sites; reach for Hydrogen when you need a full custom storefront with server-side logic.

&lt;p&gt;If you wanted a custom Shopify experience outside Liquid themes, you used to face a big architectural decision.&lt;/p&gt;
&lt;p&gt;You built a full React or Hydrogen app, managed server-side rendering, handled routing and hoped your SEO survived. For many brands that was like buying a semi-truck when they needed a bicycle.&lt;/p&gt;
&lt;h3&gt;The gatekeeper&lt;/h3&gt;
&lt;p&gt;Traditional headless kept simple content sites on Astro or WordPress from selling products without a jarring jump to a subdomain. We&apos;ve spent years over-engineering problems a few custom elements could solve.&lt;/p&gt;
&lt;p&gt;Storefront Web Components change the math. Adding commerce to a site starts with a script tag.&lt;/p&gt;
&lt;h2&gt;The headless headache&lt;/h2&gt;
&lt;p&gt;Building a headless store feels like building a house from scratch. You handle the foundation (hosting), the plumbing (GraphQL queries) and the wiring (state management).&lt;/p&gt;
&lt;h3&gt;Weeks for a working cart&lt;/h3&gt;
&lt;p&gt;You can spend weeks configuring Hydrogen or a custom Next.js setup just to get a cart that works. Once it&apos;s live, you maintain the Node.js environment and the middleware too.&lt;/p&gt;
&lt;p&gt;It&apos;s expensive and slow to deploy, and for many use cases it&apos;s overkill. We need the flexibility of headless without the upkeep of a heavy framework.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Custom elements, no framework&lt;/h2&gt;
&lt;p&gt;Storefront Web Components are framework-agnostic. They&apos;re standard Web Components (custom elements) that handle the calls to Shopify&apos;s Storefront API.&lt;/p&gt;
&lt;p&gt;All you need is HTML: no React, no build step.&lt;/p&gt;
&lt;h3&gt;Headless light&lt;/h3&gt;
&lt;p&gt;This approach embeds products, collections and a working cart (&lt;code&gt;&amp;lt;shopify-cart&amp;gt;&lt;/code&gt;) in your existing stack. On a static site generator or an older CMS, they act as a bridge: your content stays where it is and the commerce loads in on the page.&lt;/p&gt;
&lt;h2&gt;Getting started in 5 minutes&lt;/h2&gt;
&lt;p&gt;Here&apos;s the workflow I use when I want to move fast.&lt;/p&gt;
&lt;h3&gt;1. Connect your store&lt;/h3&gt;
&lt;p&gt;Add the module script and a &lt;code&gt;&amp;lt;shopify-store&amp;gt;&lt;/code&gt; element to your HTML. That connects the page to your Shopify domain.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Load the components script. Docs:
     https://shopify.dev/docs/api/storefront-web-components --&amp;gt;
&amp;lt;script type=&quot;module&quot; src=&quot;https://cdn.shopify.com/storefront/web-components.js&quot;&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;shopify-store store-domain=&quot;https://your-store.myshopify.com&quot;&amp;gt;&amp;lt;/shopify-store&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;public-access-token&lt;/code&gt; attribute is optional. Add one from the Headless channel in your Shopify admin when you need inventory, metafields or metaobjects. Titles and prices work without it.&lt;/p&gt;
&lt;h3&gt;2. Define the context&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;shopify-context&amp;gt;&lt;/code&gt; tells the page which product or collection to load. Pass the handle from your Shopify admin.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;shopify-context type=&quot;product&quot; handle=&quot;awesome-tshirt&quot;&amp;gt;
  &amp;lt;template&amp;gt;
    &amp;lt;!-- your content goes here --&amp;gt;
  &amp;lt;/template&amp;gt;
&amp;lt;/shopify-context&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. Display the data&lt;/h3&gt;
&lt;p&gt;Inside the template, &lt;code&gt;&amp;lt;shopify-data&amp;gt;&lt;/code&gt; pulls specific fields with dot notation, which feels familiar if you&apos;ve worked with Liquid or JavaScript objects.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;shopify-data query=&quot;product.title&quot;&amp;gt;&amp;lt;/shopify-data&amp;gt;
&amp;lt;shopify-money
  query=&quot;product.selectedOrFirstAvailableVariant.price&quot;
&amp;gt;&amp;lt;/shopify-money&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

  &lt;div&gt;A React app, a Node server, GraphQL queries, cart state and a deploy pipeline, all to show a product card on your marketing site.&lt;/div&gt;
  &lt;div&gt;One module script, a store tag and a product context block with the fields you want, pasted into the page you already have.&lt;/div&gt;


Pick one product page on your content site and replace its &quot;Shop now&quot; link with a `` block that shows the title, price and an add-to-cart button. Compare clicks to checkout over the next two weeks.

&lt;h2&gt;llms.txt for AI-assisted builds&lt;/h2&gt;
&lt;p&gt;Shopify publishes a machine-readable &lt;a href=&quot;https://webcomponents.shopify.dev/llms.txt&quot;&gt;llms.txt&lt;/a&gt; for Storefront Web Components. To write one for your own store or docs, my &lt;a href=&quot;https://ansezz.com/tools/llms-txt-generator/&quot;&gt;llms.txt generator&lt;/a&gt; builds the file from a short form and checks it against the format.&lt;/p&gt;
&lt;p&gt;If you&apos;ve followed &lt;a href=&quot;https://ansezz.com/blog/agentic-workflows-vibe-coding/&quot;&gt;agentic workflows and vibe coding&lt;/a&gt;, you know context is everything for an AI model. Point your assistant (Claude, ChatGPT or similar) at this file and it learns the components&apos; actual attributes and patterns.&lt;/p&gt;
&lt;h3&gt;Less guessing&lt;/h3&gt;
&lt;p&gt;Instead of guessing how a Shopify component should look, the model works from the official reference. With this link in my prompt, I can draft product landing pages much faster, and far fewer of them need fixing before they work.&lt;/p&gt;
&lt;p&gt;For more on feeding docs to agents, see how &lt;a href=&quot;https://ansezz.com/blog/mcp-context-aware-agents/&quot;&gt;MCP context-aware agents&lt;/a&gt; handle technical documentation.&lt;/p&gt;
&lt;p&gt;Give the model the official reference and it stops inventing attributes.&lt;/p&gt;
&lt;h2&gt;Web Components vs Hydrogen&lt;/h2&gt;
&lt;p&gt;Here&apos;s my rule of thumb.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Storefront Web Components when...&lt;/th&gt;
&lt;th&gt;Use Hydrogen when...&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;You want buy buttons or a mini-cart on an existing site&lt;/td&gt;
&lt;td&gt;You&apos;re building a full custom storefront&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You&apos;re shipping a landing page and speed matters most&lt;/td&gt;
&lt;td&gt;You need server-side logic and deep API integrations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Your team won&apos;t maintain React and Node.js&lt;/td&gt;
&lt;td&gt;You want streaming, edge rendering and fine performance control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You want to stay framework-agnostic&lt;/td&gt;
&lt;td&gt;You have the team to run it as a product&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For most teams starting out or modernizing a site, Web Components are the practical choice. They balance &lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI-driven development&lt;/a&gt; with production stability. If you&apos;re still weighing the bigger call, see &lt;a href=&quot;https://ansezz.com/blog/shopify-liquid-vs-headless/&quot;&gt;Shopify Liquid vs. headless&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;

Paste the llms.txt URL into your AI assistant and ask it for a collection grid with 12 products and a cart. Check every tag and attribute it uses against the docs before you ship it.


- **Web Components are &quot;headless light&quot;:** commerce on any page without a framework.
- **They work anywhere:** WordPress, Astro, plain HTML, even a local static file.
- **Use the official `llms.txt`** so your AI assistant writes code against the real components.
- **Avoid over-engineering:** if you don&apos;t need a large React app, don&apos;t build one.

&lt;p&gt;Building for the web in 2026 is about removing friction, and these components remove most of it from headless. If you want commerce on a site that isn&apos;t Shopify, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help brands add Shopify to Astro, WordPress and custom sites&lt;/a&gt;, or &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;drop me a note&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Are you still building full React apps for simple stores, or have you tried custom elements yet?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>hydrogen</category><category>agentic-commerce</category><category>agentic-ai</category></item><item><title>How agentic commerce changes building on Shopify</title><link>https://ansezz.com/blog/agentic-commerce-shopify/</link><guid isPermaLink="true">https://ansezz.com/blog/agentic-commerce-shopify/</guid><description>Agentic commerce is reshaping how you build Shopify. The shift from human-centric themes to agent-ready infrastructure: Catalog, UCP, and MCP.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Your beautiful Shopify theme is about to become invisible. The next shopper has no eyes, never clicks a button and only reads your data.&lt;/p&gt;

- AI agents now do the discovery, comparison and checkout for a growing share of buyers, so a store that agents can&apos;t read drops out of the transaction.
- Shopify&apos;s answer is three layers: the Universal Commerce Protocol (UCP), the Catalog API and Agentic Storefronts, with MCP as the tool binding underneath.
- The developer job moves from pixels to protocols: native variants, rich Metaobjects, GraphQL, MCP servers and clean product data.

&lt;p&gt;For a decade, we have obsessed over conversion rate optimization, pixel-perfect layouts and fast-loading Liquid templates. We built for human eyes.&lt;/p&gt;
&lt;p&gt;But a new type of shopper is arriving at the digital storefront. They don&apos;t have eyes, they don&apos;t click buttons, and they don&apos;t care about your hero slider.&lt;/p&gt;
&lt;p&gt;They are autonomous AI agents.&lt;/p&gt;
&lt;p&gt;The shift from human browsing to agentic commerce is a big architectural shift for Shopify. If you are still &quot;the theme guy&quot; or &quot;the Liquid expert,&quot; your skill set is about to hit a wall.&lt;/p&gt;
&lt;p&gt;I have been building on the web for over ten years, and the era of building for agents is here. It is time to move from designing pixels to designing protocols.&lt;/p&gt;
&lt;h2&gt;The end of the traditional funnel&lt;/h2&gt;
&lt;p&gt;Most developers still think the old way. We build a site, drive traffic to a landing page and hope the user finds the checkout. This is a manual, high-friction process.&lt;/p&gt;
&lt;p&gt;Today, buyers increasingly use tools like ChatGPT, Gemini or Microsoft Copilot to do the &quot;work&quot; of shopping. They ask for a waterproof hiking boot under $150 with specific shipping requirements.&lt;/p&gt;
&lt;p&gt;The AI doesn&apos;t visit your store to browse. It queries data.&lt;/p&gt;
&lt;p&gt;If your store isn&apos;t built to be &quot;read&quot; by an agent, you simply don&apos;t exist in that transaction.&lt;/p&gt;

Ask ChatGPT, Gemini and Copilot for one of your best-selling products the way a real buyer would phrase it. Note whether your store shows up, and whether the price and stock it quotes are correct.

&lt;h2&gt;Why your current apps aren&apos;t enough&lt;/h2&gt;
&lt;p&gt;We have spent years building &quot;utility&quot; apps that handle simple automations. But Shopify is moving fast to pull those features into the core.&lt;/p&gt;
&lt;p&gt;With tools like Shopify Magic and Sidekick, the basic stuff (copywriting, image editing, simple workflows) is being commoditized.&lt;/p&gt;
&lt;p&gt;The real value is moving deeper into the stack. Agents need structured data, real-time inventory logic and a way to run a checkout without a browser window. A product description alone won&apos;t do.&lt;/p&gt;
&lt;h3&gt;Messy data breaks agent reasoning&lt;/h3&gt;
&lt;p&gt;If you rely on &quot;fake&quot; variants or messy metafields, you break the agent&apos;s ability to reason about your store.&lt;/p&gt;
&lt;p&gt;When an agent fails to understand your product structure, the buyer gets &quot;no results found&quot; or a hallucinated alternative. That is a lost sale for your client and a failed project for you.&lt;/p&gt;
&lt;h2&gt;Welcome to agentic commerce&lt;/h2&gt;
&lt;p&gt;Agentic commerce is a system where AI agents take over the discovery, comparison and execution phases of shopping. Shopify is laying the groundwork with three pillars.&lt;/p&gt;
&lt;h3&gt;1. Universal Commerce Protocol (UCP)&lt;/h3&gt;
&lt;p&gt;The open standard Shopify co-developed with Google for how agents discover, negotiate and transact with any merchant.&lt;/p&gt;
&lt;p&gt;It is composable: it defines the conversation, then plugs into MCP for tool access and AP2 for payment authorization. For a hands-on walkthrough, see my &lt;a href=&quot;https://ansezz.com/blog/shopify-ucp-quick-start/&quot;&gt;Shopify UCP quick-start&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;2. Catalog API&lt;/h3&gt;
&lt;p&gt;UCP&apos;s discovery layer. It standardizes products into a universal taxonomy, verifies pricing and inventory in real time, and syndicates that structured data to connected AI surfaces.&lt;/p&gt;
&lt;h3&gt;3. Agentic Storefronts&lt;/h3&gt;
&lt;p&gt;The management layer. You configure product data once in the Shopify admin, then distribute and sell across AI channels (ChatGPT, Microsoft Copilot, Google&apos;s AI Mode, the Gemini app).&lt;/p&gt;
&lt;p&gt;As developers, our job is shifting from visual storefronts to &quot;agent-ready&quot; infrastructure.&lt;/p&gt;

  &lt;div&gt;Hero sliders, hover effects, split products for each color and specs hidden in a description blob. Success is a click-through rate.&lt;/div&gt;
  &lt;div&gt;Native variants, Metaobjects for specs and compatibility, clean GraphQL access and real-time stock. Success is an agent that quotes you correctly.&lt;/div&gt;

&lt;figure&gt;
&lt;h2&gt;Why schema is the new CSS&lt;/h2&gt;
&lt;p&gt;In the agentic era, your structured data is your most important asset. A well-built JSON-LD schema or a clean set of Shopify Metaobjects is now worth more than a fancy hover effect.&lt;/p&gt;
&lt;p&gt;Agents rely on clarity. They need to know if a product works with another one, what the material breakdown is, and exactly when it will arrive.&lt;/p&gt;
&lt;p&gt;If you want to see how I&apos;ve helped businesses modernize through better architecture, check out some of my &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;previous work&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Where to focus&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Native variants only.&lt;/strong&gt; Stop using &quot;split products&quot; or custom Liquid hacks to show variants. Agents need standard &lt;code&gt;ProductVariant&lt;/code&gt; records to function.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rich Metaobjects.&lt;/strong&gt; Use them to build knowledge bases that agents can query: compatibility tables, brand story and detailed technical specs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GraphQL mastery.&lt;/strong&gt; The Shopify Admin and Storefront APIs are the primary languages of agents. If you aren&apos;t comfortable with complex GraphQL queries, you are already behind.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An agent can&apos;t admire your layout. It can only read your data.&lt;/p&gt;

Export your catalog and count products that fake variants as separate products or hide specs in the description HTML. That count is the scope of your first &quot;agent-readiness&quot; cleanup.

&lt;h2&gt;Building custom agents with MCP and Shopify&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;https://ansezz.com/blog/mcp-context-aware-agents/&quot;&gt;Model Context Protocol (MCP)&lt;/a&gt; lets us connect AI models to external data sources like the Shopify API. It is the same binding UCP uses to expose commerce tools to agents.&lt;/p&gt;
&lt;p&gt;Picture an &quot;inventory agent&quot; for a merchant. A plain alert fires when stock is low. This agent goes further: it queries recent sales trends via the Admin API, checks supplier lead times and suggests a restock amount, all through a chat interface.&lt;/p&gt;
&lt;h3&gt;Where Laravel and Docker fit&lt;/h3&gt;
&lt;p&gt;With Laravel and Docker, we can build custom middleware that acts as an MCP server and exposes specific Shopify &quot;tools&quot; to an AI agent.&lt;/p&gt;
&lt;p&gt;This deep technical work is what separates a senior engineer from a freelancer who only installs themes.&lt;/p&gt;
&lt;h2&gt;The Shopify developer&apos;s new roadmap&lt;/h2&gt;
&lt;p&gt;To thrive in the next five years, I recommend focusing on four technical areas.&lt;/p&gt;
&lt;h3&gt;1. Data hygiene as a service&lt;/h3&gt;
&lt;p&gt;Start offering &quot;agent-readiness&quot; audits. Clean up product data, normalize attributes and make sure all metadata is machine-readable. This is the new SEO. A short &lt;a href=&quot;https://ansezz.com/tools/llms-txt-generator/&quot;&gt;llms.txt file&lt;/a&gt; that points agents at your key pages is an easy first item on that list.&lt;/p&gt;
&lt;h3&gt;2. Headless and API-first builds&lt;/h3&gt;
&lt;p&gt;Liquid isn&apos;t dead, but headless architectures using Hydrogen and Oxygen fit the agentic future better. They force you to think in data and APIs rather than templates.&lt;/p&gt;
&lt;p&gt;If you&apos;re weighing the trade-offs, I broke them down in &lt;a href=&quot;https://ansezz.com/blog/shopify-liquid-vs-headless/&quot;&gt;Shopify Liquid vs. headless&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;3. RAG and vector databases&lt;/h3&gt;
&lt;p&gt;Learn how to use RAG (retrieval-augmented generation) and tools like pgvector. You can build agents that search thousands of product reviews or support docs to give &quot;expert&quot; advice to shoppers.&lt;/p&gt;
&lt;p&gt;If you&apos;re new to this, start with &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;picking the right RAG stack&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;4. Agent trust tiers and the Agentic plan&lt;/h3&gt;
&lt;p&gt;Shopify classifies agent traffic into three trust tiers: Anonymous, Signed and Token. All three can search the catalog and build carts and checkouts. Only a Token-tier agent whose token has been granted purchase permission can call &lt;code&gt;complete_checkout&lt;/code&gt; and finish the order.&lt;/p&gt;
&lt;p&gt;Direct checkout also depends on the channel. Copilot, Google&apos;s AI Mode and the Gemini app offer native checkout powered by UCP (Google&apos;s is still rolling out to more brands). In ChatGPT, the buyer completes the purchase on the merchant&apos;s online store inside an in-app browser.&lt;/p&gt;
&lt;p&gt;There is also a dedicated Agentic plan for brands on any platform. They list products in Shopify Catalog and sell through agentic storefronts with no monthly fee, paying card rates (from 2.9% + 30¢ USD online) when a product sells.&lt;/p&gt;
&lt;p&gt;For the identity side, see &lt;a href=&quot;https://ansezz.com/blog/ucp-agent-profiles-are-the-new-oauth-app/&quot;&gt;UCP agent profiles&lt;/a&gt; and &lt;a href=&quot;https://ansezz.com/blog/buyer-linked-tokens-agent-checkout/&quot;&gt;buyer-linked tokens for agent checkout&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;The numbers behind the shift&lt;/h2&gt;
&lt;p&gt;The change is happening faster than most of us realize. Shopify reports that in Q1 2026:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Q1 2026, year over year&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AI-driven traffic to its stores&lt;/td&gt;
&lt;td&gt;Grew roughly 8x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Orders from AI-powered searches&lt;/td&gt;
&lt;td&gt;Climbed nearly 13x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New buyers via AI channels&lt;/td&gt;
&lt;td&gt;Ordering at close to 2x the rate of other channels&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

Pick one client store and write a one-page &quot;agent-readiness&quot; report: variant structure, Metaobject coverage, stock accuracy and which AI channels are switched on in Agentic Storefronts. That page is the start of a new service line.


- Move your product logic into native Shopify structures.
- Double down on GraphQL and API integration.
- Start experimenting with MCP servers and local LLMs for internal store operations.
- Learn the trust tiers: only an approved Token-tier agent can complete checkout.
- Remember that the agent is your new &quot;user.&quot; Optimize for its understanding first.

&lt;p&gt;More and more of commerce will run through agents. It is a great time to be a developer if you are willing to learn the new protocols. You can read more &lt;a href=&quot;https://ansezz.com/about/&quot;&gt;about me&lt;/a&gt; and my background in web applications.&lt;/p&gt;
&lt;p&gt;If you want your Shopify catalog and checkout ready for AI agents, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help merchants and teams get agent-ready&lt;/a&gt;, or drop a note via &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;contact&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Are you building a store that only humans can see, or one that the whole world can buy from?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>agentic-commerce</category><category>ai</category><category>mcp</category><category>hydrogen</category><category>api-design</category></item><item><title>Shopify Liquid vs. headless: picking the right stack</title><link>https://ansezz.com/blog/shopify-liquid-vs-headless/</link><guid isPermaLink="true">https://ansezz.com/blog/shopify-liquid-vs-headless/</guid><description>Hydrogen looks great on paper, but Liquid still ships more revenue per week. A practical framework for choosing Liquid, headless Hydrogen, or the messy middle.</description><pubDate>Sun, 28 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Headless can fix real problems, or hand your team a second system to babysit. Pick the simplest stack that removes your actual bottleneck.&lt;/p&gt;

- Liquid with Online Store 2.0 is still the right default for most growth-stage stores: fast to ship, cheap to maintain and native to Shopify.
- Headless with Hydrogen and Oxygen can be faster, but only with disciplined frontend work, and it turns your storefront into a software product you own.
- Decide with four questions: is the theme blocking revenue, can the team own a custom storefront, are integrations truly complex, and is slowness a code or an architecture problem?

&lt;p&gt;Your store is making money, but every change feels like surgery on a moving car.&lt;/p&gt;
&lt;p&gt;Traffic is up, orders are up and so is the pressure. The theme layer starts to push back: feature requests turn into fragile hacks, app scripts pile up and mobile performance slips with every install.&lt;/p&gt;
&lt;h3&gt;The pull of headless&lt;/h3&gt;
&lt;p&gt;This is when brands start weighing Shopify Liquid vs. headless. The pitch sounds great: more freedom, better performance, cleaner frontend architecture. It&apos;s also where expensive mistakes happen.&lt;/p&gt;
&lt;p&gt;The real question is which stack fits your stage, your team and how you actually operate.&lt;/p&gt;
&lt;h2&gt;Why Liquid still wins for most stores&lt;/h2&gt;
&lt;p&gt;Liquid is the default for a reason. It&apos;s tightly integrated with Shopify, fast to ship and much easier to maintain than a custom headless frontend.&lt;/p&gt;
&lt;p&gt;For most growth-stage stores, Liquid gives the best speed to market. Online Store 2.0 made themes far more modular, so a solid theme setup goes a long way before it becomes a blocker.&lt;/p&gt;
&lt;h3&gt;The production van&lt;/h3&gt;
&lt;p&gt;A good Liquid stack is like a well-tuned delivery van. Not flashy, but it moves product reliably, takes updates quickly and doesn&apos;t need a pit crew every week.&lt;/p&gt;
&lt;h3&gt;When the theme becomes the ceiling&lt;/h3&gt;
&lt;p&gt;The problem shows up when business needs outgrow theme constraints. Maybe the storefront needs deeply custom interactions. Maybe product data has to come from an ERP, a PIM and a custom backend at once. Maybe merchandising logic is too complex for theme code to stay clean.&lt;/p&gt;
&lt;p&gt;That&apos;s usually when headless becomes a serious conversation.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Performance is the main driver&lt;/h2&gt;
&lt;p&gt;Performance is the most common reason teams look at headless, and milliseconds matter. On e-commerce storefronts, small delays add up to lower conversion, weaker ad efficiency and a worse mobile experience.&lt;/p&gt;
&lt;h3&gt;What Hydrogen and Oxygen give you&lt;/h3&gt;
&lt;p&gt;Hydrogen is Shopify&apos;s headless framework: a React Router app preconfigured for Shopify&apos;s APIs. Oxygen is Shopify&apos;s serverless hosting for Hydrogen storefronts at the edge.&lt;/p&gt;
&lt;p&gt;A well-built Hydrogen stack gives you finer control over rendering, data loading, caching and frontend execution. That opens the door to a lower LCP and a more responsive storefront.&lt;/p&gt;
&lt;h3&gt;Headless is only as fast as its frontend&lt;/h3&gt;
&lt;p&gt;If the team over-fetches Storefront API data, hydrates too much JavaScript or ships a bloated component tree, the custom storefront can end up slower than a decent Liquid theme. That happens more often than people admit.&lt;/p&gt;
&lt;p&gt;There&apos;s also a middle path. &lt;a href=&quot;https://ansezz.com/blog/shopify-storefront-web-components/&quot;&gt;Shopify storefront web components&lt;/a&gt; add dynamic, framework-light commerce to a page without a full headless rebuild.&lt;/p&gt;
&lt;p&gt;A headless storefront is only as fast as the discipline of the team that builds it.&lt;/p&gt;
&lt;h2&gt;The hidden complexity of going headless&lt;/h2&gt;
&lt;p&gt;Going headless splits commerce from presentation. Shopify still handles products, checkout and admin workflows. Your custom frontend handles the customer experience.&lt;/p&gt;
&lt;p&gt;That sounds clean on paper. In practice, you now own two systems instead of one.&lt;/p&gt;
&lt;h3&gt;Everything becomes your job&lt;/h3&gt;
&lt;p&gt;You manage hosting, deployments, caching, GraphQL queries, error handling, observability and integration behavior across services. Every app in the stack has to be checked for API compatibility. If an app only works by injecting snippets into a theme, that convenience is gone.&lt;/p&gt;
&lt;p&gt;In Liquid, many features feel plug and play. In headless, reviews, loyalty, search, subscriptions, personalization and analytics can all turn into custom integration work.&lt;/p&gt;
&lt;p&gt;The same thinking applies to newer surfaces like &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;agentic commerce on Shopify&lt;/a&gt;, where the store has to expose clean, machine-readable APIs whatever stack you pick.&lt;/p&gt;
&lt;h3&gt;Renting vs building&lt;/h3&gt;
&lt;p&gt;Liquid is renting a well-equipped shop. Headless is designing your own building. You get more freedom, and the plumbing, wiring and maintenance become your problem.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Factor&lt;/th&gt;
&lt;th&gt;Liquid (Online Store 2.0)&lt;/th&gt;
&lt;th&gt;Headless (Hydrogen + Oxygen)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time to launch&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Often weeks&lt;/td&gt;
&lt;td&gt;Months, with a bigger team&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;App compatibility&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Most apps work out of the box&lt;/td&gt;
&lt;td&gt;Each app needs an API integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Performance ceiling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Good with clean theme code&lt;/td&gt;
&lt;td&gt;Higher, if the frontend is disciplined&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ongoing ownership&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Theme updates&lt;/td&gt;
&lt;td&gt;A software product to run&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

List every app installed on your store and mark each one: works through the theme only, has an API, or you could drop it. The &quot;theme only&quot; column is the integration work a headless build would add.

&lt;h2&gt;Time and money: the cost of freedom&lt;/h2&gt;
&lt;p&gt;Time and budget usually decide this faster than architecture opinions.&lt;/p&gt;
&lt;p&gt;A custom Liquid theme can often launch in weeks: faster testing, faster iteration and lower cost. If the business mainly needs merchandising flexibility, better UX and cleaner performance hygiene, Liquid usually gives the better return.&lt;/p&gt;
&lt;h3&gt;Headless is an operating model&lt;/h3&gt;
&lt;p&gt;Headless is a different kind of investment. The build takes longer, the team needs stronger frontend engineering and the integration surface is bigger. Maintenance doesn&apos;t stop after launch.&lt;/p&gt;
&lt;p&gt;You&apos;re paying for a redesign and also taking on a software product. Deployments, monitoring, API changes, dependency updates, caching strategy and developer ownership become part of normal operations. Shopify releases a new API version every quarter, and my &lt;a href=&quot;https://ansezz.com/tools/shopify-api-versions/&quot;&gt;Shopify API version calendar&lt;/a&gt; shows how long the one your storefront uses is supported.&lt;/p&gt;
&lt;p&gt;For many stores that trade isn&apos;t worth it yet. Freedom is expensive when the business doesn&apos;t fully need it.&lt;/p&gt;

  &lt;div&gt;LCP is high, so the team scopes a six-month Hydrogen rebuild and keeps every app and script it already has.&lt;/div&gt;
  &lt;div&gt;The team removes unused apps and scripts, fixes image sizes and trims theme code, then measures again before anyone budgets a rebuild.&lt;/div&gt;

&lt;h2&gt;My decision framework&lt;/h2&gt;
&lt;p&gt;I reduce this decision to four practical questions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Is the current theme actually blocking revenue?&lt;/strong&gt; If conversion is healthy and the pain is taste or minor flexibility, Liquid is probably still right.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Can the team own a custom storefront long term?&lt;/strong&gt; Someone has to own it after launch, every month.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Are the integration requirements genuinely complex?&lt;/strong&gt; If the storefront has to combine Shopify with custom product logic, external systems or a bespoke application layer, headless starts to make sense.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Is performance a code problem or an architecture problem?&lt;/strong&gt; Many slow stores get faster with script cleanup, better images, fewer apps and tighter theme code.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The simplest stack that fixes the real bottleneck is usually the best one. Building a spaceship to cross the street is still a bad decision. You can see how this plays out across &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;real Shopify builds I&apos;ve shipped&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;

Run PageSpeed Insights on your three highest-traffic templates (home, collection, product) and note the LCP. Then disable your heaviest app script on a duplicate theme and run it again before you decide anything.


- **Audit site speed before changing architecture.** If LCP is acceptable, the stack may not be the problem.
- **Remove app bloat.** Many slow Liquid stores carry too many scripts and too much leftover code.
- **Map every integration.** What works natively, what depends on theme injection, what would break in headless.
- **Estimate ownership cost, not only build cost.** Launch is the first invoice.
- **Look at Hydrogen if the business really needs headless,** and keep the scope tight.

&lt;p&gt;Choosing a stack is a long-term commitment. The right answer solves the current bottleneck without creating three new ones. If you&apos;re weighing a rebuild, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help Shopify brands choose between Liquid, Hydrogen and the middle path&lt;/a&gt;, or &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;drop me a line&lt;/a&gt; for a 30-minute architecture sanity check.&lt;/p&gt;
&lt;p&gt;Are you hitting real technical limits in Shopify, or feeling the pull of a more customizable stack?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>shopify</category><category>shopify</category><category>hydrogen</category><category>performance</category><category>architecture</category></item></channel></rss>