younifyd
Menu

customerUpdate

Updates a customer's personal information such as name, password, and marketing preferences.

Use it in a workflow

  1. Add a step and choose the Shopify Storefront connector.
  2. Pick the customerUpdate action (under Customer).
  3. Fill in the fields below, then reference the result from later steps as {{customerupdate.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation CustomerUpdate($customerAccessToken: String!, $customer: CustomerUpdateInput!) {
  customerUpdate(customerAccessToken: $customerAccessToken, customer: $customer) {
    customer {
      acceptsMarketing
      avatarUrl
      createdAt
      defaultAddress {
        address1
        address2
        city
        company
        country
        countryCode
        countryCodeV2
        firstName
        formattedArea
        id
        lastName
        latitude
        longitude
        name
        phone
        province
        provinceCode
        zip
      }
      displayName
      email
      firstName
      id
      lastName
      numberOfOrders
      phone
      socialLoginProvider {
        handle
      }
      tags
      updatedAt
    }
    customerAccessToken {
      accessToken
      expiresAt
    }
    customerUserErrors {
      code
      field
      message
    }
    userErrors {
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

customerAccessTokenstringrequired

The access token used to identify the customer.

customerobjectrequired

The customer object input.

firstNamestring
lastNamestring
emailstring
phonestring
passwordstring
acceptsMarketingboolean
json
{
  "customerAccessToken": "string",
  "customer": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string",
    "password": "string",
    "acceptsMarketing": false
  }
}

Response

Read the result with {{customerupdate.response.data.data.customerUpdate}}. If the API returns errors, the step fails and they are at {{customerupdate.response.data.errors}}.

customerobject
acceptsMarketingboolean
avatarUrlstring
createdAtstring
defaultAddressobject18 fields
displayNamestring
emailstring
firstNamestring
idstring
lastNamestring
numberOfOrdersstring
phonestring
socialLoginProviderobject1 fields
tagsarray<object>
updatedAtstring
customerAccessTokenobject
accessTokenstring
expiresAtstring
customerUserErrorsarray<object>
codeobject
fieldobject
messageobject
userErrorsarray<object>
fieldobject
messageobject

Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.