Mechanic Get Mechanic
Task library

Untag orders when paid

This task automatically removes specific order tag(s) when orders are paid.

Try this task

When it runs

Occurs whenever an order is paid

What you choose

Order tags to remove

Task code and subscriptions

You can edit the Liquid code after installing this task. View on GitHub or ask a question in the Mechanic Slack community.

Subscriptions

shopify/orders/paid
How task subscriptions work

Option types and flags

Task code

{% if event.preview %}
  {% capture order_json %}
    {
      "admin_graphql_api_id": "gid://shopify/Order/12345"
    }
  {% endcapture %}

  {% assign order = order_json | parse_json %}
{% endif %}

{% action "shopify" %}
  mutation {
    tagsRemove(
      id: {{ order.admin_graphql_api_id | json }}
      tags: {{ options.order_tags_to_remove__array | json }}
    ) {
      userErrors {
        field
        message
      }
    }
  }
{% endaction %}
Mechanic Liquid reference