Skip to content

Latest commit

 

History

History
 
 

tag-customers-by-order-tier

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Tag customers by order tier

Tags: Customers, Loyalty, Retention, Tag

Use this task to tag customers by tier, based on how many orders they've placed or by the sum of all their order totals (i.e. total spend). Optionally, configure a customers query, limiting the set of customers that are processed. You may also configure an order query, specifying for things like a rolling time period, or fulfillment status. This task is useful for rewarding customers who establish or maintain a specific spend level.

Default options

{
  "order_minimums_and_customer_tags__keyval_required": {
    "10": "10-orders",
    "100": "100-orders"
  },
  "only_keep_the_customer_tag_for_the_highest_order_minimum__boolean": true,
  "tag_customers_by_number_of_orders__boolean": true,
  "tag_customers_by_sum_of_order_totals__boolean": null,
  "only_process_customers_matching_this_query": "state:enabled tag:qualifies",
  "only_count_orders_matching_this_query": "financial_status:paid created_at:>={{ \"now\" | date: \"%s\" | minus: 31536000 | date: \"%Y-%m-%d\" }}",
  "run_hourly__boolean": null,
  "run_daily__boolean": null
}

Learn about task options in Mechanic

Subscriptions

mechanic/user/trigger

{% if options.run_hourly__boolean %}
  mechanic/scheduler/hourly
{% elsif options.run_daily__boolean %}
  mechanic/scheduler/daily
{% endif %}

mechanic/shopify/bulk_operation

Learn about event subscriptions in Mechanic

Documentation

Use this task to tag customers by tier, based on how many orders they've placed or by the sum of all their order totals (i.e. total spend). Optionally, configure a customers query, limiting the set of customers that are processed. You may also configure an order query, specifying for things like a rolling time period, or fulfillment status. This task is useful for rewarding customers who establish or maintain a specific spend level.

The options for querying customers and orders use the same query syntax as the "Customers" and "Orders" section of the Shopify admin area. For example, to only count customers with enabled online accounts who are tagged with "qualifies", use this customers query:

state:enabled tag:qualifies

To count paid orders from the last 365 days, use this orders query:

financial_status:paid created_at:>={{ "now" | date: "%s" | minus: 31536000 | date: "%Y-%m-%d" }}

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!