Mechanic is a development and ecommerce automation platform for Shopify. :)
This task watches incoming orders, and tags each order with a certain value from the customer's note, as identified by a configurable prefix. For example, if your customers have notes resembling "Username: xyz", configure this task with the prefix "Username: " to have it tag incoming orders as "xyz". Useful with apps like inkFrog, which add eBay usernames to customer notes, using a prefix.
Runs Occurs whenever an order is created. Configuration includes tag prefix in customer note.
This task watches incoming orders, and tags each order with a certain value from the customer's note, as identified by a configurable prefix. For example, if your customers have notes resembling "Username: xyz", configure this task with the prefix "Username: " to have it tag incoming orders as "xyz". Useful with apps like inkFrog, which add eBay usernames to customer notes, using a prefix.
This task watches incoming orders, and tags each order with a certain value from the customer's note, as identified by a configurable prefix. For example, if your customers have notes resembling "Username: xyz", configure this task with the prefix "Username: " to have it tag incoming orders as "xyz".
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/orders/create
{% if event.preview %} {% capture order_json %} { "admin_graphql_api_id": "gid://shopify/Order/12345", "customer": { "note": {{ options.tag_prefix_in_customer_note__required | append: "abc123" | json }} } } {% endcapture %} {% assign order = order_json | parse_json %} {% endif %} {% assign note_lines = order.customer.note | split: newline %} {% assign desired_prefix = options.tag_prefix_in_customer_note__required %} {% assign tag = nil %} {% for line in note_lines %} {% assign line_prefix = line | slice: 0, desired_prefix.size %} {% if line_prefix == desired_prefix %} {% assign tag = line | replace: line_prefix, "" %} {% endif %} {% endfor %} {% if tag != blank %} {% action "shopify" %} mutation { tagsAdd( id: {{ order.admin_graphql_api_id | json }} tags: {{ tag | json }} ) { node { ... on Order { tags } } userErrors { field message } } } {% endaction %} {% endif %}
eBay User: