Skip to main content

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 inputs
Link copied!

Several actions support the following optional localization inputs to contextualize results to a specific country or language configured in your Shopify store.

InputTypeDescription
countrystringShopify country code to contextualize the query (e.g. FR)
languagestringShopify language code to contextualize the query (e.g. FR)

Get product by ID
Link copied!

Retrieves full product data for a single product by its ID from Shopify.

Inputs

InputTypeRequiredDescription
idstringYesThe unique identifier of the product
countrystringNoSee shared localization inputs
languagestringNoSee shared localization inputs
imagesCountnumberNoNumber of images to include. Default: 10. Min: 1
variantsCountnumberNoNumber of variants to include. Default: 10. Min: 1
collectionsCountnumberNoNumber of collections to include. Default: 10. Min: 1

Outputs

OutputTypeDescription
productobjectThe full product object. See product object below

Get basic product by ID
Link copied!

Retrieves a simplified set of product data for a single product by its ID from Shopify. Intended for use with commerce repositories.

Inputs

InputTypeRequiredDescription
idstringYesThe unique identifier of the product
countrystringNoSee shared localization inputs
languagestringNoSee shared localization inputs

Outputs

OutputTypeDescription
product.idstringProduct ID
product.namestringProduct name
product.descriptionstringDescription
product.imagesarrayList of image objects, each with a url field

Get products by search term
Link copied!

Retrieves a cursor-paginated list of products matching a search term from Shopify.

Inputs

InputTypeRequiredDescription
searchTermstringYesThe search query string used to find matching products
countrystringNoSee shared localization inputs
languagestringNoSee shared localization inputs
imagesCountnumberNoNumber of images to include per product. Default: 3. Min: 1
variantsCountnumberNoNumber of variants to include per product. Default: 3. Min: 1
collectionsCountnumberNoNumber of collections to include per product. Default: 3. Min: 1
pagination.countnumberNoNumber of results per page. Default: 20. Max: 20
pagination.afterstringNoCursor to retrieve results after a given position. Use the endCursor value from a previous response

Outputs

OutputTypeDescription
productsarrayList of full product objects. See product object below

Get basic products by optional keyword
Link copied!

Retrieves a cursor-paginated list of products matching an optional keyword from Shopify. Intended for use with commerce repositories.

Inputs

InputTypeRequiredDescription
keywordstringNoThe search phrase used to find matching products. If omitted, returns all products
beforestringNoA pagination cursor to retrieve the page of products before a given position. Use the startCursor value from a previous response
afterstringNoA pagination cursor to retrieve the page of products after a given position. Use the endCursor value from a previous response

Outputs

OutputTypeDescription
pageInfo.startCursorstringCursor for the first item in the current page
pageInfo.endCursorstringCursor for the last item in the current page
pageInfo.hasPreviousPagebooleanWhether a previous page exists
pageInfo.hasNextPagebooleanWhether a next page exists
productsarrayList of basic product objects, each with id, name, description, and images (array of objects with a url field)

Get products by category (collection) ID
Link copied!

Retrieves a cursor-paginated list of products belonging to a category (collection) from Shopify.

Inputs

InputTypeRequiredDescription
idstringYesThe category (collection) ID used to find matching products
countrystringNoSee shared localization inputs
languagestringNoSee shared localization inputs
imagesCountnumberNoNumber of images to include per product. Default: 3. Min: 1
variantsCountnumberNoNumber of variants to include per product. Default: 3. Min: 1
collectionsCountnumberNoNumber of collections to include per product. Default: 3. Min: 1
pagination.countnumberNoNumber of results per page. Default: 20. Max: 20
pagination.afterstringNoCursor to retrieve results after a given position. Use the endCursor value from a previous response

Outputs

OutputTypeDescription
productsarrayList of full product objects. See product object below

Get category (collection) by ID
Link copied!

Retrieves a single category (collection) by its ID from Shopify.

Inputs

InputTypeRequiredDescription
idstringYesThe unique identifier of the category (collection)
countrystringNoSee shared localization inputs
languagestringNoSee shared localization inputs

Outputs

OutputTypeDescription
categoryobjectThe category object. See category object below

