Mechanic Get Mechanic
Task library

Email your team a POS customer follow-up request

Send your team a customer’s contact details and optional short answers when staff request a follow-up from Shopify POS. No sale is required.

Try this task

When it runs

Occurs whenever user/pos/customer_follow_up is triggered

What you choose

  • POS event topic
  • Email recipients

Documentation

Send your team a customer’s contact details and optional short answers when staff request a follow-up from Shopify POS. No sale is required.

  1. Add this task, choose the recipient inboxes, and enable it. Approve any requested Shopify customer access and email access.
  2. In Forms, choose Point of Sale → Request a customer follow-up.
  3. In Submission settings, use Run tasks now. Set the form’s Event topic and this task’s POS event topic option to the same value. Both default to user/pos/customer_follow_up.
  4. Save and publish the form. In Shopify admin, open Point of Sale → Edit Point of Sale → Apps, select the Mechanic extension, enable Activate on: Customer details, and save. This one-time activation applies across locations and is separate from adding the home tile.
  5. In Shopify POS, open a customer → Mechanic actions → Request a customer follow-up, optionally add a short note, and submit.
  6. Check the event and team inbox. Receipt confirmation means the event was accepted; task execution and email delivery happen in the background.

The customer action appears in POS only while its topic has at least one enabled task subscriber. Cart-saving forms are unaffected.

This uses ordinary Mechanic subscriptions: every enabled task subscribed to the topic can run. Use different topics for separate workflows, or share a topic when the same tasks should receive several forms. The form ID is available in event.data.pos.form_id if your custom task needs to distinguish forms.

The event includes the viewed customer in event.data.customer and short answers in event.data.answers. This task reads the customer’s current name, email, and phone from Shopify and emails your configured team, not the customer. It does not update marketing consent or send marketing email. Other tasks can use the same event to call a CRM, service system, ERP, or another API.

Requires the POS customer-action API, UI, extension, and shop rollout flag. Installing this task does not enable POS or create a form. Re-running an accepted event can send another email.
See the POS Forms guide for placement, prefill, and troubleshooting.

Task code and subscriptions

You can edit the Liquid code after installing this task. View on GitHub or ask a question in the Mechanic Slack community.

Subscriptions

{{ options.pos_event_topic__required }}
How task subscriptions work

Option types and flags

Task code

{% comment %}
  {{ options.pos_event_topic__required }}
  {{ options.email_recipients__email_array_required }}
{% endcomment %}
{% assign recipients = options.email_recipients__email_array_required %}
{% assign customer_gid = event.data.customer.admin_graphql_api_id %}
{% assign input = event.data.answers %}
{% if event.preview %}
  {% assign customer_gid = "gid://shopify/Customer/1234567890" %}
  {% if recipients == blank %}{% assign recipients = "team@example.com" | split: "," %}{% endif %}
{% elsif event.topic != options.pos_event_topic__required or event.source != "pos" or event.data.pos.form_id == blank %}
  {% log "This is not a POS customer request. No email was queued." %}{% break %}
{% endif %}
{% unless customer_gid contains "gid://shopify/Customer/" %}
  {% error "The request is missing its customer." %}{% break %}
{% endunless %}
{% if recipients == blank %}
  {% error "Choose the inboxes that should receive customer follow-up requests." %}{% break %}
{% endif %}
{% capture query %}
  query { customer(id: {{ customer_gid | json }}) { id displayName email phone } }
{% endcapture %}
{% assign result = query | shopify %}
{% assign contact = result.data.customer %}
{% if event.preview %}
  {% capture sample %}{"id":"gid://shopify/Customer/1234567890","displayName":"Alex Morgan","email":"alex@example.com","phone":"+12045550123"}{% endcapture %}
  {% assign contact = sample | parse_json %}
  {% capture sample_input %}{"note":"Please call tomorrow about a repair."}{% endcapture %}
  {% assign input = sample_input | parse_json %}
{% elsif result.errors != blank or contact == nil %}
  {% error "Shopify could not load this customer. Check customer access and the event before retrying." %}{% break %}
{% endif %}
{% capture body %}
  <p>Your POS team requested a customer follow-up.</p>
  <p><strong>{{ contact.displayName | escape }}</strong><br>
  {% if contact.email != blank %}Email: {{ contact.email | escape }}<br>{% endif %}
  {% if contact.phone != blank %}Phone: {{ contact.phone | escape }}{% endif %}</p>
  {% for pair in input %}
    {% assign value_type = pair.last | json | slice: 0, 1 %}
    {% if value_type == '"' and pair.last != blank %}
      <p><strong>{{ pair.first | replace: "_", " " | capitalize | escape }}</strong><br>{{ pair.last | escape | newline_to_br }}</p>
    {% elsif pair.last == true or pair.last == false %}
      <p><strong>{{ pair.first | replace: "_", " " | capitalize | escape }}</strong>: {% if pair.last %}Yes{% else %}No{% endif %}</p>
    {% endif %}
  {% endfor %}
  <p><a href="https://{{ shop.myshopify_domain | escape }}/admin/customers/{{ contact.id | split: '/' | last | escape }}">View customer in Shopify</a></p>
{% endcapture %}
{% capture subject %}Customer follow-up: {{ contact.displayName | strip_newlines }}{% endcapture %}
{% action "email" %}
  {"to": {{ recipients | json }}, "subject": {{ subject | strip | truncate: 200, "" | json }}, "body": {{ body | strip | json }}, "from_display_name": {{ shop.name | json }}, "reply_to": {{ shop.customer_email | json }}}
{% endaction %}
Mechanic Liquid reference

Default option values

POS event topic
user/pos/customer_follow_up
Email recipients
[]