younifyd
Menu

marketCreate

Creates a Market to deliver customized shopping experiences. Markets define various aspects of the buyer experience including pricing, product availability, custom content, inventory and fulfillment priorities, and…

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the marketCreate action (under Market).
  3. Fill in the fields below, then reference the result from later steps as {{marketcreate.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 MarketCreate($input: MarketCreateInput!) {
  marketCreate(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.

inputobjectrequired

The properties of the new market.

namestringrequired
handlestring
enabledboolean
regionsarray<object>1 fields
conditionsobject4 fields
catalogsarray<string>
makeDuplicateRegionMarketsDraftboolean
makeDuplicateUniqueMarketsDraftboolean
statusstring

One ofACTIVEDRAFT

webPresencesarray<string>
currencySettingsobject4 fields
priceInclusionsobject3 fields
discountsarray<string>
deliveryobject1 fields
json
{
  "input": {
    "name": "string",
    "handle": "string",
    "enabled": false,
    "regions": [
      {
        "countryCode": "string"
      }
    ],
    "conditions": {
      "companyLocationsCondition": {
        "companyLocationIds": "string",
        "applicationLevel": "string"
      },
      "locationsCondition": {
        "locationIds": "string",
        "applicationLevel": "string"
      },
      "regionsCondition": {
        "regionIds": "string",
        "regions": "string",
        "applicationLevel": "string"
      },
      "channelsCondition": {
        "channelIds": "string"
      }
    },
    "catalogs": [
      "string"
    ],
    "makeDuplicateRegionMarketsDraft": false,
    "makeDuplicateUniqueMarketsDraft": false,
    "status": "ACTIVE",
    "webPresences": [
      "string"
    ],
    "currencySettings": {
      "baseCurrency": "USD",
      "baseCurrencyManualRate": "string",
      "localCurrencies": false,
      "roundingEnabled": false
    },
    "priceInclusions": {
      "taxPricingStrategy": "ADD_TAXES_AT_CHECKOUT",
      "dutiesPricingStrategy": "ADD_DUTIES_AT_CHECKOUT",
      "adaptivePricingEnabled": false
    }
  }
}

Response

Read the result with {{marketcreate.response.data.data.marketCreate}}. If the API returns errors, the step fails and they are at {{marketcreate.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.

Was this page helpful?