younifyd
Menu

marketUpdate

Updates the properties of a market.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the marketUpdate action (under Market).
  3. Fill in the fields below, then reference the result from later steps as {{marketupdate.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 MarketUpdate($id: ID!, $input: MarketUpdateInput!) {
  marketUpdate(id: $id, input: $input) {
    market {
      catalogsCount {
        count
        precision
      }
      conditions {
        channelsCondition
        companyLocationsCondition
        conditionTypes
        locationsCondition
        regionsCondition
      }
      currencySettings {
        baseCurrency
        localCurrencies
        roundingEnabled
      }
      delivery {
        shipping
      }
      discountsCount {
        count
        precision
      }
      enabled
      handle
      id
      name
      priceInclusions {
        adaptivePricingEnabled
        inclusiveDutiesPricingStrategy
        inclusiveTaxPricingStrategy
      }
      priceList {
        catalog
        currency
        fixedPricesCount
        id
        name
        parent
      }
      primary
      status
      type
      webPresence {
        alternateLocales
        defaultLocale
        domain
        id
        market
        rootUrls
        subfolderSuffix
      }
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

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

idstringrequired

The ID of the market to update.

inputobjectrequired

The properties to update.

namestring
handlestring
enabledboolean
conditionsobject2 fields
catalogsToAddarray<string>
catalogsToDeletearray<string>
webPresencesToAddarray<string>
webPresencesToDeletearray<string>
discountsToAddarray<string>
discountsToDeletearray<string>
makeDuplicateRegionMarketsDraftboolean
makeDuplicateUniqueMarketsDraftboolean
statusstring

One ofACTIVEDRAFT

currencySettingsobject4 fields
removeCurrencySettingsboolean
removePriceInclusionsboolean
priceInclusionsobject3 fields
deliveryobject2 fields
json
{
  "id": "string",
  "input": {
    "name": "string",
    "handle": "string",
    "enabled": false,
    "conditions": {
      "conditionsToAdd": {
        "companyLocationsCondition": "string",
        "locationsCondition": "string",
        "regionsCondition": "string",
        "channelsCondition": "string"
      },
      "conditionsToDelete": {
        "companyLocationsCondition": "string",
        "locationsCondition": "string",
        "regionsCondition": "string",
        "channelsCondition": "string"
      }
    },
    "catalogsToAdd": [
      "string"
    ],
    "catalogsToDelete": [
      "string"
    ],
    "webPresencesToAdd": [
      "string"
    ],
    "webPresencesToDelete": [
      "string"
    ],
    "discountsToAdd": [
      "string"
    ],
    "discountsToDelete": [
      "string"
    ],
    "makeDuplicateRegionMarketsDraft": false,
    "makeDuplicateUniqueMarketsDraft": false
  }
}

Response

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

marketobject
catalogsCountobject2 fields
conditionsobject5 fields
currencySettingsobject3 fields
deliveryobject1 fields
discountsCountobject2 fields
enabledboolean
handlestring
idstring
namestring
priceInclusionsobject3 fields
priceListobject6 fields
primaryboolean
statusstring

One ofACTIVEDRAFT

typestring

One ofNONEREGIONLOCATIONCOMPANY_LOCATIONCHANNEL

webPresenceobject7 fields
userErrorsarray<object>
codeobject
fieldobject
messageobject

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