Liquid storefronts now include a standard communication layer between a theme and the code running on top of it. The theme emits eventswhile apps and agents call actions. Both work across all themes and ship as a set, so you only need to implement once.
Apps parsed each theme's DOM and custom events individually. They broke when the theme changed, and every data fetch required an additional API call.
events / actions work across all themes. Implement once. Subscribing to events is plain JavaScript, and since the payload arrives directly, no follow-up API calls are needed.
events are DOM events that represent "commerce operations." Theme developers implement them in the theme code, and app developers subscribe with plain JavaScript to receive the payload directly (no additional API calls needed).
shopify:product:viewFires when a product is viewed. A starting point for view tracking and recommendations.
shopify:cart:lines-updateFires when a cart line item is updated. For syncing cart contents and upsell suggestions.
shopify:search:updateFires when a search is updated. For search-term analysis and suggestion integration.
actions are the reverse direction of events.Available on all Liquid storefronts, so apps and agents can call them to trigger theme behavior.
Shopify.actions.updateCartUpdates the cart. Call it when you want to modify cart contents from the app side.
Shopify.actions.getCartGets the current cart state. Use it as input for display or decision logic.
Shopify.actions.openCartOpens the cart (drawer, etc.). For flows like showing the cart after adding an item.
| Direction | Caller / Implementer | Nature |
|---|---|---|
| events | Theme fires / App subscribes | DOM events representing commerce operations. The payload arrives directly |
| actions | Theme provides/overrides behavior / App calls | Available on all Liquid storefronts. Fires the corresponding event on success |
Same updateCart But the experience changes depending on whether the theme overrides it. This is the crux of the feature.
When the theme does nothing, the action calls the Storefront API and reloads the page. It reliably works, but the screen does a full reload.
When a theme developer overrides the action, it canskip the reload and update the UI directly. And on success it fires the corresponding event, so subscribers are notified naturally too.
events / actions aren't tied to a specific theme—they're available across the entire Liquid storefront. The goal is to move away from per-theme custom builds and DOM parsing.
Because events are DOM events, you can subscribe with plain JS, no framework required.The payload arrives directly, with no follow-up API call needed, which helps on both implementation and performance.
An action emits the corresponding event on success. In other words, "changes the app made" are also conveyed to subscribers uniformly, and thestate-sync loop stays consistent.
Out of the box it "just works" with Storefront API + reload. If the theme overrides it, you get a smooth, reload-free UI.The app-side call stays unchanged.
The article explicitly states that "apps and agents" call actions. It's designed on the premise that AI agents can drive storefront behavior with standard actions, looking ahead to future automation and conversational purchasing UX. For the detailed spec, see thedocumentation.
shopify:product:view / shopify:cart:lines-update / shopify:search:update Subscribe with plain JS and forward the payload as-is to your analytics backend.updateCart operations, breaking the experience and hurting CVR.Shopify.actions.updateCart → openCart , and override the action on the theme side for reload-free UI updates.Shopify.actions.getCart / updateCart / openCart . This is the by-the-book approach for the "apps and agents" use case the article describes.