younifyd
Menu

customerAddressUpdate

Updates an existing MailingAddress for a Customer. Requires a customer access token to identify the customer, an ID to specify which address to modify, and an address with the updated fields.

Use it in a workflow

  1. Add a step and choose the Shopify Storefront connector.
  2. Pick the customerAddressUpdate action (under Customer).
  3. Fill in the fields below, then reference the result from later steps as {{customeraddressupdate.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 CustomerAddressUpdate($customerAccessToken: String!, $id: ID!, $address: MailingAddressInput!) {
  customerAddressUpdate(
    customerAccessToken: $customerAccessToken
    id: $id
    address: $address
  ) {
    customerAddress {
      address1
      address2
      city
      company
      country
      countryCode
      countryCodeV2
      firstName
      formattedArea
      id
      lastName
      latitude
      longitude
      name
      phone
      province
      provinceCode
      zip
    }
    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.

idstringrequired

Specifies the customer address to update.

addressobjectrequired

The customer’s mailing address.

address1string
address2string
citystring
companystring
countrystring
firstNamestring
lastNamestring
phonestring
provincestring
zipstring
json
{
  "customerAccessToken": "string",
  "id": "string",
  "address": {
    "address1": "string",
    "address2": "string",
    "city": "string",
    "company": "string",
    "country": "string",
    "firstName": "string",
    "lastName": "string",
    "phone": "string",
    "province": "string",
    "zip": "string"
  }
}

Response

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

customerAddressobject
address1string
address2string
citystring
companystring
countrystring
countryCodestring
countryCodeV2string

One ofAFAXALDZADAOAIAGARAMAWACAUATAZBSBHBDBBBYBEBZBJBMBTBOBABWBVBRIOBNBGBFBIKHCACVBQKY

firstNamestring
formattedAreastring
idstring
lastNamestring
latitudenumber
longitudenumber
namestring
phonestring
provincestring
provinceCodestring
zipstring
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.