Liquid
Write Shopify automations in Liquid with Mechanic's custom tags, filters, and objects — including inline GraphQL queries and action definitions.
What does this look like?
{% if event.preview %}
{% assign customer = hash %}
{% assign customer["admin_graphql_api_id"] = "gid://shopify/Customer/1234567890" %}
{% assign customer["orders_count"] = 1 %}
{% endif %}
{% if customer.orders_count == 1 %}
{% action "shopify" %}
mutation {
tagsAdd(id: {{ customer.admin_graphql_api_id | json }}, tags: ["new-customer"]) {
userErrors { field message }
}
}
{% endaction %}
{% endif %}Mechanic Liquid vs. Shopify theme Liquid
One Liquid, many implementations
Last updated
Was this helpful?