younifyd
Menu

customer

Retrieves the Customer associated with the provided access token. Use the customerAccessTokenCreate mutation to obtain an access token using legacy customer account authentication (email and password).

Use it in a workflow

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

Query

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

graphql
query Customer($customerAccessToken: String!) {
  customer(customerAccessToken: $customerAccessToken) {
    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
  }
}

Variables

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

customerAccessTokenstringrequired

The customer access token.

json
{
  "customerAccessToken": "string"
}

Response

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

acceptsMarketingboolean
avatarUrlstring
createdAtstring
defaultAddressobject
address1string
address2string
citystring
companystring
countrystring
countryCodestring
countryCodeV2string

One ofAFAXALDZADAOAIAGARAMAWACAUATAZBSBHBDBBBYBEBZBJBMBTBOBABWBVBRIOBNBGBFBIKHCACVBQKY

firstNamestring
formattedAreastring
idstring
lastNamestring
latitudenumber
longitudenumber
namestring
phonestring
provincestring
provinceCodestring
zipstring
displayNamestring
emailstring
firstNamestring
idstring
lastNamestring
numberOfOrdersstring
phonestring
socialLoginProviderobject
handlestring
tagsarray<string>
updatedAtstring

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