Shopify Integration

Use Shopify nodes when a Brickr route needs to read catalog data, inspect orders or create discount codes.

Shopify discount nodes use the Admin GraphQL API. Brickr does not model the old REST PriceRule + DiscountCode flow anymore. A discount code is created directly with Shopify's discountCodeBasicCreate or discountCodeFreeShippingCreate mutations.

API modes

| API | Access | Used by | |-----|--------|---------| | Storefront API | GraphQL, customer-facing read access | Get collections, get products, get product by ID | | Admin API | Store-owner access | Product writes, orders, discounts | | Admin GraphQL discounts | Modern discount operations | Create discount code, create free shipping code, list discount IDs, get discount by ID, delete discount |

Required credentials

Store credentials in workspace settings and keep node inputs on their default secret values.

| Secret | Used by | Required scopes | |--------|---------|-----------------| | SHOPIFY_STORE_DOMAIN | All Shopify nodes | Your .myshopify.com store domain | | SHOPIFY_STOREFRONT_API_TOKEN | Storefront nodes | Storefront token access to products and collections | | SHOPIFY_ADMIN_API_TOKEN | Admin nodes | Product/order scopes plus write_discounts for creating/deleting discounts and read_discounts for listing/reading discounts |

Set Shopify secrets in Workspace Settings -> Integrations -> Shopify. If a required Shopify secret is missing, the execution engine returns a structured JSON error that names the missing secret and where to set it.

Discount workflow

Use this pattern for most flows:

1. Create a discount with Create Discount Code or Create Free Shipping Code. 2. Store the returned discountId if you need to edit, delete or inspect it later. 3. Use List Discounts when you only need IDs for a loop. 4. Use Get Discount by ID inside the loop to load a full discountObject. 5. Use Split Object on discountObject when you need fields like code, status, summary, startsAt or usageLimit.

This is more efficient than listing full discount payloads every time because the list node only returns discountIds.

Nodes

All Shopify nodes are in Integrations -> Shopify.

Get Collections

Retrieves collections from the Storefront API.

| Input | Type | Required | Description | |-------|------|----------|-------------| | limit | number | No | Max collections to return, default 50 | | cursor | string | No | Pagination cursor | | storeDomain | string | Yes | Store domain, default {{secret:SHOPIFY_STORE_DOMAIN}} | | storefrontApiToken | string | Yes | Storefront token, default {{secret:SHOPIFY_STOREFRONT_API_TOKEN}} |

| Output | Type | Description | |--------|------|-------------| | collections | ShopifyCollection[] | Collection connection from Shopify | | success | boolean | Whether the request succeeded | | error | string | Error message if the request failed |

Get Products

Retrieves products from the Storefront API, optionally filtered by collection.

| Input | Type | Required | Description | |-------|------|----------|-------------| | limit | number | No | Max products to return, default 50 | | cursor | string | No | Pagination cursor | | collectionId | string | No | Shopify collection ID | | storeDomain | string | Yes | Store domain | | storefrontApiToken | string | Yes | Storefront token |

| Output | Type | Description | |--------|------|-------------| | products | ShopifyProduct[] | Product connection from Shopify | | success | boolean | Whether the request succeeded | | error | string | Error message if the request failed |

Get Product by ID

Retrieves one product from the Storefront API.

| Input | Type | Required | Description | |-------|------|----------|-------------| | productId | string | Yes | Shopify product GraphQL ID | | storeDomain | string | Yes | Store domain | | storefrontApiToken | string | Yes | Storefront token |

| Output | Type | Description | |--------|------|-------------| | product | ShopifyProduct | Product object | | success | boolean | Whether the request succeeded | | error | string | Error message if the request failed |

Create Product

Creates a product with the Admin API.

| Input | Type | Required | Description | |-------|------|----------|-------------| | title | string | Yes | Product title | | description | string | No | Product description | | price | string | No | Price for the default variant | | vendor | string | No | Product vendor | | status | ProductStatus | No | active, draft or archived | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token |

| Output | Type | Description | |--------|------|-------------| | product | ShopifyProduct | Created product object | | success | boolean | Whether the request succeeded | | error | string | Error message if the request failed |

Update Product

Updates an existing product.

| Input | Type | Required | Description | |-------|------|----------|-------------| | productId | string | Yes | Shopify product ID | | title | string | No | New title | | description | string | No | New description | | price | string | No | New default variant price | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token |

| Output | Type | Description | |--------|------|-------------| | product | ShopifyProduct | Updated product object | | success | boolean | Whether the request succeeded | | error | string | Error message if the request failed |

Delete Product

Deletes a product.

| Input | Type | Required | Description | |-------|------|----------|-------------| | productId | string | Yes | Shopify product ID | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token |

