younifyd
Menu

updateProject

Update the current project's settings using an array of update actions.

Use it in a workflow

  1. Add a step and choose the Commercetools connector.
  2. Pick the updateProject action (under Update).
  3. Fill in the fields below, then reference the result from later steps as {{updateproject.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 UpdateProject($version: Long!, $actions: [ProjectSettingsUpdateAction!]!) {
  updateProject(version: $version, actions: $actions) {
    key
    name
    languages
    trialUntil
    carts {
      deleteDaysAfterLastModification
      allowAddingUnpublishedProducts
      countryTaxRateFallbackEnabled
      totalPriceDiscountDoesNotReduceExternalTax
      taxRoundingMode
      priceRoundingMode
    }
    shoppingLists {
      deleteDaysAfterLastModification
    }
    version
    externalOAuth {
      url
      authorizationHeader
    }
    searchIndexing {
      products {
        status
        lastModifiedBy
        lastModifiedAt
      }
      orders {
        status
        lastModifiedBy
        lastModifiedAt
      }
      customers {
        status
        lastModifiedBy
        lastModifiedAt
      }
      businessUnits {
        status
        lastModifiedBy
        lastModifiedAt
      }
    }
    messages {
      enabled
      deleteDaysAfterCreation
    }
    countries
    currencies
    shippingRateInputType {
      type
    }
    createdAt
    discounts {
      productVsCartDiscountCombination
      discountCombinationMode
    }
    inventory {
      reservationExpirationInMinutes
      releaseExpiredReservations
    }
    productCatalogModel
  }
}

Variables

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

versionstringrequired
actionsarray<object>required
changeBusinessUnitSearchStatusobject1 fields
changeCartsConfigurationobject1 fields
changeCountriesobject1 fields
changeCountryTaxRateFallbackEnabledobject1 fields
changeCurrenciesobject1 fields
changeCustomerSearchStatusobject1 fields
changeLanguagesobject1 fields
changeMessagesConfigurationobject1 fields
changeMessagesEnabledobject1 fields
changeMyBusinessUnitStatusOnCreationobject1 fields
changeNameobject1 fields
changeOrderSearchStatusobject1 fields
changePriceRoundingModeobject1 fields
changeShoppingListsConfigurationobject1 fields
changeTaxRoundingModeobject1 fields
changeTotalPriceDiscountDoesNotReduceExternalTaxobject1 fields
setDiscountsConfigurationobject1 fields
setExternalOAuthobject1 fields
setShippingRateInputTypeobject1 fields
setMyBusinessUnitAssociateRoleOnCreationobject1 fields
changeCartDiscountVisualizationSearchStatusobject1 fields
changeProductSearchIndexingEnabledobject1 fields
setProductVsCartDiscountCombinationobject1 fields
setReservationExpirationInMinutesobject1 fields
setReleaseExpiredReservationsobject1 fields
setProductCatalogModelobject1 fields
json
{
  "version": "string",
  "actions": [
    {
      "changeBusinessUnitSearchStatus": {
        "status": "string"
      },
      "changeCartsConfiguration": {
        "cartsConfiguration": "string"
      },
      "changeCountries": {
        "countries": "string"
      },
      "changeCountryTaxRateFallbackEnabled": {
        "countryTaxRateFallbackEnabled": "string"
      },
      "changeCurrencies": {
        "currencies": "string"
      },
      "changeCustomerSearchStatus": {
        "status": "string"
      },
      "changeLanguages": {
        "languages": "string"
      },
      "changeMessagesConfiguration": {
        "messagesConfiguration": "string"
      },
      "changeMessagesEnabled": {
        "messagesEnabled": "string"
      },
      "changeMyBusinessUnitStatusOnCreation": {
        "status": "string"
      },
      "changeName": {
        "name": "string"
      },
      "changeOrderSearchStatus": {
        "status": "string"
      }
    }
  ]
}

Response

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

keystring
namestring
languagesarray<string>
trialUntilstring
cartsobject
deleteDaysAfterLastModificationnumber
allowAddingUnpublishedProductsboolean
countryTaxRateFallbackEnabledboolean
totalPriceDiscountDoesNotReduceExternalTaxboolean
taxRoundingModestring

One ofHalfDownHalfEvenHalfUp

priceRoundingModestring

One ofHalfDownHalfEvenHalfUp

shoppingListsobject
deleteDaysAfterLastModificationnumber
versionstring
externalOAuthobject
urlstring
authorizationHeaderstring
searchIndexingobject
productsobject3 fields
ordersobject3 fields
customersobject3 fields
businessUnitsobject3 fields
messagesobject
enabledboolean
deleteDaysAfterCreationnumber
countriesarray<string>
currenciesarray<string>
shippingRateInputTypeobject
typestring
createdAtstring
discountsobject
productVsCartDiscountCombinationstring

One ofStackingBestDeal

discountCombinationModestring

One ofStackingBestDeal

inventoryobject
reservationExpirationInMinutesnumber
releaseExpiredReservationsboolean
productCatalogModelstring

One ofClassicModular

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

Was this page helpful?
updateProject — Commercetools — Documentation