Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 2.74 KB

File metadata and controls

51 lines (32 loc) · 2.74 KB

Sync an inverse order tag

Tags: Auto-Tag, Orders, Sync

Shopify's order group filters allow you to filter by the tags the order contains – but not the tags a order does not contain. Use this task to sync an "inverse" tag to all orders who do not have a particular tag, allowing you to filter orders in Shopify by that inverse tag.

Default options

{
  "order_tag_to_watch__required": "wholesale",
  "order_tag_to_use_when_missing__required": "retail"
}

Learn about task options in Mechanic

Subscriptions

shopify/orders/create
shopify/orders/updated
mechanic/user/trigger
mechanic/shopify/bulk_operation

Learn about event subscriptions in Mechanic

Documentation

Shopify's order group filters allow you to filter by the tags the order contains – but not the tags a order does not contain. Use this task to sync an "inverse" tag to all orders who do not have a particular tag, allowing you to filter orders in Shopify by that inverse tag.

To explain by example, if you've already tagged your wholesale orders with "wholesale", configure the "order tag to watch" option with "wholesale", and the "order tag to use when missing" option with "retail". This task will automatically tag all non-wholesale orders with "retail", and automatically remove that tag from any orders who later receive the tag "wholesale". Please note: if you remove the "retail" tag, this task will simply re-add it. To remove the "retail" tag, you would need to add the "wholesale" tag to that order.

Run this task manually to scan all of the orders in your store. Otherwise, this task will monitor and sync tags for all new and updated orders, as they come through.

Installing this task

Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.

Contributions

Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.

Task requests

Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!