Menu
cartDeliveryAddressesUpdate
Updates one or more delivery addresses on a Cart. Each address can be modified to change its details, set it as the pre-selected address for checkout, or mark it for one-time use so it isn't saved to the customer's…
Use it in a workflow
- Add a step and choose the Shopify Storefront connector.
- Pick the cartDeliveryAddressesUpdate action (under Cart).
- Fill in the fields below, then reference the result from later steps as
{{cartdeliveryaddressesupdate.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 CartDeliveryAddressesUpdate($cartId: ID!, $addresses: [CartSelectableAddressUpdateInput!]!) {
cartDeliveryAddressesUpdate(cartId: $cartId, addresses: $addresses) {
cart {
appliedGiftCards {
amountUsed
amountUsedV2
balance
balanceV2
id
lastCharacters
presentmentAmountUsed
}
attributes {
key
value
}
buyerIdentity {
countryCode
customer
deliveryAddressPreferences
email
phone
preferences
purchasingCompany
}
checkoutUrl
cost {
checkoutChargeAmount
subtotalAmount
subtotalAmountEstimated
totalAmount
totalAmountEstimated
totalDutyAmount
totalDutyAmountEstimated
totalTaxAmount
totalTaxAmountEstimated
}
createdAt
delivery
discountAllocations {
discountApplication
discountedAmount
sourceDiscountApplication
targetType
}
discountApplications {
allocationMethod
targetSelection
targetType
totalAllocatedAmount
value
}
discountCodes {
applicable
code
}
estimatedCost {
checkoutChargeAmount
subtotalAmount
totalAmount
totalDutyAmount
totalTaxAmount
}
id
note
totalQuantity
updatedAt
}
userErrors {
code
field
message
}
warnings {
code
message
target
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"cartId": "string",
"addresses": [
{
"id": "string",
"address": {
"deliveryAddress": "string",
"copyFromCustomerAddressId": "string"
},
"selected": false,
"oneTimeUse": false,
"validationStrategy": "COUNTRY_CODE_ONLY"
}
]
}
Response
Read the result with {{cartdeliveryaddressesupdate.response.data.data.cartDeliveryAddressesUpdate}}. If the API returns errors, the step fails and they are at {{cartdeliveryaddressesupdate.response.data.errors}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?