Get product variant data

In workflows that use product variant data, you can use theGet product variant dataaction to retrieve product variant information from your store. You can use this action in any workflow, including theScheduled timetrigger. In a workflow that uses theScheduled timetrigger, the workflow starts at a time that you've specified, rather than as a result of an event. Because there is no specific event in your store or from an app that starts the workflow, there is no data automatically included.

Fields

TheGet product variant dataaction contains the following fields.

Fields used in the Get product variant data action.
Field Description
Sort data by Required. How the data returned by the search query is sorted.
Maximum number of product variants Required. The maximum amount of product variants that can be returned by the search query that you select.
Select a query to filter data Required. The search query that obtains the data to be used in the workflow. SelectAdvancedto create your ownproduct variants queryby using Shopify's APIsearch syntax.
Edit query The search query that's used to select product variants. This query can be edited to customize the results.

Returned data

TheGet product variant dataaction itself doesn't take any direct action in your store. Instead, it extracts data from your store based on your query, and makes this data available for use in subsequent steps in your workflow.

When you add aGet product variant dataaction to a workflow, steps that follow this action have aGet product variant datavariable available in the variable picker. To use the data extracted by your query in following conditions or actions, selectGet product variant datain theReturned datasection of the configuration panel. For custom created variables,use thegetProductVariantDataobject.

Triggers

TheGet product variant dataaction can be used in any workflow.

Example

的例子workflow that sends an email with low-stock product variants.

In this example workflow, a workflow is scheduled to run every Sunday. TheGet product variant dataaction is used to collect data for product variants that are currently low stock. An email is sent with a list of the product variants.

Shopify准备OB欧宝娱乐APP开始销售?Try it free