Customer
Requires 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
field and provides access to associated data such as payment methods and
subscription contracts.
Only use this data if it's required for your app's functionality. Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.
Only use this data if it's required for your app's functionality. Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.
Caution: Only use this data if it's required for your app's functionality. Shopify will restrict <a href="https://shopify.dev/api/usage/access-scopes">access to scopes</a> for apps that don't have a legitimate use for the associated data.
Anchor to FieldsFields
- addressesV2 (MailingAddressConnection!)
- amountSpent (MoneyV2!)
- canDelete (Boolean!)
- companyContactProfiles ([CompanyContact!]!)
- createdAt (DateTime!)
- dataSaleOptOut (Boolean!)
- defaultAddress (MailingAddress)
- defaultEmailAddress (CustomerEmailAddress)
- defaultPhoneNumber (CustomerPhoneNumber)
- displayName (String!)
- events (EventConnection!)
- firstName (String)
- id (ID!)
- image (Image!)
- lastName (String)
- lastOrder (Order)
- legacyResourceId (UnsignedInt64!)
- lifetimeDuration (String!)
- locale (String!)
- mergeable (CustomerMergeable!)
- metafield (Metafield)
- metafields (MetafieldConnection!)
- multipassIdentifier (String)
- note (String)
- numberOfOrders (UnsignedInt64!)
- orders (OrderConnection!)
- paymentMethods (CustomerPaymentMethodConnection!)
- productSubscriberStatus (CustomerProductSubscriberStatus!)
- state (CustomerState!)
- statistics (CustomerStatistics!)
- storeCreditAccounts (StoreCreditAccountConnection!)
- subscriptionContracts (SubscriptionContractConnection!)
- tags ([String!]!)
- taxExempt (Boolean!)
- taxExemptions ([TaxExemption!]!)
- updatedAt (DateTime!)
- verifiedEmail (Boolean!)
- Anchor to addressesV2addresses•Mailing
V2 Address Connection! non-null The addresses associated with the customer.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to amountSpentamount•Money
Spent V2! non-null The total amount that the customer has spent on orders in their lifetime.
- Anchor to canDeletecan•Boolean!
Delete 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.
- Anchor to companyContactProfilescompany•[Company
Contact Profiles Contact!]! non-null A list of the customer's company contact profiles.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the customer was added to the store.
- Anchor to dataSaleOptOutdata•Boolean!
Sale Opt Out non-null Whether the customer has opted out of having their data sold.
- Anchor to defaultAddressdefault•Mailing
Address Address The default address associated with the customer.
- Anchor to defaultEmailAddressdefault•Customer
Email Address Email Address The customer's default email address.
- Anchor to defaultPhoneNumberdefault•Customer
Phone Number Phone Number The customer's default phone number.
- Anchor to displayNamedisplay•String!
Name 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.
- Anchor to eventsevents•Event
Connection! non-null A list of events associated with the customer.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. | comments | boolean | Whether or not to include comment-events in your search, passing
falsewill 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. | | | -
-| | id | id | Filter byidrange. | | | -id:1234
-id:>=1234
-id:<=1234| | subject_type | string | The resource type affected by this event. See EventSubjectType for possible values. | | | -
-
-| You can apply one or more filters to a query. Learn more about Shopify API search syntax.- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Event
Key Sort Keys 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.
Arguments
- Anchor to firstNamefirst•String
Name The customer's first name.
- •ID!non-null
A globally-unique ID.
- Anchor to imageimage•Image!non-null
The image associated with the customer.
- Anchor to sizesize•IntDeprecated
Arguments
- Anchor to lastNamelast•String
Name The customer's last name.
- Anchor to lastOrderlast•Order
Order The customer's last order.
- Anchor to legacyResourceIdlegacy•Unsigned
Resource Id Int64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to lifetimeDurationlifetime•String!
Duration non-null The amount of time since the customer was first added to the store.
Example: 'about 12 years'.
- Anchor to localelocale•String!non-null
The customer's locale.
- Anchor to mergeablemergeable•Customer
Mergeable! non-null Whether the customer can be merged with another customer.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespaceandkey, that's associated with a Shopify resource for the purposes of adding and storing additional information.- •String!required
The key for the metafield.
- Anchor to namespacenamespace•String
The container the metafield belongs to. If omitted, the app-reserved namespace will be used.
Arguments
- •String!
- Anchor to metafieldsmetafields•Metafield
Connection! non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to keyskeys•[String!]
List of keys of metafields in the format
namespace.key, will be returned in the same format.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to namespacenamespace•String
The metafield namespace to filter by. If omitted, all metafields are returned.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to multipassIdentifiermultipass•String
Identifier A unique identifier for the customer that's used with Multipass login.
- Anchor to notenote•String
A note about the customer.
- Anchor to numberOfOrdersnumber•Unsigned
Of Orders Int64! non-null The number of orders that the customer has made at the store in their lifetime.
- Anchor to ordersorders•Order
Connection! non-null A list of the customer's orders.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•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 hoodiecart_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. - channel string Filter by the channel information handle( ) field.- channel:web
-channel:web,poschannel_id id Filter by the channel idfield. - 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
-
-lost
-
-
-won- 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. - 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. - created_at time Filter by the date and time when the order was created in Shopify's system. -
-
-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. - 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:>=5.00current_total_price:<=20.99` customer_id id Filter orders by the customer idfield. - delivery_method string Filter by the delivery field. - shipping
-pick-up
-retail
-local
-pickup-point
-none- 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. - email string Filter by the email address that's associated with the order to provide customer support or analyze purchasing patterns. - email:example@shopify.comfinancial_status string Filter by the order field. - paid
-pending
-authorized
-
-
-refunded
-voided
-expired- 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. -
-
-
-pending
-
-- fulfillment_location_id id Filter by the fulfillment location id( Fulfillment.location.id) field.- fulfillment_status string Filter by the field to prioritize shipments or monitor order processing. - unshipped
-shipped
-fulfilled
-partial
-scheduled
-
-unfulfilled
-- gateway string Filter by the field. Use this filter to find orders that were processed through specific payment providers like Shopify Payments, PayPal, or other custom payment gateways. - id id Filter by idrange.- id:1234
-id:>=1234
-id:<=1234location_id id Filter by the location idthat'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. - metafields.{namespace}.{key} mixed Filters resources by metafield value. Format: metafields.{namespace}.{key}:{value}. Learn more aboutquerying by metafield value. -
-name string Filter by the order namefield. - name:1001-Apayment_id string Filter by the payment ID that's associated with the order to reconcile financial records or troubleshoot payment issues. - 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. - po_number string Filter by the order field. - processed_at time Filter by the order field. - 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. - return_status string Filter by the order's to monitor returns processing and track which orders have active returns.
-
-returned
-
-| | -| | risk_level | string | Filter by the order risk assessmentfield. | -high
-medium
-low
-none
-pending| | -| | sales_channel | string | Filter by the sales channel where the order was made to analyze performance or manage fulfillment processes. | | | -| | sku | string | Filter by the product variantskufield. Learn more about SKUs. | | | -| | 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_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. | | | -
-| | status | string | Filter by the order's status to manage workflows or analyze the order lifecycle. | -open
-closed
-cancelled
-| | -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. | | | -
-| | tag | string | Filter objects by thetagfield. | | | -| | tag_not | string | Filter by objects that don’t have the specified tag. | | | -| | test | boolean | Filter by test orders. Test orders are made using the Shopify 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. | | | -
-| | updated_at | time | Filter by the date and time when the order was last updated in Shopify's system. | | | -
-| You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Order
Key Sort Keys 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.
Arguments
- Anchor to paymentMethodspayment•Customer
Methods Payment Method Connection! non-null A list of the customer's payment methods.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to showRevokedshow•Boolean
Revoked Default:false Whether to show the customer's revoked payment method.
Arguments
- Anchor to productSubscriberStatusproduct•Customer
Subscriber Status Product Subscriber Status! non-null Possible subscriber states of a customer defined by their subscription contracts.
- Anchor to statestate•Customer
State! non-null The state of the customer's account with the shop.
Please note that this only meaningful when Classic Customer Accounts is active.
- Anchor to statisticsstatistics•Customer
Statistics! non-null The statistics for a given customer.
- Anchor to storeCreditAccountsstore•Store
Credit Accounts Credit Account Connection! 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.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•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.
Arguments
- Anchor to subscriptionContractssubscription•Subscription
Contracts Contract Connection! non-null A list of the customer's subscription contracts.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- •[String!]!non-null
A comma separated list of tags that have been added to the customer.
- Anchor to taxExempttax•Boolean!
Exempt non-null Whether the customer is exempt from being charged taxes on their orders.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! non-null The list of tax exemptions applied to the customer.
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time when the customer was last updated.
- Anchor to verifiedEmailverified•Boolean!
Email non-null Whether the customer has verified their email address. Defaults to
trueif the customer is created through the Shopify admin or API.
Deprecated fields
- addresses ([MailingAddress!]!): deprecated
- email (String): deprecated
- emailMarketingConsent (CustomerEmailMarketingConsentState): deprecated
- hasTimelineComment (Boolean!): deprecated
- market (Market): deprecated
- metafieldDefinitions (MetafieldDefinitionConnection!): deprecated
- phone (String): deprecated
- smsMarketingConsent (CustomerSmsMarketingConsentState): deprecated
- unsubscribeUrl (URL!): deprecated
- validEmailAddress (Boolean!): deprecated
- Anchor to addressesaddresses•[Mailing
Address!]! non-nullDeprecated - Anchor to firstfirst•Int
Truncate the array result to this size.
Arguments
- Anchor to emailemail•StringDeprecated
- Anchor to emailMarketingConsentemail•Customer
Marketing Consent Email Marketing Consent State Deprecated - Anchor to hasTimelineCommenthas•Boolean!
Timeline Comment non-nullDeprecated - Anchor to marketmarket•MarketDeprecated
- Anchor to metafieldDefinitionsmetafield•Metafield
Definitions Definition Connection! non-nullDeprecated - Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to namespacenamespace•String
Filter metafield definitions by namespace.
- Anchor to pinnedStatuspinned•Metafield
Status Definition Pinned Status Default:ANY Filter by the definition's pinned status.
- Anchor to queryquery•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 hoodiecreated_at time Filter by the date and time when the metafield definition was created. -
-
-id id Filter by idrange.- id:1234
-id:>=1234
-id:<=1234key string Filter by the metafield definition keyfield. - key:some-keynamespace string Filter by the metafield definition namespacefield. - namespace:some-namespaceowner_type string Filter by the metafield definition field. - type string Filter by the metafield definition typefield. - updated_at time Filter by the date and time when the metafield definition was last updated. -
-| You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Metafield
Key Definition Sort Keys 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.
Arguments
- Anchor to phonephone•StringDeprecated
- Anchor to smsMarketingConsentsms•Customer
Marketing Consent Sms Marketing Consent State Deprecated - Anchor to unsubscribeUrlunsubscribe•URL!
Url non-nullDeprecated - Anchor to validEmailAddressvalid•Boolean!
Email Address non-nullDeprecated
Anchor to QueriesQueries
- customer (Customer)
- customerByIdentifier (Customer)
- customers (CustomerConnection!)
- •query
Returns a
Customerresource by ID.- •ID!required
The ID of the
Customerto return.
Arguments
- •ID!
- •query
Return a customer by an identifier.
- Anchor to identifieridentifier•Customer
Identifier Input! required The identifier of the customer.
Arguments
- •query
Returns a list of customers 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
customersquery supports pagination and sorting.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators.
='2024-01-01'
email:gmail.comemail:"bo.wang@example.com"email:*first_name:Jane| | id | id | Filter byidrange. | | | -id:1234id:>=1234id:<=1234last_abandoned_order_date:'2024-04-01T10:00:00Z'last_abandoned_order_date: >='2024-01-01'last_name:Reevesorder_date:'2024-02-20T00:00:00Z'order_date: >='2024-01-01'`| | orders_count | integer | Filter by the total number of orders a customer has placed. | | | -| | 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 of the customer's account with the shop. This filter is only valid when Classic Customer Accounts is active. | | | -
-
-
-| | tag | string | Filter by the tags that are associated with the customer. This query parameter accepts multiple tags separated by commas. | | | -<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. | | | -<br/> -| | total_spent | float | Filter by the total amount of money a customer has spent across all orders. | | | -
-
-
-| | updated_at | time | The date and time, matching a whole day, when the customer's information was last updated. | | | -
-
-| You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Customer
Key Sort Keys 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.
Arguments
Anchor to MutationsMutations
- customerAddTaxExemptions (CustomerAddTaxExemptionsPayload)
- customerCreate (CustomerCreatePayload)
- customerEmailMarketingConsentUpdate (CustomerEmailMarketingConsentUpdatePayload)
- customerPaymentMethodSendUpdateEmail (CustomerPaymentMethodSendUpdateEmailPayload)
- customerRemoveTaxExemptions (CustomerRemoveTaxExemptionsPayload)
- customerReplaceTaxExemptions (CustomerReplaceTaxExemptionsPayload)
- customerSendAccountInviteEmail (CustomerSendAccountInviteEmailPayload)
- customerSet (CustomerSetPayload)
- customerSmsMarketingConsentUpdate (CustomerSmsMarketingConsentUpdatePayload)
- customerUpdate (CustomerUpdatePayload)
- customerUpdateDefaultAddress (CustomerUpdateDefaultAddressPayload)
- •mutation
Add tax exemptions for the customer.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer to update.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! required The list of tax exemptions to add for the customer, in the format of an array or a comma-separated list. Example values:
,.
Arguments
- •mutation
Creates a new
Customerin the store.Accepts customer details including contact information, marketing consent preferences, and tax exemptions through the
input object. You can also associatemetafieldsand tags to organize and extend customer data.Apps using protected customer data must meet Shopify's protected customer data requirements.
- Anchor to inputinput•Customer
Input! required The input fields to create a customer.
Arguments
- •mutation
Updates a
Customer's email marketing consent information. The customer must have an email address to update their consent. Records the marketing state (such as subscribed, pending, unsubscribed), opt-in level, 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.
- Anchor to inputinput•Customer
Email Marketing Consent Update Input! required Specifies the input fields to update a customer's email marketing consent information.
Arguments
- •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.
- Anchor to customerPaymentMethodIdcustomer•ID!
Payment Method Id required The payment method to be updated.
- Anchor to emailemail•Email
Input Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input.
Arguments
- •mutation
Remove tax exemptions from a customer.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer to update.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! required The list of tax exemptions to remove for the customer, in the format of an array or a comma-separated list. Example values:
,.
Arguments
- •mutation
Replace tax exemptions for a customer.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer to update.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! 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:
,.
Arguments
- •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.
NoteThe invite only works when legacy customer accounts are enabled on the shop.
Note:The invite only works when legacy customer accounts are enabled on the shop.
Note: The invite only works when legacy customer accounts are enabled on the shop.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer to whom an account invite email is to be sent.
- Anchor to emailemail•Email
Input Specifies the account invite email fields.
Arguments
- •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
identifierargument. To update an existing customer, include theidentifierwith the id of the customer to update.To perform an 'upsert' by unique key (email or phone) use the
identifierargument 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
Any list field (e.g. addresses, 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.
- Anchor to identifieridentifier•Customer
Set Identifiers Specifies the identifier that will be used to lookup the resource.
- Anchor to inputinput•Customer
Set Input! required The properties of the customer.
Arguments
- •mutation
Updates a 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. Optionally include when the consent was collected and which location collected it.
- Anchor to inputinput•Customer
Sms Marketing Consent Update Input! required Specifies the input fields to update a customer's SMS marketing consent information.
Arguments
- •mutation
Updates a
Customer's attributes including personal information andtax exemptions.Apps using protected customer data must meet Shopify's protected customer data requirements.
- Anchor to inputinput•Customer
Input! required Provides updated fields for the customer. To set marketing consent, use the
ormutations instead.
Arguments
- •mutation
Updates a customer's default address.
- Anchor to addressIdaddress•ID!
Id required The ID of the customer's new default address.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer whose default address is being updated.
Arguments
Anchor to InterfacesInterfaces
- CommentEventSubject
- HasEvents
- HasMetafieldDefinitions
- HasMetafields
- HasStoreCreditAccounts
- LegacyInteroperability
- Node
- •interface
- •interface
- •interface
- •interface