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
- Add a step and choose the Shopify Storefront connector.
- Pick the customerAddressUpdate action (under Customer).
- 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.
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.
{
"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}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?