younifyd
Menu

deleteMyCustomer

Delete a customer for the signed-in customer (requires its current version).

Use it in a workflow

  1. Add a step and choose the Commercetools connector.
  2. Pick the deleteMyCustomer action (under Delete).
  3. Fill in the fields below, then reference the result from later steps as {{deletemycustomer.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 DeleteMyCustomer($version: Long!, $personalDataErasure: Boolean, $storeKey: KeyReferenceInput) {
  deleteMyCustomer(
    version: $version
    personalDataErasure: $personalDataErasure
    storeKey: $storeKey
  ) {
    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 {
        typeRef
        type
      }
    }
    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 {
        typeRef
        type
      }
      createdBy {
        isPlatformClient
        clientId
        externalUserId
        anonymousId
        customerRef
        userRef
        associateRef
        attributedTo
      }
      lastModifiedBy {
        isPlatformClient
        clientId
        externalUserId
        anonymousId
        customerRef
        userRef
        associateRef
        attributedTo
      }
    }
    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 {
        typeRef
        type
      }
    }
    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 {
        typeRef
        type
      }
    }
    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 {
        typeRef
        type
      }
    }
    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 {
        typeRef
        type
      }
    }
    storesRef {
      typeId
      key
    }
    stores {
      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
      }
    }
    customerGroupAssignments {
      customerGroupRef {
        typeId
        id
      }
      customerGroup {
        id
        version
        name
        key
        createdAt
        lastModifiedAt
        custom
        createdBy
        lastModifiedBy
      }
    }
    custom {
      typeRef {
        typeId
        id
      }
      type {
        key
        nameAllLocales
        descriptionAllLocales
        resourceTypeIds
        id
        version
        createdAt
        lastModifiedAt
        createdBy
        lastModifiedBy
      }
    }
    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
personalDataErasureboolean
storeKeystring

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

json
{
  "version": "string",
  "personalDataErasure": false,
  "storeKey": "string"
}

Response

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

idstring
customerNumberstring
emailstring
addressesarray<object>
idobject
streetNameobject
streetNumberobject
additionalStreetInfoobject
postalCodeobject
cityobject
regionobject
stateobject
countryobject
companyobject
departmentobject
buildingobject
apartmentobject
pOBoxobject
additionalAddressInfoobject
externalIdobject
keyobject
phoneobject
mobileobject
emailobject
faxobject
titleobject
salutationobject
firstNameobject
lastNameobject
customobject
defaultShippingAddressIdstring
defaultBillingAddressIdstring
shippingAddressIdsarray<string>
billingAddressIdsarray<string>
isEmailVerifiedboolean
customerGroupRefobject
typeIdstring
idstring
externalIdstring
keystring
authenticationModestring

One ofExternalAuthPassword

firstNamestring
lastNamestring
middleNamestring
titlestring
localestring
salutationstring
dateOfBirthstring
companyNamestring
vatIdstring
passwordstring
customerGroupobject
idstring
versionstring
namestring
keystring
createdAtstring
lastModifiedAtstring
customobject2 fields
createdByobject8 fields
lastModifiedByobject8 fields
defaultShippingAddressobject
idstring
streetNamestring
streetNumberstring
additionalStreetInfostring
postalCodestring
citystring
regionstring
statestring
countrystring
companystring
departmentstring
buildingstring
apartmentstring
pOBoxstring
additionalAddressInfostring
externalIdstring
keystring
phonestring
mobilestring
emailstring
faxstring
titlestring
salutationstring
firstNamestring
lastNamestring
customobject2 fields
defaultBillingAddressobject
idstring
streetNamestring
streetNumberstring
additionalStreetInfostring
postalCodestring
citystring
regionstring
statestring
countrystring
companystring
departmentstring
buildingstring
apartmentstring
pOBoxstring
additionalAddressInfostring
externalIdstring
keystring
phonestring
mobilestring
emailstring
faxstring
titlestring
salutationstring
firstNamestring
lastNamestring
customobject2 fields
shippingAddressesarray<object>
idobject
streetNameobject
streetNumberobject
additionalStreetInfoobject
postalCodeobject
cityobject
regionobject
stateobject
countryobject
companyobject
departmentobject
buildingobject
apartmentobject
pOBoxobject
additionalAddressInfoobject
externalIdobject
keyobject
phoneobject
mobileobject
emailobject
faxobject
titleobject
salutationobject
firstNameobject
lastNameobject
customobject
billingAddressesarray<object>
idobject
streetNameobject
streetNumberobject
additionalStreetInfoobject
postalCodeobject
cityobject
regionobject
stateobject
countryobject
companyobject
departmentobject
buildingobject
apartmentobject
pOBoxobject
additionalAddressInfoobject
externalIdobject
keyobject
phoneobject
mobileobject
emailobject
faxobject
titleobject
salutationobject
firstNameobject
lastNameobject
customobject
storesRefarray<object>
typeIdobject
keyobject
storesarray<object>
idobject
versionobject
keyobject
nameAllLocalesobject
languagesobject
countriesobject
productSelectionsobject
distributionChannelsRefobject
distributionChannelsobject
supplyChannelsRefobject
supplyChannelsobject
storefrontobject
createdAtobject
lastModifiedAtobject
customobject
createdByobject
lastModifiedByobject
customerGroupAssignmentsarray<object>
customerGroupRefobject
customerGroupobject
customobject
typeRefobject2 fields
typeobject10 fields
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.

Was this page helpful?
deleteMyCustomer — Commercetools — Documentation