---
title: Customer - GraphQL Admin
description: >-
  Information about a customer of the shop, such as the customer's contact

  details, purchase history, and marketing preferences.


  Tracks the customer's total spending through the
  [`amountSpent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-amountSpent)

  field and provides access to associated data such as payment methods and

  subscription contracts.


  > Caution:

  > Only use this data if it's required for your app's functionality. Shopify
  will

  restrict [access to scopes](https://shopify.dev/api/usage/access-scopes) for

  apps that don't have a legitimate use for the associated data.
api_version: 2026-04
source_url:
  html: 'https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer'
  md: 'https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer.md'
api_name: admin
api_type: graphql
type: object
metadata:
  domain: admin
---

# Customer

object

Requires `read_customers` access scope.

Information about a customer of the shop, such as the customer's contact details, purchase history, and marketing preferences.

Tracks the customer's total spending through the [`amountSpent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-amountSpent) field and provides access to associated data such as payment methods and subscription contracts.

***

**Caution:** Only use this data if it\&#39;s required for your app\&#39;s functionality. Shopify will restrict \<a href="https://shopify.dev/api/usage/access-scopes">access to scopes\</a> for apps that don\&#39;t have a legitimate use for the associated data.

***

## Fields

* addresses​V2

  [Mailing​Address​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/MailingAddressConnection)

  non-null

  The addresses associated with the customer.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  ***

