younifyd
Menu

updateMyShoppingList

Update an existing shopping list for the signed-in customer — pass its current version and an array of update actions.

Use it in a workflow

  1. Add a step and choose the Commercetools connector.
  2. Pick the updateMyShoppingList action (under Update).
  3. Fill in the fields below, then reference the result from later steps as {{updatemyshoppinglist.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 UpdateMyShoppingList($version: Long!, $actions: [MyShoppingListUpdateAction!]!, $storeKey: KeyReferenceInput, $id: String, $key: String) {
  updateMyShoppingList(
    version: $version
    actions: $actions
    storeKey: $storeKey
    id: $id
    key: $key
  ) {
    key
    nameAllLocales {
      locale
      value
    }
    descriptionAllLocales {
      locale
      value
    }
    slugAllLocales {
      locale
      value
    }
    customerRef {
      typeId
      id
    }
    customer {
      id
      customerNumber
      email
      addresses {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      defaultShippingAddressId
      defaultBillingAddressId
      shippingAddressIds
      billingAddressIds
      isEmailVerified
      customerGroupRef {
        typeId
        id
      }
      externalId
      key
      authenticationMode
      firstName
      lastName
      middleName
      title
      locale
      salutation
      dateOfBirth
      companyName
      vatId
      password
      customerGroup {
        id
        version
        name
        key
        createdAt
        lastModifiedAt
        custom
        createdBy
        lastModifiedBy
      }
      defaultShippingAddress {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      defaultBillingAddress {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      shippingAddresses {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      billingAddresses {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      storesRef {
        typeId
        key
      }
      stores {
        id
        version
        key
        nameAllLocales
        languages
        countries
        productSelections
        distributionChannelsRef
        distributionChannels
        supplyChannelsRef
        supplyChannels
        storefront
        createdAt
        lastModifiedAt
        custom
        createdBy
        lastModifiedBy
      }
      customerGroupAssignments {
        customerGroupRef
        customerGroup
      }
      custom {
        typeRef
        type
      }
      version
      createdAt
      lastModifiedAt
      createdBy {
        isPlatformClient
        clientId
        externalUserId
        anonymousId
        customerRef
        userRef
        associateRef
        attributedTo
      }
      lastModifiedBy {
        isPlatformClient
        clientId
        externalUserId
        anonymousId
        customerRef
        userRef
        associateRef
        attributedTo
      }
    }
    businessUnit {
      id
      key
      name
      contactEmail
      addresses {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      defaultShippingAddress {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      defaultBillingAddress {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      defaultShippingAddressId
      defaultBillingAddressId
      shippingAddresses {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      billingAddresses {
        id
        streetName
        streetNumber
        additionalStreetInfo
        postalCode
        city
        region
        state
        country
        company
        department
        building
        apartment
        pOBox
        additionalAddressInfo
        externalId
        key
        phone
        mobile
        email
        fax
        title
        salutation
        firstName
        lastName
        custom
      }
      shippingAddressIds
      billingAddressIds
      status
      storesRef {
        typeId
        key
      }
      stores {
        id
        version
        key
        nameAllLocales
        languages
        countries
        productSelections
        distributionChannelsRef
        distributionChannels
        supplyChannelsRef
        supplyChannels
        storefront
        createdAt
        lastModifiedAt
        custom
        createdBy
        lastModifiedBy
      }
      storeMode
      unitType
      associates {
        associateRoleAssignments
        customerRef
        customer
      }
      associateMode
      inheritedAssociates {
        associateRoleAssignments
        customerRef
        customer
      }
      custom {
        typeRef
        type
      }
      parentUnitRef {
        typeId
        key
      }
      parentUnit
      ancestors
      inheritedStores {
        store
        storeRef
      }
      topLevelUnitRef {
        typeId
        key
      }
      topLevelUnit
      approvalRuleMode
      customerGroupAssignments {
        customerGroupRef
        customerGroup
      }
      version
      createdAt
      lastModifiedAt
      createdBy {
        isPlatformClient
        clientId
        externalUserId
        anonymousId
        customerRef
        userRef
        associateRef
        attributedTo
      }
      lastModifiedBy {
        isPlatformClient
        clientId
        externalUserId
        anonymousId
        customerRef
        userRef
        associateRef
        attributedTo
      }
    }
    businessUnitRef {
      typeId
      key
    }
    storeRef {
      typeId
      key
    }
    store {
      id
      version
      key
      nameAllLocales {
        locale
        value
      }
      languages
      countries {
        code
      }
      productSelections {
        productSelectionRef
        productSelection
        active
      }
      distributionChannelsRef {
        typeId
        id
      }
      distributionChannels {
        id
        version
        key
        roles
        nameAllLocales
        descriptionAllLocales
        address
        geoLocation
        createdAt
        lastModifiedAt
        reviewRatingStatistics
        custom
        createdBy
        lastModifiedBy
      }
      supplyChannelsRef {
        typeId
        id
      }
      supplyChannels {
        id
        version
        key
        roles
        nameAllLocales
        descriptionAllLocales
        address
        geoLocation
        createdAt
        lastModifiedAt
        reviewRatingStatistics
        custom
        createdBy
        lastModifiedBy
      }
      storefront {
        checkoutUrlTemplate
        orderUrlTemplate
        termsOfServiceUrl
        privacyPolicyUrl
        refundPolicyUrl
        shippingPolicyUrl
        cookiePolicyUrl
        imprintUrl
        faqUrl
        contactUrl
      }
      createdAt
      lastModifiedAt
      custom {
        typeRef
        type
      }
      createdBy {
        isPlatformClient
        clientId
        externalUserId
        anonymousId
        customerRef
        userRef
        associateRef
        attributedTo
      }
      lastModifiedBy {
        isPlatformClient
        clientId
        externalUserId
        anonymousId
        customerRef
        userRef
        associateRef
        attributedTo
      }
    }
    anonymousId
    lineItems {
      id
      key
      productId
      published
      variantId
      productTypeRef {
        typeId
        id
      }
      productType {
        key
        name
        description
        id
        version
        createdAt
        lastModifiedAt
        createdBy
        lastModifiedBy
      }
      quantity
      addedAt
      nameAllLocales {
        locale
        value
      }
      deactivatedAt
      custom {
        typeRef
        type
      }
      productSlugAllLocales {
        locale
        value
      }
      variant {
        id
        key
        sku
        prices
        images
        assets
        availability
      }
    }
    textLineItems {
      id
      key
      nameAllLocales {
        locale
        value
      }
      descriptionAllLocales {
        locale
        value
      }
      quantity
      custom {
        typeRef
        type
      }
      addedAt
    }
    custom {
      typeRef {
        typeId
        id
      }
      type {
        key
        nameAllLocales
        descriptionAllLocales
        resourceTypeIds
        id
        version
        createdAt
        lastModifiedAt
        createdBy
        lastModifiedBy
      }
    }
    deleteDaysAfterLastModification
    id
    version
    createdAt
    lastModifiedAt
    createdBy {
      isPlatformClient
      clientId
      externalUserId
      anonymousId
      customerRef {
        typeId
        id
      }
      userRef {
        typeId
        id
      }
      associateRef {
        typeId
        id
      }
      attributedTo {
        clientId
        source
        userRef
      }
    }
    lastModifiedBy {
      isPlatformClient
      clientId
      externalUserId
      anonymousId
      customerRef {
        typeId
        id
      }
      userRef {
        typeId
        id
      }
      associateRef {
        typeId
        id
      }
      attributedTo {
        clientId
        source
        userRef
      }
    }
  }
}

Variables

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

versionstringrequired
actionsarray<object>required
addLineItemobject7 fields
addTextLineItemobject6 fields
changeLineItemQuantityobject3 fields
changeLineItemsOrderobject1 fields
changeNameobject1 fields
changeTextLineItemNameobject3 fields
changeTextLineItemQuantityobject3 fields
changeTextLineItemsOrderobject1 fields
removeLineItemobject3 fields
removeTextLineItemobject3 fields
setCustomFieldobject2 fields
setCustomTypeobject4 fields
setDeleteDaysAfterLastModificationobject1 fields
setDescriptionobject1 fields
setLineItemCustomFieldobject4 fields
setLineItemCustomTypeobject6 fields
setStoreobject1 fields
setTextLineItemCustomFieldobject4 fields
setTextLineItemCustomTypeobject6 fields
setTextLineItemDescriptionobject3 fields
storeKeystring

The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions.

idstring

Queries with specified ID

keystring

Queries with specified key

json
{
  "version": "string",
  "actions": [
    {
      "addLineItem": {
        "addedAt": "string",
        "custom": "string",
        "quantity": "string",
        "variantId": "string",
        "sku": "string",
        "key": "string",
        "productId": "string"
      },
      "addTextLineItem": {
        "name": "string",
        "addedAt": "string",
        "custom": "string",
        "quantity": "string",
        "description": "string",
        "key": "string"
      },
      "changeLineItemQuantity": {
        "quantity": "string",
        "lineItemId": "string",
        "lineItemKey": "string"
      },
      "changeLineItemsOrder": {
        "lineItemOrder": "string"
      },
      "changeName": {
        "name": "string"
      },
      "changeTextLineItemName": {
        "name": "string",
        "textLineItemId": "string",
        "textLineItemKey": "string"
      },
      "changeTextLineItemQuantity": {
        "quantity": "string",
        "textLineItemId": "string",
        "textLineItemKey": "string"
      },
      "changeTextLineItemsOrder": {
        "textLineItemOrder": "string"
      },
      "removeLineItem": {
        "lineItemId": "string",
        "lineItemKey": "string",
        "quantity": "string"
      },
      "removeTextLineItem": {
        "textLineItemId": "string",
        "textLineItemKey": "string",
        "quantity": "string"
      },
      "setCustomField": {
        "name": "string",
        "value": "string"
      },
      "setCustomType": {
        "fields": "string",
        "type": "string",
        "typeKey": "string",
        "typeId": "string"
      }
    }
  ],
  "storeKey": "string",
  "id": "string",
  "key": "string"
}

Response

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

keystring
nameAllLocalesarray<object>
localeobject
valueobject
descriptionAllLocalesarray<object>
localeobject
valueobject
slugAllLocalesarray<object>
localeobject
valueobject
customerRefobject
typeIdstring
idstring
customerobject
idstring
customerNumberstring
emailstring
addressesarray<object>
defaultShippingAddressIdstring
defaultBillingAddressIdstring
shippingAddressIdsarray<object>
billingAddressIdsarray<object>
isEmailVerifiedboolean
customerGroupRefobject2 fields
externalIdstring
keystring
authenticationModestring

One ofExternalAuthPassword

firstNamestring
lastNamestring
middleNamestring
titlestring
localestring
salutationstring
dateOfBirthstring
companyNamestring
vatIdstring
passwordstring
customerGroupobject9 fields
defaultShippingAddressobject26 fields
defaultBillingAddressobject26 fields
shippingAddressesarray<object>
billingAddressesarray<object>
storesRefarray<object>
storesarray<object>
customerGroupAssignmentsarray<object>
customobject2 fields
versionstring
createdAtstring
lastModifiedAtstring
createdByobject8 fields
lastModifiedByobject8 fields
businessUnitobject
idstring
keystring
namestring
contactEmailstring
addressesarray<object>
defaultShippingAddressobject26 fields
defaultBillingAddressobject26 fields
defaultShippingAddressIdstring
defaultBillingAddressIdstring
shippingAddressesarray<object>
billingAddressesarray<object>
shippingAddressIdsarray<object>
billingAddressIdsarray<object>
statusstring

One ofActiveInactive

storesRefarray<object>
storesarray<object>
storeModestring
unitTypestring

One ofCompanyDivision

associatesarray<object>
associateModestring

One ofExplicitExplicitAndFromParent

inheritedAssociatesarray<object>
customobject2 fields
parentUnitRefobject2 fields
parentUnitobject

Recursive reference to BusinessUnit, not further expanded.

ancestorsarray<object>
inheritedStoresarray<object>
topLevelUnitRefobject2 fields
topLevelUnitobject

Recursive reference to BusinessUnit, not further expanded.

approvalRuleModestring

One ofExplicitExplicitAndFromParent

customerGroupAssignmentsarray<object>
versionstring
createdAtstring
lastModifiedAtstring
createdByobject8 fields
lastModifiedByobject8 fields
businessUnitRefobject
typeIdstring
keystring
storeRefobject
typeIdstring
keystring
storeobject
idstring
versionstring
keystring
nameAllLocalesarray<object>
languagesarray<object>
countriesarray<object>
productSelectionsarray<object>
distributionChannelsRefarray<object>
distributionChannelsarray<object>
supplyChannelsRefarray<object>
supplyChannelsarray<object>
storefrontobject10 fields
createdAtstring
lastModifiedAtstring
customobject2 fields
createdByobject8 fields
lastModifiedByobject8 fields
anonymousIdstring
lineItemsarray<object>
idobject
keyobject
productIdobject
publishedobject
variantIdobject
productTypeRefobject
productTypeobject
quantityobject
addedAtobject
nameAllLocalesobject
deactivatedAtobject
customobject
productSlugAllLocalesobject
variantobject
textLineItemsarray<object>
idobject
keyobject
nameAllLocalesobject
descriptionAllLocalesobject
quantityobject
customobject
addedAtobject
customobject
typeRefobject2 fields
typeobject10 fields
deleteDaysAfterLastModificationnumber
idstring
versionstring
createdAtstring
lastModifiedAtstring
createdByobject
isPlatformClientboolean
clientIdstring
externalUserIdstring
anonymousIdstring
customerRefobject2 fields
userRefobject2 fields
associateRefobject2 fields
attributedToobject3 fields
lastModifiedByobject
isPlatformClientboolean
clientIdstring
externalUserIdstring
anonymousIdstring
customerRefobject2 fields
userRefobject2 fields
associateRefobject2 fields
attributedToobject3 fields

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