Pushbuild

How to make a Shopify Cart Transform skip POS orders

A Cart Transform function gets the cart, but its input has no field that says whether the cart is on POS or online. If you bundle, expand or add fees online and want POS to behave differently, the POS side has to tell the function.

At a glance

  1. Mark the cart on POSIn your POS UI extension, set a cart property when the cart is on POS, for example `api.cart.addCartProperties({ _channel: 'pos' })`.
  2. Read it in the functionIn the function's input query, read the attribute: `cart { channel: attribute(key: "_channel") { value } }`.
  3. Check it worksBuild a cart on POS and confirm the attribute appears in the function's run log input.

Mark the cart on POS

  • In your POS UI extension, set a cart property when the cart is on POS, for example `api.cart.addCartProperties({ _channel: 'pos' })`.
  • An underscore prefix is the usual convention for a property customers aren't meant to read; it can still appear on the order in the admin.
  • Set it early: when the tile loads or when the cart changes, not at payment.

Read it in the function

  • In the function's input query, read the attribute: `cart { channel: attribute(key: "_channel") { value } }`.
  • In `run`, return no operations when the value is `pos`.
  • Treat a missing attribute as online, so carts where it was never set behave as they do today.

Check it works

  • Build a cart on POS and confirm the attribute appears in the function's run log input.
  • Build the same cart online and confirm the transform still applies.

Updated 2026-11-01. General guidance, not advice for your situation; we scope each project in writing before any work starts.

Questions people ask first

Can the function detect POS by itself?

Not today. The input has no channel field, so a value set by the POS extension is the dependable signal.

Will customers see the attribute?

Name it with an underscore prefix, the convention for internal properties, and check your receipt template. Staff can see it on the order in the admin.

What if the extension hasn't run yet?

The function sees no attribute and treats the cart as online, so set the property as early as possible.

Tell us what you need built.

Tell us the process and the tools involved, or call. We reply with questions or a written scope.

hello@pushbuild.com

(617) 299-8887