Starting a workflow

Starting workflows for a list of items

The application provides actions that start custom workflows for multiple items at once. There are two approaches: filtering items by a query, or finding items that reference a specific metaobject.

Start workflows by query

These actions start custom workflows for a list of items matching a Shopify search query:

Example

Add the Start custom workflow for list of orders action. Fill in the Trigger specifier field with a value that describes the purpose of the workflow you want to start, and enter a filter in the Query field to select only the needed orders. If the filter contains an error, it will not be applied at all - in that case, the custom workflow will be started for all objects in the store. Start workflows for list of orders – action

Create another workflow that starts with the Order: custom trigger triggered trigger. Immediately after the trigger, add a condition on the Specifier field so the value equals the one passed from the previous workflow. Add the rest of the logic after the condition. Start workflows for list of orders – trigger

This configures a scheduled run of a workflow for a list of orders.

Start workflows by metaobject reference

These actions find all items that reference a specific metaobject and start custom workflows for each of them:

  • Start product workflows by metaobject reference — finds all products referencing a given metaobject and starts workflows that use the Product: custom trigger triggered trigger.
  • Start order workflows by metaobject reference — finds all orders referencing a given metaobject and starts workflows that use the Order: custom trigger triggered trigger.
  • Start customer workflows by metaobject reference — finds all customers referencing a given metaobject and starts workflows that use the Customer: custom trigger triggered trigger.
  • Start company workflows by metaobject reference — finds all companies referencing a given metaobject and starts workflows that use the Company: custom trigger triggered trigger.

Parameters

  • Metaobject ID (required) — the GID of the metaobject instance to look up references for. You can get it from the metaobject's system.id property in Flow.
  • Metafield namespace — filter references by metafield namespace. Leave empty to include references from any namespace.
  • Metafield key — filter references by metafield key. Leave empty to include references with any key.
  • Trigger specifier (required) — specifier you should use in a condition right after a trigger.

Duplicate items are automatically skipped — each item will only trigger one workflow per action run. Duplicates can occur when the same item references the metaobject in multiple metafields.

Rate limits and delays

There are no limits on the number of items that can be processed by these actions. However, these actions are subject to Shopify's rate limits. When rate limits are reached, the action's execution will continue as limits become available. This may slow down the action's execution, but it will not result in an error.

You can adjust the delay between workflow starts using the action's configuration parameter Delay between triggering. This allows you to manage the load on Shopify Flow and avoid exceeding limits.

Infinite loop detection

The app includes loop detection to prevent infinite recursive workflows. If the same action step is triggered more than 10 times with the same parameters within 30 minutes, the loop detection will activate and the workflow will terminate with an error.

Additional considerations

These actions only start workflows but do not wait for their completion.

Warning! If you have multiple custom workflows, combine them into one to reduce the load on Shopify Flow. Learn more.

See also: