Mechanic is a development and ecommerce automation platform for Shopify. :)
Are you using Locksmith for access control on your online store? Use this task to tag customers with the passcode keys they've used.
Runs Occurs when Locksmith sends a session ping. Configuration includes echo all locksmith session pings.
Are you using Locksmith for access control on your online store? Use this task to tag customers with the passcode keys they've used.
Notes: After installing this task, email team@uselocksmith.com and ask to have your Locksmith webhooks sent to Mechanic.
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?)
locksmith/sessions/ping
{% if event.preview %} {% capture event_json %} { "preview": true, "data": { "customer": { "admin_graphql_api_id": "gid://shopify/Customer/1234567890" }, "params": { "passcode": "passcode" } } } {% endcapture %} {% assign event = event_json | parse_json %} {% endif %} {% if options.echo_all_locksmith_session_pings__boolean %} {% action "echo", event_data: event.data %} {% endif %} {% assign customer_admin_graphql_api_id = event.data.customer.admin_graphql_api_id %} {% assign passcode = event.data.params.passcode %} {% log customer_admin_graphql_api_id: customer_admin_graphql_api_id, passcode: passcode %} {% if customer_admin_graphql_api_id and passcode %} {% action "shopify" %} mutation { tagsAdd( id: {{ customer_admin_graphql_api_id | json }} tags: {{ passcode | json }} ) { userErrors { field message } } } {% endaction %} {% endif %}