Mechanic is a development and ecommerce automation platform for Shopify. :)
When a customer update occurs, if the customer has a phone number on file, this task will look for unshipped or partially shipped orders that don't yet have a phone number on file, and will add the customer's phone number to those orders.
Runs Occurs whenever a customer is updated.
Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Shopifolks, 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.
(By the way, have you seen our documentation? Have you joined the Slack community?)
shopify/customers/update
{% if event.preview %} {% action "shopify" %} [ "update", ["order", {{ order.id | json }}], {"phone": {{ customer.phone | json }}} ] {% endaction %} {% elsif customer.phone != blank %} {% assign orders = customer.orders.any.unshipped | concat: customer.orders.any.partial %} {% for order in orders %} {% if order.phone != blank %} {% continue %} {% endif %} {% action "shopify" %} [ "update", ["order", {{ order.id | json }}], {"phone": {{ customer.phone | json }}} ] {% endaction %} {% endfor %} {% endif %}