Menu
BigCommerce Storefront
Run and edit GraphQL queries/mutations against BigCommerce's Storefront API for products, cart, checkout, and customer accounts. Covers connecting, the editable query pattern, response shapes, error handling, and common workflows — read data with {{<stepReference>.response.data...}} template syntax.
Browse 16 BigCommerce Storefront actions bigcommerceOn this page
The BigCommerce Storefront connector runs GraphQL against your store's Storefront API: products, search, categories, carts, checkout, customer profile, wishlists, and site settings. Every action, with its default query, variables, and response fields, is listed in the action reference.
Connecting
Connect using your store's domain and a Storefront API token. Create the token under Channel Manager → Storefronts → your channel → Storefront API Token.
- Store Domain — your store domain without
https://(e.g.store-abc123.mybigcommerce.com). - Storefront API Token — the Storefront API bearer token for that channel.
Every action posts to https://{storeDomain}/graphql with Authorization: Bearer <token>. Storefront: Get Customer, Storefront: Get Wishlist, and Storefront: Execute Custom GraphQL accept an optional Customer JWT. When set, it replaces the connection's token as the bearer, so the query runs as that authenticated customer instead of the anonymous storefront.
Your first call
- Add a BigCommerce Storefront step and choose Storefront: Get Site Info. Name it "Get Site Info" so its reference is
getSiteInfo. - Leave the default query as is.
- Read the store name in a later step with
{{getSiteInfo.response.data.site.settings.storeName}}.
The editable query and variables pattern
Almost every action exposes two fields:
- GraphQL Query (or GraphQL Mutation) — the operation sent to BigCommerce. Each action ships a useful default, but the field is fully editable: add or remove fields, change arguments, or replace the operation with anything the Storefront GraphQL schema supports. Left blank, the action falls back to its default.
- Variables — a JSON string of GraphQL variables (e.g.
{"first": 20}). It is parsed withJSON.parse, so it must be valid JSON.
So any action is an entry point into the same Storefront schema: use it as is, or rewrite the query.
Exceptions:
- Storefront: Get Site Info and Storefront: Get Customer expose only GraphQL Query; their default queries take no variables.
- Storefront: Execute Custom GraphQL has no default query or variables. The query is required and variables are optional (
{}is sent if omitted). Use it for anything the other actions do not cover. - Storefront: Customer Login does not use GraphQL at all (see below).
Reading the response
Responses are one level shallower than the Admin GraphQL connector. The Storefront client unwraps GraphQL's own { data, errors } envelope, so queried fields sit directly under response.data:
{{<stepReference>.response.status}},.response.statusText,.response.headers.<header-name>— the HTTP result.{{<stepReference>.response.data.<field path>}}— the query's top-level field (site,cart,customer) directly underdata, with no extra.data.data.
For example, a step named "Get Product" (reference getProduct) reads {{getProduct.response.data.site.product.name}}.
Return full GraphQL response
Every query/mutation action has Return full GraphQL response (off by default). When on, the step returns BigCommerce's whole { data, errors } body and status unchanged. Read fields at {{<stepReference>.response.data.data.<field path>}}, and GraphQL errors arrive in response.data.errors instead of failing the step. Use it when the output goes straight back to a GraphQL client, such as the last step of a gateway route.
Error handling
- GraphQL errors. If BigCommerce's response contains an
errorsarray (a bad field name, an invalid entity ID), the client throws and the action turns it into a synthetic result:{{<stepReference>.response.status}}becomes500, and{{<stepReference>.response.data.errors.0.message}}holds one string of the form"BigCommerce Storefront GraphQL errors: [...]", where[...]is the JSON-stringified array. It is not a structured array of error objects as in the Admin GraphQL connector. To branch on a GraphQL failure, checkstatus = 500and parse the embedded JSON if you need detail. - HTTP errors from BigCommerce itself (bad or expired token gives 401, rate limiting gives 429) are returned as is:
response.statusis the real code andresponse.datais BigCommerce's error body. - Connection failures (DNS, network) come back as a synthetic
503. - Mutation-level errors are different from top-level errors. Cart mutations return an
errorslist inside the mutation payload (e.g.{{<stepReference>.response.data.cart.createCart.errors}}for a badproductEntityId), separate fromresponse.data.errors.
Pagination and filtering
- Lists use GraphQL cursors. Request
pageInfo { hasNextPage endCursor }and passendCursorback as theaftervariable for the next page.afteris accepted by the List Products and Search Products queries even though it is not in the default variables. - Site-level
products(Storefront: List Products) accepts only pagination arguments in BigCommerce's real schema, with no filters or sort. For filtering, sorting, or full-text search use Storefront: Search Products (filters.searchTerm, plus optionalcategoryEntityId,brandEntityIds,price.{minPrice,maxPrice}, andsortsuch asRELEVANCE). For one category's products use Storefront: Get Category. - Search Products also returns
filtersfacets (category, brand, price) tagged with their concrete types, for building a filter UI.
Quirks and exceptions
- Product lookup by path. Storefront: Get Product's default query uses
site.product(entityId: ...). Looking up by storefront path is a structurally different query againstsite.route(path: $path) { node { ... on Product { ... } } }. Replace the query text and set variables to{"path": "/running-shoes/"}; you cannot pass a path into the existing$entityIdvariable. - Cart and checkout share one ID. The cart's
entityIdfrom Create Cart is what Get Cart, Add / Update / Delete Cart Item, Apply Coupon, and Get Checkout take (asentityIdorcartEntityId). A checkout is keyed by the same ID as its cart. Update and Delete Cart Item also need alineItemEntityId, found atlineItems.physicalItems.<n>.entityIdin a Get Cart or Add Cart Items result. - Deleting the last cart item may return
cart: nullfrom Delete Cart Item. - Coupon errors surface as
InvalidCouponCodeErrororCouponCodeAlreadyAppliedErrorin theerrorslist of Apply Coupon. - Customer-scoped queries need a Customer JWT.
customerresolves to whichever customer the bearer token belongs to, so without a JWT Get Customer typically resolves tonull. Get Wishlist also needs it; restrict to one wishlist with{"filters": {"entityIds": [123]}}. - Storefront: Customer Login is not a GraphQL call. It posts
emailandpasswordto your store's/login.php?action=check_loginto verify the credentials. As implemented, it does not return thetoken/customer_idits output schema declares. On success it returns a fixed acknowledgement,{ "success": true, "message": "Customer login initiated. Use customer JWT flow for API operations." }. That result is not tagged as an HTTP result, so it sits on the step output rather than underresponse: read{{<stepReference>.data.success}}and{{<stepReference>.data.message}}. It confirms the credentials but does not give you a usable customer JWT. To call Get Customer, Get Wishlist, or Execute Custom GraphQL as a customer, obtain a JWT through BigCommerce's own customer JWT flow outside this connector and pass it as Customer JWT. Invalid credentials surface as an HTTP-level error fromlogin.php.
Common tasks
Build a cart and check totals
- Storefront: Create Cart with variables
{"input": {"lineItems": [{"quantity": 1, "productEntityId": 123, "variantEntityId": 456}], "currencyCode": "USD", "locale": "en"}}. Name the step "Create Cart". - Storefront: Apply Coupon with
{"input": {"cartEntityId": "{{createCart.response.data.cart.createCart.cart.entityId}}", "data": {"couponCode": "SUMMER10"}}}. - Storefront: Get Checkout with
{"entityId": "{{createCart.response.data.cart.createCart.cart.entityId}}"}, then read{{getCheckout.response.data.site.checkout.grandTotal.value}}.
Show a category page
- Storefront: Get Category with
{"entityId": 12, "productsFirst": 20}. - Read
{{getCategory.response.data.site.category.products.edges}}and loop over it. UsepageInfo.endCursorfor the next page.
Run a query no action covers
- Choose Storefront: Execute Custom GraphQL and paste your query.
- Read the result under
{{<stepReference>.response.data...}}, with the top-level field directly underdata.
Also applies here
Step Name
What it's for
Every step in a workflow gets a name — either one you set or a default based on the connector and action (e.g. "Get Order Details", "Send Welcome Email"). It's shown throughout the UI and in your execution history, and it's also the source for the step's Reference — a camelCase identifier auto-generated from the name (e.g. "Get Order Details" → getOrderDetails) — which is what you actually use in {{...}} expressions to read this step's output from later steps. See Step Reference.
Rules
- Must be at least 2 characters, and 50 characters or fewer.
- Must be unique within the workflow — reusing a name that's already taken will be rejected, with a suggested alternative (e.g.
"Get Order Details 2"). - Can't be empty.
Tips
- Prefer a descriptive, human-readable name over a generic one — "Get Order Details" is easier to work with later than "HTTP Request 2", especially once a workflow has a dozen steps.
- Renaming a step updates every reference to it elsewhere in the workflow automatically.
Step Reference
Syntax
Any input field can reference earlier data using {{expression}}. The expression is evaluated as JSONata — so simple dot-paths and more advanced queries (filters, functions) both work.
Referencing a step's output
Use the step's Reference — a camelCase identifier auto-generated from its Name (e.g. "Get Order Details" → getOrderDetails), shown read-only wherever the step's fields are configured — followed by the field path. Elsewhere in these docs this general pattern is written as {{<stepReference>.field.path}}:
{{getOrderDetails.response.data.id}}
{{getOrderDetails.response.status}}
The raw display name won't work here even though it's what you see in the UI — {{Get Order Details.response.data.id}} isn't valid, since a bare name containing spaces isn't a single JSONata identifier. Always use the camelCase Reference.
You can also reference steps by position instead of by reference:
{{steps[0].response.data.id}}
Referencing trigger data
{{trigger.headers.authorization}}
{{trigger.body.customerId}}
{{trigger.query.page}}
{{trigger.params.orderId}}
{{trigger.method}}
{{trigger.path}}
Referencing workflow variables
{{variables.myVariable}}
See Variables for the full list of variable types and more examples, including connection-type variables.
Referencing runtime variables
A separate, mutable namespace written by the Variable connector while a run is in progress — not the same as the workflow-level variables above:
{{runtimeVariables.myVariable}}
Notes
- If an expression can't be resolved (a typo in a step name, a field that doesn't exist), it resolves to an empty string rather than failing the workflow — check your execution history if a value comes through blank.
- Object values are automatically JSON-stringified when interpolated into a string field.
Execution Settings
Fire-and-forget
When enabled, the workflow doesn't wait for this step to complete before moving to the next one. Use it for steps whose result nothing downstream depends on — logging, analytics, notifications — so they don't add latency to the steps that matter.
Continue on error
When enabled, a failure in this step doesn't stop the workflow — execution continues to the next step. The failure is still recorded in the execution history; this just controls whether it's fatal.
Combine the two for steps that are genuinely optional to the outcome: fire-and-forget so they don't add latency, continue-on-error so a failure in them (e.g. an analytics endpoint being briefly down) doesn't take down an otherwise-successful workflow run.
Caching
What it does
When enabled, a step's result is cached for a configurable TTL (time-to-live, in seconds). If the step runs again with the same effective cache key before the TTL expires, the cached result is returned instead of re-running the step.
Configuring it
- Enabled — turn caching on or off for this step.
- TTL — how long (in seconds) a cached result stays valid.
- Cache key template — an expression (supporting the same
{{...}}step reference syntax used elsewhere) that determines what counts as "the same call". By default this is based on the step's resolved input; a custom template lets you cache more narrowly or broadly than that.
When to use it
Good candidates are steps that call something slow or rate-limited but return the same answer for the same input within a short window — a lookup against a rarely-changing external system, for example. Skip it for steps whose result must always be fresh (anything involving live inventory, pricing, or payment state).
Locking
What it does
When enabled, only one execution of this step (for a given lock key) can run at a time. If a second execution tries to run the same step while a lock is held, it waits until the lock is released or the hold period elapses.
Configuring it
- Enabled — turn locking on or off for this step.
- Lock key — an expression (supporting the same
{{...}}step reference syntax used elsewhere) that determines what counts as "the same resource". By default the lock is scoped to the step itself; a custom key lets you lock per-customer, per-order, or any other identifier that needs serialized access. - Period — how long (in seconds) the lock is held before it's automatically released, in case an execution doesn't complete normally.
When to use it
Use it whenever concurrent executions could race on the same resource — e.g. two workflow runs both trying to update the same order's status at once. A lock key scoped to the order id ensures only one of them proceeds at a time.
Last updated 9 October 2026