Get categories (collections) by search term
Link copied!

Retrieves a cursor-paginated list of categories (collections) matching a search term from Shopify.

Inputs

InputTypeRequiredDescription
searchTermstringYesThe search term to search categories by
countrystringNoSee shared localization inputs
languagestringNoSee shared localization inputs
sortKeystringNoSort order for results. Supported values: TITLE, UPDATED_AT, ID, RELEVANCE
pagination.countnumberNoNumber of results per page. Default: 20. Max: 20
pagination.afterstringNoCursor to retrieve results after a given position. Use the endCursor value from a previous response

Outputs

OutputTypeDescription
categoriesarrayList of category objects. See category object below
countnumberNumber of categories returned
startCursorstringCursor for the first item in the current page
endCursorstringCursor for the last item in the current page
hasPreviousPagebooleanWhether a previous page exists
hasNextPagebooleanWhether a next page exists

Get segment by ID
Link copied!

Retrieves a single customer segment by its ID from Shopify.

Inputs

InputTypeRequiredDescription
idstringYesThe unique identifier of the segment

Outputs

OutputTypeDescription
segment.idstringSegment ID
segment.namestringSegment name
segment.querystringSegment query string
segment.creationDatestringDate the segment was created
segment.lastEditDatestringDate the segment was last edited

Get segments
Link copied!

Retrieves a cursor-paginated list of customer segments from Shopify.

Inputs

InputTypeRequiredDescription
pagination.countnumberNoNumber of results per page. Default: 20. Max: 20
pagination.afterstringNoCursor to retrieve results after a given position. Use the endCursor value from a previous response

Outputs

OutputTypeDescription
segmentsarrayList of segment objects, each with id, name, query, creationDate, and lastEditDate
countnumberNumber of segments returned
startCursorstringCursor for the first item in the current page
endCursorstringCursor for the last item in the current page
hasPreviousPagebooleanWhether a previous page exists
hasNextPagebooleanWhether a next page exists

Product object
Link 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 fields
Link copied!

FieldTypeDescription
idstringProduct ID
handlestringURL handle
titlestringProduct title
descriptionstringPlain text description
descriptionHtmlstringHTML description
productTypestringProduct type
tagsarray of stringsProduct tags
availableForSalebooleanWhether the product is available for sale
onlineStoreUrlstringOnline store URL
createdAtstringCreated date
updatedAtstringLast updated date
publishedAtstringPublished date
seo.titlestringSEO title
seo.descriptionstringSEO description
FieldTypeDescription
featuredImage.idstringImage ID
featuredImage.altTextstringAlt text
featuredImage.urlstringImage URL
featuredImage.widthnumberImage width
featuredImage.heightnumberImage height

Images, variants, and collections
Link 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:

FieldTypeDescription
idstringVariant ID
titlestringVariant title
skustringSKU
priceobjectPrice with amount and currencyCode
compareAtPriceobjectCompare-at price with amount and currencyCode
inventoryQuantitystringInventory quantity
inventoryPolicystringInventory policy
createdAtstringCreated date
updatedAtstringLast updated date
selectedOptionsarraySelected options, each with name and value
inventoryItem.idstringInventory item ID
inventoryItem.trackedbooleanWhether inventory is tracked
inventoryItem.unitCoststringUnit cost

collections.edges[].node - Collection objects with: id, title, handle

Options
Link copied!

FieldTypeDescription
options[].idstringOption ID
options[].namestringOption name
options[].valuesarray of stringsOption values

Category object
Link copied!

The category object returned by Get category (collection) by ID and Get categories (collections) by search term contains the following fields:

FieldTypeDescription
idstringCategory ID
handlestringURL handle
titlestringCategory title
descriptionstringPlain text description
descriptionHtmlstringHTML description
onlineStoreUrlstringOnline store URL
updatedAtstringLast updated date
image.idstringCategory image ID
image.altTextstringCategory image alt text
image.urlstringCategory image URL
image.widthnumberCategory image width
image.heightnumberCategory image height
seo.titlestringSEO title
seo.descriptionstringSEO description

Adding actions to flows

Inputs, outputs and ports

Input field variables

Developing extensions