* amount​Spent

  [Money​V2!](https://shopify.dev/docs/api/admin-graphql/latest/objects/MoneyV2)

  non-null

  The total amount that the customer has spent on orders in their lifetime.

* can​Delete

  [Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

  non-null

  Whether the merchant can delete the customer from their store.

  A customer can be deleted from a store only if they haven't yet made an order. After a customer makes an order, they can't be deleted from a store.

* company​Contact​Profiles

  [\[Company​Contact!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact)

  non-null

  A list of the customer's company contact profiles.

* created​At

  [Date​Time!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/DateTime)

  non-null

  The date and time when the customer was added to the store.

* data​Sale​Opt​Out

  [Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

  non-null

  Whether the customer has opted out of having their data sold.

* default​Address

  [Mailing​Address](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress)

  The default address associated with the customer.

* default​Email​Address

  [Customer​Email​Address](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress)

  The customer's default email address.

* default​Phone​Number

  [Customer​Phone​Number](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPhoneNumber)

  The customer's default phone number.

* display​Name

  [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  non-null

  The full name of the customer, based on the values for first\_name and last\_name. If the first\_name and last\_name are not available, then this falls back to the customer's email address, and if that is not available, the customer's phone number.

* events

  [Event​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/EventConnection)

  non-null

  A list of events associated with the customer.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators. | comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`\
    \- `true` | | created\_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`\
    \- `created_at:<now` | | id | id | Filter by `id` range. | | | - `id:1234`\
    \- `id:>=1234`\
    \- `id:<=1234` | | subject\_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`\
    \- `PRODUCT`\
    \- `COLLECTION` | You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

    * action

      string

      The action that occured.

      Example:

      * `action:create`

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Event​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/EventSortKeys)

    Default:ID

    Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

* first​Name

  [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  The customer's first name.

* id

  [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

  non-null

  A globally-unique ID.

* image

  [Image!](https://shopify.dev/docs/api/admin-graphql/latest/objects/Image)

  non-null

  The image associated with the customer.

  * size

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    Deprecated

    ### Arguments

  ***

* last​Name

  [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  The customer's last name.

* last​Order

  [Order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order)

  The customer's last order.

* legacy​Resource​Id

  [Unsigned​Int64!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/UnsignedInt64)

  non-null

  The ID of the corresponding resource in the REST Admin API.

* lifetime​Duration

  [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  non-null

  The amount of time since the customer was first added to the store.

  Example: 'about 12 years'.

* locale

  [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  non-null

  The customer's locale.

* mergeable

  [Customer​Mergeable!](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerMergeable)

  non-null

  Whether the customer can be merged with another customer.

* metafield

  [Metafield](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield)

  A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.

  * key

    [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    required

    ### Arguments

    The key for the metafield.

  * namespace

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

  ***

* metafields

  [Metafield​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/MetafieldConnection)

  non-null

  A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) that a merchant associates with a Shopify resource.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * keys

    [\[String!\]](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    List of keys of metafields in the format `namespace.key`, will be returned in the same format.

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * namespace

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The metafield namespace to filter by. If omitted, all metafields are returned.

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  ***

* multipass​Identifier

  [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  A unique identifier for the customer that's used with Multipass login.

* note

  [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  A note about the customer.

* number​Of​Orders

  [Unsigned​Int64!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/UnsignedInt64)

  non-null

  The number of orders that the customer has made at the store in their lifetime.

* orders

  [Order​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/OrderConnection)

  non-null

  A list of the customer's orders.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators.

    | name | type | description | acceptable\_values | default\_value | example\_use |
    | - | - | - | - | - | - |
    | default | string | Filter by a case-insensitive search of multiple fields | | | |
    | in a document. | | | - `query=Bob Norman` - `query=title:green hoodie` | | |
    | cart\_token | string | Filter by the cart token's unique value to track | | | |
    | abandoned cart conversions or troubleshoot checkout issues. The token | | | | | |
    | references the cart that's associated with an order. | | | - | | |
    | `cart_token:abc123` | | | | | |
    | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) | | | |
    | (`ChannelInformation.channelDefinition.handle`) field. | | | - | | |
    | `channel:web` - `channel:web,pos` | | | | | |
    | channel\_id | id | Filter by the channel [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.id) | | | |
    | field. | | | - `channel_id:123` | | |
    | chargeback\_status | string | Filter by the order's chargeback status. A | | | |
    | chargeback occurs when a customer questions the legitimacy of a charge with | | | | | |
    | their financial institution. | - `accepted` - `charge_refunded` - | | | | |
    | `lost` - `needs_response` - `under_review` - `won` | | - | | | |
    | `chargeback_status:accepted` | | | | | |
    | checkout\_token | string | Filter by the checkout token's unique value to | | | |
    | analyze conversion funnels or resolve payment issues. The checkout token's | | | | | |
    | value references the checkout that's associated with an order. | | | - | | |
    | `checkout_token:abc123` | | | | | |
    | confirmation\_number | string | Filter by the randomly generated | | | |
    | alpha-numeric identifier for an order that can be displayed to the customer | | | | | |
    | instead of the sequential order name. This value isn't guaranteed to be | | | | | |
    | unique. | | | - `confirmation_number:ABC123` | | |
    | created\_at | time | Filter by the date and time when the order was created | | | |
    | in Shopify's system. | | | - `created_at:2020-10-21T23:39:20Z` - | | |
    | `created_at:<now` - `created_at:<=2024` | | | | | |
    | credit\_card\_last4 | string | Filter by the last four digits of the payment | | | |
    | card that was used to pay for the order. This filter matches only the last | | | | | |
    | four digits of the card for heightened security. | | | - | | |
    | `credit_card_last4:1234` | | | | | |
    | current\_total\_price | float | Filter by the current total price of the | | | |
    | order in the shop currency, including any returns/refunds/removals. This | | | | | |
    | filter supports both exact values and ranges. | | | - | | |
    | `current_total_price:10` - \`current\_total\_price:>=5.00 | | | | | |
    | current\_total\_price:<=20.99\` | | | | | |
    | customer\_id | id | Filter orders by the customer [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Customer#field-Customer.fields.id) | | | |
    | field. | | | - `customer_id:123` | | |
    | delivery\_method | string | Filter by the delivery [`methodType`](https://shopify.dev/api/admin-graphql/2024-07/objects/DeliveryMethod#field-DeliveryMethod.fields.methodType) | | | |
    | field. | - `shipping` - `pick-up` - `retail` - `local` - | | | | |
    | `pickup-point` - `none` | | - `delivery_method:shipping` | | | |
    | discount\_code | string | Filter by the case-insensitive discount code that | | | |
    | was applied to the order at checkout. Limited to the first discount code | | | | | |
    | used on an order. Maximum characters: 255. | | | - `discount_code:ABC123` | | |
    | email | string | Filter by the email address that's associated with the | | | |
    | order to provide customer support or analyze purchasing patterns. | | | - | | |
    | `email:example@shopify.com` | | | | | |
    | financial\_status | string | Filter by the order [`displayFinancialStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) | | | |
    | field. | - `paid` - `pending` - `authorized` - | | | | |
    | `partially_paid` - `partially_refunded` - `refunded` - | | | | | |
    | `voided` - `expired` | | - `financial_status:authorized` | | | |
    | fraud\_protection\_level | string | Filter by the level of fraud protection | | | |
    | that's applied to the order. Use this filter to manage risk or handle | | | | | |
    | disputes. | - `fully_protected` - `partially_protected` - | | | | |
    | `not_protected` - `pending` - `not_eligible` - | | | | | |
    | `not_available` | | - `fraud_protection_level:fully_protected` | | | |
    | fulfillment\_location\_id | id | Filter by the fulfillment location [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment#field-Fulfillment.fields.location.id) | | | |
    | (`Fulfillment.location.id`) field. | | | - `fulfillment_location_id:123` | | |
    | fulfillment\_status | string | Filter by the [`displayFulfillmentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFulfillmentStatus) | | | |
    | field to prioritize shipments or monitor order processing. | - | | | | |
    | `unshipped` - `shipped` - `fulfilled` - `partial` - | | | | | |
    | `scheduled` - `on_hold` - `unfulfilled` - `request_declined` | | | | | |
    | | - `fulfillment_status:fulfilled` | | | | |
    | gateway | string | Filter by the [`paymentGatewayNames`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.paymentGatewayNames) | | | |
    | field. Use this filter to find orders that were processed through specific | | | | | |
    | payment providers like Shopify Payments, PayPal, or other custom payment | | | | | |
    | gateways. | | | - `gateway:shopify_payments` | | |
    | id | id | Filter by `id` range. | | | - `id:1234` - `id:>=1234` - `id:<=1234` |
    | location\_id | id | Filter by the location [`id`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.id) | | | |
    | that's associated with the order to view and manage orders for specific | | | | | |
    | locations. For POS orders, locations must be defined in the Shopify admin | | | | | |
    | under **Settings** > **Locations**. If no ID is provided, then the primary | | | | | |
    | location of the shop is returned. | | | - `location_id:123` | | |
    | metafields.{namespace}.{key} | mixed | Filters resources by metafield | | | |
    | value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about | | | | | |
    | [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | | | |
    | | | - `metafields.custom.on_sale:true` - | | | |
    | `metafields.product.material:"gid://shopify/Metaobject/43458085"` | | | | | |
    | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) | | | |
    | field. | | | - `name:1001-A` | | |
    | payment\_id | string | Filter by the payment ID that's associated with the | | | |
    | order to reconcile financial records or troubleshoot payment issues. | | | - | | |
    | `payment_id:abc123` | | | | | |
    | payment\_provider\_id | id | Filter by the ID of the payment provider that's | | | |
    | associated with the order to manage payment methods or troubleshoot | | | | | |
    | transactions. | | | - `payment_provider_id:123` | | |
    | po\_number | string | Filter by the order [`poNumber`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.poNumber) | | | |
    | field. | | | - `po_number:P01001` | | |
    | processed\_at | time | Filter by the order [`processedAt`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.processedAt) | | | |
    | field. | | | - `processed_at:2021-01-01T00:00:00Z` | | |
    | reference\_location\_id | id | Filter by the ID of a location that's | | | |
    | associated with the order, such as locations from fulfillments, refunds, or | | | | | |
    | the shop's primary location. | | | - `reference_location_id:123` | | |
    | return\_status | string | Filter by the order's [`returnStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.returnStatus) | | | |
    | to monitor returns processing and track which orders have active returns. | | | | | |

    * `return_requested`\
      \- `in_progress`\
      \- `inspection_complete`
    * `returned`\
      \- `return_failed`\
      \- `no_return` | | - `return_status:in_progress` | | risk\_level | string | Filter by the order risk assessment [`riskLevel`](https://shopify.dev/api/admin-graphql/latest/objects/OrderRiskAssessment#field-OrderRiskAssessment.fields.riskLevel) field. | - `high`\
      \- `medium`\
      \- `low`\
      \- `none`\
      \- `pending` | | - `risk_level:high` | | sales\_channel | string | Filter by the [sales channel](https://shopify.dev/docs/apps/build/sales-channels) where the order was made to analyze performance or manage fulfillment processes. | | | - `sales_channel: some_sales_channel` | | sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:ABC123` | | source\_identifier | string | Filter by the ID of the order placed on the originating platform, such as a unique POS or third-party identifier. This value doesn't correspond to the Shopify ID that's generated from a completed draft order. | | | - `source_identifier:1234-12-1000` | | source\_name | string | Filter by the platform where the order was placed to distinguish between web orders, POS sales, draft orders, or third-party channels. Use this filter to analyze sales performance across different ordering methods. | | | - `source_name:web`\
      \- `source_name:shopify_draft_order` | | status | string | Filter by the order's status to manage workflows or analyze the order lifecycle. | - `open`\
      \- `closed`\
      \- `cancelled`\
      \- `not_closed` | | - `status:open` | | subtotal\_line\_items\_quantity | string | Filter by the total number of items across all line items in an order. This filter supports both exact values and ranges, and is useful for identifying bulk orders or analyzing purchase volume patterns. | | | - `subtotal_line_items_quantity:10`\
      \- `subtotal_line_items_quantity:5..20` | | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | | tag\_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | | test | boolean | Filter by test orders. Test orders are made using the [Shopify Bogus Gateway](https://help.shopify.com/manual/checkout-settings/test-orders/payments-test-mode#bogus-gateway) or a payment provider with test mode enabled. | | | - `test:true` | | total\_weight | string | Filter by the order weight. This filter supports both exact values and ranges, and is to be used to filter orders by the total weight of all items (excluding packaging). It takes a unit of measurement as a suffix. It accepts the following units: g, kg, lb, oz. | | | - `total_weight:10.5kg`\
      \- `total_weight:>=5g total_weight:<=20g`
    * `total_weight:.5 lb` | | updated\_at | time | Filter by the date and time when the order was last updated in Shopify's system. | | | - `updated_at:2020-10-21T23:39:20Z`
    * `updated_at:<now`\
      \- `updated_at:<=2024` | You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Order​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderSortKeys)

    Default:ID

    Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

* payment​Methods

  [Customer​Payment​Method​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/CustomerPaymentMethodConnection)

  non-null

  A list of the customer's payment methods.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * show​Revoked

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Whether to show the customer's revoked payment method.

  ***

* product​Subscriber​Status

  [Customer​Product​Subscriber​Status!](https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerProductSubscriberStatus)

  non-null

  Possible subscriber states of a customer defined by their subscription contracts.

* state

  [Customer​State!](https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerState)

  non-null

  The state of the customer's account with the shop.

  Please note that this only meaningful when Classic Customer Accounts is active.

* statistics

  [Customer​Statistics!](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerStatistics)

  non-null

  The statistics for a given customer.

* store​Credit​Accounts

  [Store​Credit​Account​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/StoreCreditAccountConnection)

  non-null

  Returns a list of store credit accounts that belong to the owner resource. A store credit account owner can hold multiple accounts each with a different currency.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

    * currency\_code

      string

    * id

      id

      Filter by `id` range.

      Example:

      * `id:1234`
      * `id:>=1234`
      * `id:<=1234`

  ***

* subscription​Contracts

  [Subscription​Contract​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/SubscriptionContractConnection)

  non-null

  A list of the customer's subscription contracts.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  ***

* tags

  [\[String!\]!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  non-null

  A comma separated list of tags that have been added to the customer.

* tax​Exempt

  [Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

  non-null

  Whether the customer is exempt from being charged taxes on their orders.

* tax​Exemptions

  [\[Tax​Exemption!\]!](https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption)

  non-null

  The list of tax exemptions applied to the customer.

* updated​At

  [Date​Time!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/DateTime)

  non-null

  The date and time when the customer was last updated.

* verified​Email

  [Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

  non-null

  Whether the customer has verified their email address. Defaults to `true` if the customer is created through the Shopify admin or API.

### Deprecated fields

* addresses

  [\[Mailing​Address!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress)

  non-nullDeprecated

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    ### Arguments

    Truncate the array result to this size.

  ***

* email

  [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  Deprecated

* email​Marketing​Consent

  [Customer​Email​Marketing​Consent​State](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailMarketingConsentState)

  Deprecated

* has​Timeline​Comment

  [Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

  non-nullDeprecated

* market

  [Market](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market)

  Deprecated

* metafield​Definitions

  [Metafield​Definition​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/MetafieldDefinitionConnection)

  non-nullDeprecated

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * namespace

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    Filter metafield definitions by namespace.

  * pinned​Status

    [Metafield​Definition​Pinned​Status](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldDefinitionPinnedStatus)

    Default:ANY

    Filter by the definition's pinned status.

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators.

    | name | type | description | acceptable\_values | default\_value | example\_use |
    | - | - | - | - | - | - |
    | default | string | Filter by a case-insensitive search of multiple fields | | | |
    | in a document. | | | - `query=Bob Norman` - `query=title:green hoodie` | | |
    | created\_at | time | Filter by the date and time when the metafield | | | |
    | definition was created. | | | - `created_at:>2020-10-21T23:39:20Z` - | | |
    | `created_at:<now` - `created_at:<=2024` | | | | | |
    | id | id | Filter by `id` range. | | | - `id:1234` - `id:>=1234` - `id:<=1234` |
    | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) | | | |
    | field. | | | - `key:some-key` | | |
    | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) | | | |
    | field. | | | - `namespace:some-namespace` | | |
    | owner\_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) | | | |
    | field. | | | - `owner_type:PRODUCT` | | |
    | type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) | | | |
    | field. | | | - `type:single_line_text_field` | | |
    | updated\_at | time | Filter by the date and time when the metafield | | | |
    | definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`  | | |

    * `updated_at:<now`\
      \- `updated_at:<=2024` | You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Metafield​Definition​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldDefinitionSortKeys)

    Default:ID

    Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

* phone

  [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  Deprecated

* sms​Marketing​Consent

  [Customer​Sms​Marketing​Consent​State](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerSmsMarketingConsentState)

  Deprecated

* unsubscribe​Url

  [URL!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/URL)

  non-nullDeprecated

* valid​Email​Address

  [Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

  non-nullDeprecated

***

## Map

### Fields and connections with this object

* [AbandonedCheckout.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/AbandonedCheckout#field-AbandonedCheckout.fields.customer)
* [Abandonment.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Abandonment#field-Abandonment.fields.customer)
* [CalculatedDraftOrder.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedDraftOrder#field-CalculatedDraftOrder.fields.customer)
* [CompanyContact.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact#field-CompanyContact.fields.customer)
* [CustomerConnection.nodes](https://shopify.dev/docs/api/admin-graphql/latest/connections/CustomerConnection#returns-nodes)
* [CustomerEdge.node](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEdge#field-CustomerEdge.fields.node)
* [CustomerPaymentMethod.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaymentMethod#field-CustomerPaymentMethod.fields.customer)
* [DiscountCustomers.customers](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCustomers#field-DiscountCustomers.fields.customers)
* [DraftOrder.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder#field-DraftOrder.fields.customer)
* [GiftCard.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCard#field-GiftCard.fields.customer)
* [GiftCardRecipient.recipient](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardRecipient#field-GiftCardRecipient.fields.recipient)
* [Order.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.customer)
* [PriceRuleCustomerSelection.customers](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceRuleCustomerSelection#field-PriceRuleCustomerSelection.fields.customers)
* [SubscriptionBillingCycleEditedContract.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingCycleEditedContract#field-SubscriptionBillingCycleEditedContract.fields.customer)
* [SubscriptionContract.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract#field-SubscriptionContract.fields.customer)
* [SubscriptionContractBase.customer](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/SubscriptionContractBase#fields-customer)
* [SubscriptionDraft.customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDraft#field-SubscriptionDraft.fields.customer)

### Possible type in

* [Comment​Event​Embed](https://shopify.dev/docs/api/admin-graphql/latest/unions/CommentEventEmbed)
* [Metafield​Reference](https://shopify.dev/docs/api/admin-graphql/latest/unions/MetafieldReference)
* [Metafield​Referencer](https://shopify.dev/docs/api/admin-graphql/latest/unions/MetafieldReferencer)
* [Purchasing​Entity](https://shopify.dev/docs/api/admin-graphql/latest/unions/PurchasingEntity)

***

## Queries

* [customer](https://shopify.dev/docs/api/admin-graphql/latest/queries/customer)

  query

  Returns a `Customer` resource by ID.

  * id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the `Customer` to return.

  ***

* [customer​By​Identifier](https://shopify.dev/docs/api/admin-graphql/latest/queries/customerByIdentifier)

  query

  Return a customer by an identifier.

  * identifier

    [Customer​Identifier​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerIdentifierInput)

    required

    ### Arguments

    The identifier of the customer.

  ***

* [customers](https://shopify.dev/docs/api/admin-graphql/latest/queries/customers)

  query

  Returns a list of [customers](https://shopify.dev/api/admin-graphql/latest/objects/Customer) in your Shopify store, including key information such as name, email, location, and purchase history. Use this query to segment your audience, personalize marketing campaigns, or analyze customer behavior by applying filters based on location, order history, marketing preferences and tags. The `customers` query supports [pagination](https://shopify.dev/api/usage/pagination-graphql) and [sorting](https://shopify.dev/api/admin-graphql/latest/enums/CustomerSortKeys).

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators.

    | name | type | description | acceptable\_values | default\_value | example\_use |
    | - | - | - | - | - | - |
    | default | string | Filter by a case-insensitive search of multiple fields | | | |
    | in a document. | | | - `query=Bob Norman` - `query=title:green hoodie` | | |
    | accepts\_marketing | boolean | Filter by whether a customer has consented | | | |
    | to receive marketing material. | | | - `accepts_marketing:true` | | |
    | country | string | Filter by the country associated with the customer's | | | |
    | address. Use either the country name or the two-letter country code. | | | - | | |
    | `country:Canada` - `country:JP` | | | | | |
    | customer\_date | time | Filter by the date and time when the customer | | | |
    | record was created. This query parameter filters by the [`createdAt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-createdAt) | | | | | |
    | field. | | | - `customer_date:'2024-03-15T14:30:00Z'` - \`customer\_date: | | |

    > \='2024-01-01'`| | email | string | The customer's email address, used to communicate information about orders and for the purposes of email marketing campaigns. You can use a wildcard value to filter the query by customers who have an email address specified. Please note that _email_ is a tokenized field: To retrieve exact matches, quote the email address (_phrase query_) as described in [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax). | | | -`email:gmail.com`<br/> - `email:"<bo.wang@example.com>"`<br/> - `email:\*`| | first_name | string | Filter by the customer's first name. | | | -`first\_name:Jane`| | id | id | Filter by`id`range. | | | -`id:1234`<br/> - `id:>=1234`<br/> - `id:<=1234`| | last_abandoned_order_date | time | Filter by the date and time of the customer's most recent abandoned checkout. An abandoned checkout occurs when a customer adds items to their cart, begins the checkout process, but leaves the site without completing their purchase. | | | -`last\_abandoned\_order\_date:'2024-04-01T10:00:00Z'`<br/> - `last\_abandoned\_order\_date: >='2024-01-01'`| | last_name | string | Filter by the customer's last name. | | | -`last\_name:Reeves`| | order_date | time | Filter by the date and time that the order was placed by the customer. Use this query filter to check if a customer has placed at least one order within a specified date range. | | | -`order\_date:'2024-02-20T00:00:00Z'`&lt;br/&gt; - `order\_date: >='2024-01-01'\`

    * `order_date:'2024-01-01..2024-03-31'` | | orders\_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` | | phone | string | The phone number of the customer, used to communicate information about orders and for the purposes of SMS marketing campaigns. You can use a wildcard value to filter the query by customers who have a phone number specified. | | | - `phone:+18005550100`\
      \- `phone:*` | | state | string | Filter by the [state](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-state) of the customer's account with the shop. This filter is only valid when [Classic Customer Accounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerAccountsV2#field-customerAccountsVersion) is active. | | | - `state:ENABLED`\
      \- `state:INVITED`\
      \- `state:DISABLED`\
      \- `state:DECLINED` | | tag | string | Filter by the tags that are associated with the customer. This query parameter accepts multiple tags separated by commas. | | | - `tag:'VIP'`\<br/> - `tag:'Wholesale,Repeat'` | | tag\_not | string | Filter by the tags that aren't associated with the customer. This query parameter accepts multiple tags separated by commas. | | | - `tag_not:'Prospect'`\<br/> - `tag_not:'Test,Internal'` | | total\_spent | float | Filter by the total amount of money a customer has spent across all orders. | | | - `total_spent:100.50`\
      \- `total_spent:50.00`\
      \- `total_spent:>100.50`\
      \- `total_spent:>50.00` | | updated\_at | time | The date and time, matching a whole day, when the customer's information was last updated. | | | - `updated_at:2024-01-01T00:00:00Z`\
      \- `updated_at:<now`\
      \- `updated_at:<=2024` | You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Customer​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerSortKeys)

    Default:ID

    Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

***

## Customer Queries

### Queried by

* [customer](https://shopify.dev/docs/api/admin-graphql/latest/queries/customer)
* [customer​By​Identifier](https://shopify.dev/docs/api/admin-graphql/latest/queries/customerByIdentifier)
* [customers](https://shopify.dev/docs/api/admin-graphql/latest/queries/customers)

***

## Mutations

* [customer​Add​Tax​Exemptions](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerAddTaxExemptions)

  mutation

  Add tax exemptions for the customer.

  * customer​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the customer to update.

  * tax​Exemptions

    [\[Tax​Exemption!\]!](https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption)

    required

    The list of tax exemptions to add for the customer, in the format of an array or a comma-separated list. Example values: `["CA_BC_RESELLER_EXEMPTION", "CA_STATUS_CARD_EXEMPTION"]`, `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`.

  ***

* [customer​Create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerCreate)

  mutation

  Creates a new [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) in the store.

  Accepts customer details including contact information, marketing consent preferences, and tax exemptions through the [`CustomerInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerInput) input object. You can also associate [`metafields`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/MetafieldInput) and tags to organize and extend customer data.

  Apps using protected customer data must meet Shopify's [protected customer data requirements](https://shopify.dev/docs/apps/launch/protected-customer-data#requirements).

  * input

    [Customer​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerInput)

    required

    ### Arguments

    The input fields to create a customer.

  ***

* [customer​Email​Marketing​Consent​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerEmailMarketingConsentUpdate)

  mutation

  Updates a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s email marketing consent information. The customer must have an email address to update their consent. Records the [marketing state](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress#field-marketingState) (such as subscribed, pending, unsubscribed), [opt-in level](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress#field-marketingOptInLevel), and when and where the customer gave or withdrew consent.

  Only three values are accepted as input: SUBSCRIBED, UNSUBSCRIBED, and PENDING. NOT\_SUBSCRIBED, REDACTED, and INVALID cannot be set via this mutation; they are read-only or internally-set states.

  * input

    [Customer​Email​Marketing​Consent​Update​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerEmailMarketingConsentUpdateInput)

    required

    ### Arguments

    Specifies the input fields to update a customer's email marketing consent information.

  ***

* [customer​Payment​Method​Send​Update​Email](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerPaymentMethodSendUpdateEmail)

  mutation

  Sends an email to a customer containing a secure link to update a specific vaulted payment method. This is commonly used when a customer's credit card is expiring or has been declined, and they need to provide updated payment details for ongoing subscriptions. The email can be customized with sender and BCC fields.

  * customer​Payment​Method​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The payment method to be updated.

  * email

    [Email​Input](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/EmailInput)

    Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input.

  ***

* [customer​Remove​Tax​Exemptions](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerRemoveTaxExemptions)

  mutation

  Remove tax exemptions from a customer.

  * customer​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the customer to update.

  * tax​Exemptions

    [\[Tax​Exemption!\]!](https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption)

    required

    The list of tax exemptions to remove for the customer, in the format of an array or a comma-separated list. Example values: `["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"]`, `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`.

  ***

* [customer​Replace​Tax​Exemptions](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerReplaceTaxExemptions)

  mutation

  Replace tax exemptions for a customer.

  * customer​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the customer to update.

  * tax​Exemptions

    [\[Tax​Exemption!\]!](https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption)

    required

    The list of tax exemptions that will replace the current exemptions for a customer. Can be an array or a comma-separated list. Example values: `["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"]`, `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`.

  ***

* [customer​Send​Account​Invite​Email](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSendAccountInviteEmail)

  mutation

  Sends an email invitation for a customer to create a legacy customer account. The invitation lets customers set up their password and activate their account in the online store.

  You can optionally customize the email content including the subject, sender, recipients, and message body. If you don't provide email customization, the store uses its default account invitation template.

  ***

  **Note:** The invite only works when legacy customer accounts are enabled on the shop.

  ***

  * customer​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the customer to whom an account invite email is to be sent.

  * email

    [Email​Input](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/EmailInput)

    Specifies the account invite email fields.

  ***

* [customer​Set](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSet)

  mutation

  Creates or updates a customer in a single mutation.

  Use this mutation when syncing information from an external data source into Shopify.

  This mutation can be used to create a new customer, update an existing customer by id, or upsert a customer by a unique key (email or phone).

  To create a new customer omit the `identifier` argument. To update an existing customer, include the `identifier` with the id of the customer to update.

  To perform an 'upsert' by unique key (email or phone) use the `identifier` argument to upsert a customer by a unique key (email or phone). If a customer with the specified unique key exists, it will be updated. If not, a new customer will be created with that unique key.

  As of API version 2022-10, apps using protected customer data must meet the protected customer data [requirements](https://shopify.dev/apps/store/data-protection/protected-customer-data)

  Any list field (e.g. [addresses](https://shopify.dev/api/admin-graphql/unstable/input-objects/MailingAddressInput), will be updated so that all included entries are either created or updated, and all existing entries not included will be deleted.

  All other fields will be updated to the value passed. Omitted fields will not be updated.

  * identifier

    [Customer​Set​Identifiers](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerSetIdentifiers)

    ### Arguments

    Specifies the identifier that will be used to lookup the resource.

  * input

    [Customer​Set​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerSetInput)

    required

    The properties of the customer.

  ***

* [customer​Sms​Marketing​Consent​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSmsMarketingConsentUpdate)

  mutation

  Updates a [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s SMS marketing consent information. The customer must have a phone number on their account to receive SMS marketing.

  You can set whether the customer subscribes or unsubscribes to SMS marketing and specify the [opt-in level](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSmsMarketingConsentUpdate#arguments-input.fields.smsMarketingConsent.marketingOptInLevel). Optionally include when the consent was collected and which [location](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSmsMarketingConsentUpdate#arguments-input.fields.smsMarketingConsent.sourceLocationId) collected it.

  * input

    [Customer​Sms​Marketing​Consent​Update​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerSmsMarketingConsentUpdateInput)

    required

    ### Arguments

    Specifies the input fields to update a customer's SMS marketing consent information.

  ***

* [customer​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerUpdate)

  mutation

  Updates a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s attributes including personal information and [`tax exemptions`](https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption).

  Apps using protected customer data must meet Shopify's [protected customer data requirements](https://shopify.dev/docs/apps/launch/protected-customer-data#requirements).

  * input

    [Customer​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerInput)

    required

    ### Arguments

    Provides updated fields for the customer. To set marketing consent, use the `customerEmailMarketingConsentUpdate` or `customerSmsMarketingConsentUpdate` mutations instead.

  ***

* [customer​Update​Default​Address](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerUpdateDefaultAddress)

  mutation

  Updates a customer's default address.

  * address​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the customer's new default address.

  * customer​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    The ID of the customer whose default address is being updated.

  ***

***

## Customer Mutations

### Mutated by

* [customer​Add​Tax​Exemptions](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerAddTaxExemptions)
* [customer​Create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerCreate)
* [customer​Email​Marketing​Consent​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerEmailMarketingConsentUpdate)
* [customer​Payment​Method​Send​Update​Email](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerPaymentMethodSendUpdateEmail)
* [customer​Remove​Tax​Exemptions](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerRemoveTaxExemptions)
* [customer​Replace​Tax​Exemptions](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerReplaceTaxExemptions)
* [customer​Send​Account​Invite​Email](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSendAccountInviteEmail)
* [customer​Set](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSet)
* [customer​Sms​Marketing​Consent​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSmsMarketingConsentUpdate)
* [customer​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerUpdate)
* [customer​Update​Default​Address](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerUpdateDefaultAddress)

***

## Interfaces

* * [Comment​Event​Subject](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/CommentEventSubject)

    interface

  * [Has​Events](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasEvents)

    interface

  * [Has​Metafield​Definitions](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasMetafieldDefinitions)

    interface

  * [Has​Metafields](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasMetafields)

    interface

  * [Has​Store​Credit​Accounts](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasStoreCreditAccounts)

    interface

  * [Legacy​Interoperability](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/LegacyInteroperability)

    interface

  * [Node](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node)

    interface

***

## Customer Implements

### Implements

* [Comment​Event​Subject](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/CommentEventSubject)
* [Has​Events](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasEvents)
* [Has​Metafield​Definitions](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasMetafieldDefinitions)
* [Has​Metafields](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasMetafields)
* [Has​Store​Credit​Accounts](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasStoreCreditAccounts)
* [Legacy​Interoperability](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/LegacyInteroperability)
* [Node](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node)