| Output | Type | Description | |--------|------|-------------| | success | boolean | Whether the request succeeded | | error | string | Error message if the request failed |

Get Orders

Retrieves orders from the Admin API.

| Input | Type | Required | Description | |-------|------|----------|-------------| | limit | number | No | Max orders to return, default 50 | | createdAtMin | string | No | Only orders created after this ISO date | | orderStatus | OrderStatus | No | any, open, closed or cancelled | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token |

| Output | Type | Description | |--------|------|-------------| | orders | ShopifyOrder[] | Order objects | | success | boolean | Whether the request succeeded | | error | string | Error message if the request failed |

Create Discount Code

Creates a percentage or fixed-amount code discount with Admin GraphQL.

| Input | Type | Required | Description | |-------|------|----------|-------------| | discountObject | ShopifyDiscountInput | Yes | Object containing code, discountType, value and optional limits | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token with write_discounts |

| Output | Type | Description | |--------|------|-------------| | discountObject | ShopifyDiscountCode | Split-friendly discount object | | discountId | string | Shopify GraphQL discount node ID | | success | boolean | Whether the mutation succeeded | | error | string | Error message if the mutation failed |

Create Free Shipping Code

Creates a free-shipping code discount with Admin GraphQL.

| Input | Type | Required | Description | |-------|------|----------|-------------| | discountObject | ShopifyFreeShippingDiscountInput | Yes | Object containing code and optional limits | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token with write_discounts |

| Output | Type | Description | |--------|------|-------------| | discountObject | ShopifyDiscountCode | Split-friendly discount object | | discountId | string | Shopify GraphQL discount node ID | | success | boolean | Whether the mutation succeeded | | error | string | Error message if the mutation failed |

List Discounts

Lists discount IDs only. Use this node before a loop, then pass each ID into Get Discount by ID.

| Input | Type | Required | Description | |-------|------|----------|-------------| | limit | number | No | Max IDs to return, default 50, max 250 | | query | string | No | Shopify discount search query | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token with read_discounts |

| Output | Type | Description | |--------|------|-------------| | discountIds | string[] | Shopify GraphQL discount node IDs | | success | boolean | Whether the query succeeded | | error | string | Error message if the query failed |

Get Discount by ID

Loads one discount as a split-friendly object.

| Input | Type | Required | Description | |-------|------|----------|-------------| | discountId | string | Yes | Shopify GraphQL discount node ID | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token with read_discounts |

| Output | Type | Description | |--------|------|-------------| | discountObject | ShopifyDiscountCode | Full discount object | | discountId | string | Shopify GraphQL discount node ID | | success | boolean | Whether the query succeeded | | error | string | Error message if the query failed |

Delete Discount

Deletes a code discount by Shopify GraphQL discount ID.

| Input | Type | Required | Description | |-------|------|----------|-------------| | discountId | string | Yes | Shopify GraphQL discount node ID | | storeDomain | string | Yes | Store domain | | adminApiToken | string | Yes | Admin token with write_discounts |

| Output | Type | Description | |--------|------|-------------| | deletedDiscountId | string | Deleted Shopify discount ID | | success | boolean | Whether the mutation succeeded | | error | string | Error message if the mutation failed |

Predefined structures

Shopify objects can be split with Split Object.

| Structure | Description | |-----------|-------------| | ShopifyProduct | Product with title, description, handle, vendor, prices, images, variants and tags | | ShopifyCollection | Collection with title, description, handle and image | | ShopifyOrder | Order with line items, customer, addresses and status fields | | ShopifyDiscountInput | Input object for creating percentage or fixed amount discounts | | ShopifyFreeShippingDiscountInput | Input object for creating free shipping discounts | | ShopifyDiscountCode | GraphQL discount object with id, code, status, summary, startsAt, endsAt, usageLimit and appliesOncePerCustomer |

Enums

| Enum | Values | Description | |------|--------|-------------| | ProductStatus | active, draft, archived | Product visibility status | | OrderStatus | any, open, closed, cancelled | Order status filter | | ShopifyDiscountType | percentage, fixedAmount | Discount value type | | ShopifyDiscountMinimumRequirement | none, subtotal, quantity | Optional minimum requirement |

Common errors

| Error | Fix | |-------|-----| | SHOPIFY_ADMIN_API_TOKEN is not configured | Set the admin token in workspace Shopify settings | | Invalid Shopify store domain | Use the .myshopify.com domain, not a storefront URL | | Access denied or requires write_discounts | Add the correct Admin API scopes to the Shopify app token | | discountObject.code is required | Connect a complete ShopifyDiscountInput object |

What's next?

| Topic | Description | |-------|-------------| | Triggers | Trigger nodes and route entry points | | Slack Integration | Slack nodes and events | | Type System | Typed objects and Split Object |