We're constantly trying to improve your support experience, and your feedback is extremely valuable to us.

Please take a moment to tell us about your experience today.
Sign up for future Help Center user research studies.

customerCreate

Version 2019-04

Creates a new customer.

Required access

write_customers access scope

Interactive Example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Specifies the fields to use when creating the customer.

Input Fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

tags ([String!])

Tags that the shop owner has attached to the customer.

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

Return Fields

customer (Customer)

The created customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2019-07 (Latest)

Creates a new customer.

Required access

write_customers access scope

Interactive Example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Specifies the fields to use when creating the customer.

Input Fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

tags ([String!])

Tags that the shop owner has attached to the customer.

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return Fields

customer (Customer)

The created customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2019-10 (Release candidate)

Creates a new customer.

Required access

write_customers access scope

Interactive Example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Specifies the fields to use when creating the customer.

Input Fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

tags ([String!])

Tags that the shop owner has attached to the customer.

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return Fields

customer (Customer)

The created customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Sign up for a Partner account to get started.

Sign up