Mechanic is a development platform for Shopify. :)
Stay on top of chargebacks and inquiries! Nightly or on-demand, this task will scan the last 60 days of your order records, and apply the tags of your choice to orders with chargeback or inquiry activity, based on what that activity looks like.
Runs when a user triggers the task and every day at midnight. Configuration includes tag for any, tag for open, tag for submitted, tag for won, and tag for lost.
Stay on top of chargebacks and inquiries! Nightly or on-demand, this task will scan the last 60 days of your order records, and apply the tags of your choice to orders with chargeback or inquiry activity, based on what that activity looks like.
Nightly or on-demand, this task scans the last 60 days of your order records, and apply the tags of your choice to orders with chargeback or inquiry activity, based on where that process is for each order.
Learn more about chargebacks in the Shopify documentation:
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.
{% if event.preview %} {% assign preview_tag = options.tag_for_any | default: options.tag_for_open | default: options.tag_for_submitted | default: options.tag_for_won | default: options.tag_for_lost %} { "action": { "type": "shopify", "options": [ "update", [ "order", 12345 ], { "tags": {{ preview_tag | json }} } ] } } {% else %} {% assign statuses = "open,submitted,won,lost,any" | split: "," %} {% for status in statuses %} {% assign option_key = "tag_for_" | append: status %} {% assign chargeback_filter_key = "chargeback_" | append: status %} {% for order in shop.orders[chargeback_filter_key] %} {% assign tags_to_save = order.tags | add_tag: options[option_tag_key] %} {% if status == "submitted" %} {% assign tags_to_save = tags_to_save | remove_tag: options.tag_for_open %} {% elsif status == "won" or status == "lost" %} {% assign tags_to_save = tags_to_save | remove_tag: options.tag_for_open | remove_tag: options.tag_for_submitted %} {% endif %} {% if tags_to_save != order.tags %} { "action": { "type": "shopify", "options": [ "update", [ "order", {{ order.id | json }} ], { "tags": {{ tags_to_save | json }} } ] } } {% endif %} {% endfor %} {% endfor %} {% endif %}
chargeback-any
chargeback-open
chargeback-submitted
chargeback-won
chargeback-lost