Auto-tag customers when their order is paid with Mechanic.

Mechanic is the one-tool-does-it-all automation app for Shopify. :)

Auto-tag customers when their order is paid

by Isaac Bowen (team@usemechanic.com)

Configure this task with a customer tag, and Mechanic will take care of applying it to your customers as soon as their order payment goes through. Easy as that. :)

Runs when an order is paid. Configuration includes customer tag.

15-day free trial – unlimited tasks

Developer details

Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Gurus, everybody.

That’s why we make it easy to configure automation without code, why we make it easy to tweak the underlying code once tasks are installed, and why we publish it all here for everyone to learn from.

Events
when an order is paid (shopify/orders/paid)
Options
customer tag (required)
Script
{% capture tags_to_apply %}{% if order.customer.tags != blank %}{{ order.customer.tags }}, {% endif %}{{ options.customer_tag__required }}{% endcapture %}

{
  "action": {
    "type": "shopify",
    "options": [
      "update",
      [
        "customer",
        {{ order.customer.id | json }}
      ],
      {
        "tags": {{ tags_to_apply | json }}
      }
    ]
  }
}
Mechanic tasks are written in Liquid, which makes them easy to write and easy to modify. Learn more about our platform.