Shopify actions
The Shopify extension provides actions for retrieving product, category (collection), and segment data from Shopify within Workforce Flows. Use these actions to fetch individual records or search and browse content as part of your automated content processes.
The Shopify action extension can be installed from the Workforce integration marketplace.
See Shopify configuration for details of how to obtain the credentials you need to configure the Shopify action extension.
Tip
These action descriptions cover the most commonly used inputs and outputs. When designing flows, you may also notice additional input and output variables.
Shared localization inputsLink copied!
Several actions support the following optional localization inputs to contextualize results to a specific country or language configured in your Shopify store.
| Input | Type | Description |
|---|---|---|
country | string | Shopify country code to contextualize the query (e.g. FR) |
language | string | Shopify language code to contextualize the query (e.g. FR) |
Get product by IDLink copied!
Retrieves full product data for a single product by its ID from Shopify.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the product |
country | string | No | See shared localization inputs |
language | string | No | See shared localization inputs |
imagesCount | number | No | Number of images to include. Default: 10. Min: 1 |
variantsCount | number | No | Number of variants to include. Default: 10. Min: 1 |
collectionsCount | number | No | Number of collections to include. Default: 10. Min: 1 |
Outputs
| Output | Type | Description |
|---|---|---|
product | object | The full product object. See product object below |
Get basic product by IDLink copied!
Retrieves a simplified set of product data for a single product by its ID from Shopify. Intended for use with commerce repositories.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the product |
country | string | No | See shared localization inputs |
language | string | No | See shared localization inputs |
Outputs
| Output | Type | Description |
|---|---|---|
product.id | string | Product ID |
product.name | string | Product name |
product.description | string | Description |
product.images | array | List of image objects, each with a url field |
Get products by search termLink copied!
Retrieves a cursor-paginated list of products matching a search term from Shopify.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
searchTerm | string | Yes | The search query string used to find matching products |
country | string | No | See shared localization inputs |
language | string | No | See shared localization inputs |
imagesCount | number | No | Number of images to include per product. Default: 3. Min: 1 |
variantsCount | number | No | Number of variants to include per product. Default: 3. Min: 1 |
collectionsCount | number | No | Number of collections to include per product. Default: 3. Min: 1 |
pagination.count | number | No | Number of results per page. Default: 20. Max: 20 |
pagination.after | string | No | Cursor to retrieve results after a given position. Use the endCursor value from a previous response |
Outputs
| Output | Type | Description |
|---|---|---|
products | array | List of full product objects. See product object below |
Get basic products by optional keywordLink copied!
Retrieves a cursor-paginated list of products matching an optional keyword from Shopify. Intended for use with commerce repositories.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
keyword | string | No | The search phrase used to find matching products. If omitted, returns all products |
before | string | No | A pagination cursor to retrieve the page of products before a given position. Use the startCursor value from a previous response |
after | string | No | A pagination cursor to retrieve the page of products after a given position. Use the endCursor value from a previous response |
Outputs
| Output | Type | Description |
|---|---|---|
pageInfo.startCursor | string | Cursor for the first item in the current page |
pageInfo.endCursor | string | Cursor for the last item in the current page |
pageInfo.hasPreviousPage | boolean | Whether a previous page exists |
pageInfo.hasNextPage | boolean | Whether a next page exists |
products | array | List of basic product objects, each with id, name, description, and images (array of objects with a url field) |
Get products by category (collection) IDLink copied!
Retrieves a cursor-paginated list of products belonging to a category (collection) from Shopify.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The category (collection) ID used to find matching products |
country | string | No | See shared localization inputs |
language | string | No | See shared localization inputs |
imagesCount | number | No | Number of images to include per product. Default: 3. Min: 1 |
variantsCount | number | No | Number of variants to include per product. Default: 3. Min: 1 |
collectionsCount | number | No | Number of collections to include per product. Default: 3. Min: 1 |
pagination.count | number | No | Number of results per page. Default: 20. Max: 20 |
pagination.after | string | No | Cursor to retrieve results after a given position. Use the endCursor value from a previous response |
Outputs
| Output | Type | Description |
|---|---|---|
products | array | List of full product objects. See product object below |
Get category (collection) by IDLink copied!
Retrieves a single category (collection) by its ID from Shopify.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the category (collection) |
country | string | No | See shared localization inputs |
language | string | No | See shared localization inputs |
Outputs
| Output | Type | Description |
|---|---|---|
category | object | The category object. See category object below |
Get categories (collections) by search termLink copied!
Retrieves a cursor-paginated list of categories (collections) matching a search term from Shopify.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
searchTerm | string | Yes | The search term to search categories by |
country | string | No | See shared localization inputs |
language | string | No | See shared localization inputs |
sortKey | string | No | Sort order for results. Supported values: TITLE, UPDATED_AT, ID, RELEVANCE |
pagination.count | number | No | Number of results per page. Default: 20. Max: 20 |
pagination.after | string | No | Cursor to retrieve results after a given position. Use the endCursor value from a previous response |
Outputs
| Output | Type | Description |
|---|---|---|
categories | array | List of category objects. See category object below |
count | number | Number of categories returned |
startCursor | string | Cursor for the first item in the current page |
endCursor | string | Cursor for the last item in the current page |
hasPreviousPage | boolean | Whether a previous page exists |
hasNextPage | boolean | Whether a next page exists |
Get segment by IDLink copied!
Retrieves a single customer segment by its ID from Shopify.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the segment |
Outputs
| Output | Type | Description |
|---|---|---|
segment.id | string | Segment ID |
segment.name | string | Segment name |
segment.query | string | Segment query string |
segment.creationDate | string | Date the segment was created |
segment.lastEditDate | string | Date the segment was last edited |
Get segmentsLink copied!
Retrieves a cursor-paginated list of customer segments from Shopify.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
pagination.count | number | No | Number of results per page. Default: 20. Max: 20 |
pagination.after | string | No | Cursor to retrieve results after a given position. Use the endCursor value from a previous response |
Outputs
| Output | Type | Description |
|---|---|---|
segments | array | List of segment objects, each with id, name, query, creationDate, and lastEditDate |
count | number | Number of segments returned |
startCursor | string | Cursor for the first item in the current page |
endCursor | string | Cursor for the last item in the current page |
hasPreviousPage | boolean | Whether a previous page exists |
hasNextPage | boolean | Whether a next page exists |
Product objectLink copied!
The full product object returned by Get product by ID, Get products by search term, and Get products by category (collection) ID contains the following fields.
Core fieldsLink copied!
| Field | Type | Description |
|---|---|---|
id | string | Product ID |
handle | string | URL handle |
title | string | Product title |
description | string | Plain text description |
descriptionHtml | string | HTML description |
productType | string | Product type |
tags | array of strings | Product tags |
availableForSale | boolean | Whether the product is available for sale |
onlineStoreUrl | string | Online store URL |
createdAt | string | Created date |
updatedAt | string | Last updated date |
publishedAt | string | Published date |
seo.title | string | SEO title |
seo.description | string | SEO description |
Featured imageLink copied!
| Field | Type | Description |
|---|---|---|
featuredImage.id | string | Image ID |
featuredImage.altText | string | Alt text |
featuredImage.url | string | Image URL |
featuredImage.width | number | Image width |
featuredImage.height | number | Image height |
Images, variants, and collectionsLink copied!
These are returned as GraphQL connection objects with an edges array. Each edge contains a node with the resource fields.
images.edges[].node - Image objects with: id, altText, url, width, height
variants.edges[].node - Variant objects:
| Field | Type | Description |
|---|---|---|
id | string | Variant ID |
title | string | Variant title |
sku | string | SKU |
price | object | Price with amount and currencyCode |
compareAtPrice | object | Compare-at price with amount and currencyCode |
inventoryQuantity | string | Inventory quantity |
inventoryPolicy | string | Inventory policy |
createdAt | string | Created date |
updatedAt | string | Last updated date |
selectedOptions | array | Selected options, each with name and value |
inventoryItem.id | string | Inventory item ID |
inventoryItem.tracked | boolean | Whether inventory is tracked |
inventoryItem.unitCost | string | Unit cost |
collections.edges[].node - Collection objects with: id, title, handle
OptionsLink copied!
| Field | Type | Description |
|---|---|---|
options[].id | string | Option ID |
options[].name | string | Option name |
options[].values | array of strings | Option values |
Category objectLink copied!
The category object returned by Get category (collection) by ID and Get categories (collections) by search term contains the following fields:
| Field | Type | Description |
|---|---|---|
id | string | Category ID |
handle | string | URL handle |
title | string | Category title |
description | string | Plain text description |
descriptionHtml | string | HTML description |
onlineStoreUrl | string | Online store URL |
updatedAt | string | Last updated date |
image.id | string | Category image ID |
image.altText | string | Category image alt text |
image.url | string | Category image URL |
image.width | number | Category image width |
image.height | number | Category image height |
seo.title | string | SEO title |
seo.description | string | SEO description |