> For the complete documentation index, see [llms.txt](https://learn.mechanic.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.mechanic.dev/platform/liquid/objects/shopify/customer-object.md).

# Customer object

{% hint style="warning" %}
These Shopify REST-backed Liquid objects are legacy. The product and variant Liquid objects no longer work, and Shopify is phasing out the REST Admin API that these objects depend on. Use [GraphQL](/core/actions/shopify.md#graphql) for new work; see the [Shopify REST Admin API notice](/platform/liquid/objects/shopify.md) and [migration guides](/resources/converting-tasks-from-shopify-rest-to-graphql.md).
{% endhint %}

## How to access it

* Use `{{ customer }}` in tasks responding to shopify/customers events
* Look up specific customers by their ID, using `{{ shop.customers[12345678900] }}`
* Look up specific customers by their email address, using `{{ shop.customers["test@example.com"] }}`

## What it contains

* [Every property from the Customer resource in the Shopify REST Admin API](https://shopify.dev/docs/admin-api/rest/reference/customers/customer#properties)
  * Note: Shopify delivers `customer.tags` as a comma-delimited string, *not* an array of strings!
  * Note: As of version 2025-01, Shopify no longer includes customer tags in webhook payloads. In cases of tasks responding to webhooks that include customer payloads, Mechanic does the background querying necessary to support direct references to `customer.tags`.
* `{{ customer.account_activation_url }}`, containing the Shopify-hosted URL where the customer can create a password for their account
* `{{ customer.unsubscribe_url }}`, containing the Mechanic-hosted URL where the customer can mark their own customer account as not accepting marketing; see [How do I add an unsubscribe link to my emails?](/faq/how-do-i-add-an-unsubscribe-link-to-my-emails.md)
* The related [metafields object](/platform/liquid/objects/shopify/metafields/metafield-collection.md): `{{ customer.metafields }}`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learn.mechanic.dev/platform/liquid/objects/shopify/customer-object.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
