Skip to content

Update customer

Updates the birthday of an existing loyalty customer, identified by their Shopify customer ID. Only the fields you supply are changed.

Profile fields are owned by Shopify and are not editable here. Customer name, email, and phone are synced from Shopify and cannot be changed through this mutation.

NameTypeRequiredDescription
idID!YesThe Shopify customer ID.
inputUpdateCustomerInput!YesThe fields to update (see below).

The UpdateCustomerInput fields:

FieldTypeRequiredDescription
birthdayMonthIntNoBirthday month (1–12).
birthdayDayIntNoBirthday day (1–31).
excludedBooleanNotrue removes the customer from the loyalty program (state becomes removed); false re-includes them.

When excluded is true, the customer is ineligible for earning, birthday and anniversary rewards, and balance recalculation, and this is preserved across Shopify syncs. Setting it to false re-includes the customer and reads their account state back from Shopify.

Returns a Customer object (nullable, null if the customer is not found).

FieldTypeDescription
idID!The Shopify customer ID (the customer’s identity everywhere).
firstNameStringThe customer’s first name.
lastNameStringThe customer’s last name.
emailStringThe customer’s email address.
stampBalanceIntCurrent redeemable stamp balance.
vipTierIdIntCurrent VIP tier ID (if any).
vipTierNameStringCurrent VIP tier name.
dateOfBirthString”dd-mm” string.
stateStringLoyalty state of the customer.
mergedIntoCustomerIdIntIf the customer was merged, the kept customer’s ID.
mutation ($id: ID!, $input: UpdateCustomerInput!) {
updateCustomer(id: $id, input: $input) {
id
dateOfBirth
}
}
{
"id": "6677889900",
"input": {
"birthdayMonth": 12,
"birthdayDay": 10
}
}
{
"data": {
"updateCustomer": {
"id": "6677889900",
"dateOfBirth": "10-12"
}
}
}

Toggle exclusion:

mutation ($id: ID!, $input: UpdateCustomerInput!) {
updateCustomer(id: $id, input: $input) {
id
state
}
}
{
"id": "6677889900",
"input": {
"excluded": true
}
}