HOW-TO: Set product pricing in Catalog

What’s on this page?

Pricing logic

Tulip enables you to define prices per variant and currency on four levels:

  1. Store level
  2. Zone level (depending on the country, this could be region, state, province, etc.)
  3. Country level
  4. Global

The price used for your variant and currency will be the first available price from the above list. For example, if you have a store-level price for a variant and a zone-level price, the store-level price wins.

Note: You must have a currency ID set for each price. That is, you cannot omit the currency from your price to define a global price for all currencies.

Using Tulip APIs to set up prices

In the code examples below, we use the same payload to demonstrate how to use DAL API and File Importer to define a price object for each level (store, country, zone, global).

File Importer uses the CSV file format. You need a file with the prices that has a filename with the prefix TPR. For example, TPRsomeRandomText.csv. Upload the file to the appropriate SFTP directory prices and wait for it to be processed. Check the upload status in Admin Console.

Set store-level pricing

Set the Store ID and Currency ID (one for each supported currency) in the price object and leave Zone ID and Country ID as NULL.

This price will supersede all zone level, country level, and global prices for the product’s variant for this currency.

Example using DAL API (/v2/catalog/prices)

For a given store with externalId “myStore”, currencyCode of “USD”, productId of “myProduct”, and variantId of “myVariant”

{
    "currencyId": "USD",
    "externalId": "myPrice",
    "priceValues": [
        {
            "priceTypeId": "regular",
            "value": 450
        },
        {
            "priceTypeId": "sale",
            "value": 280
        }
    ],
    "productId": "myProduct",
    "storeId": "myStore",
    "variantId": "myVariant"
}

Omitting countryId and zoneId from the JSON payload has the same effect as setting them to NULL.

Example using File Importer (FI)

Price IDProduct IDVariant IDCurrency IDCountry IDStore IDZone IDPrice Value 1 Type IDPrice Value 1Price Value 2 Type IDPrice Value 2
myPricemyProductmyVariantUSDmyStoreregular500sale450
myPrice2myProductmyVariantUSDmyStore2regular510

Set zone level pricing (state, provincial, or regional level)

Set the Zone ID and Currency ID (one for each supported currency) in the price object and leave Store ID and Country ID as NULL.

This price will supersede all country-level and global prices but will be superseded by any store-level prices for the product’s variant for this currency.

Example using DAL API (/v2/catalog/prices)

{

    "currencyId": “USD”,

    "externalId": "myPrice",

    "priceValues": [

        {

            "priceTypeId": “regular”,

            "value": 450

        },

        {

            "priceTypeId": “sale”,

            "value": 280

        }

    ],

    "productId": "myProduct",

    "zoneId": "US-CA",

    "variantId": "myVariant"

}

Example using File Importer

Price IDProduct IDVariant IDCurrency IDCountry IDStore IDZone IDPrice Value 1 Type IDPrice Value 1Price Value 2 Type IDPrice Value 2
myPrice3myProductmyVariantUSDUS-CAregular500sale450
myPrice4myProductmyVariantUSDUS-NYregular510

Set country-level pricing

Set the Country ID and Currency ID (one for each supported currency) and leave Store ID and Zone ID as NULL.

This price will supersede all global prices but will be superseded by any store level or zone level prices for the product’s variant for this currency.

Example using DAL API (/v2/catalog/prices)

{

    "currencyId": “USD”,

    "externalId": "myPrice",

    "priceValues": [

        {

            "priceTypeId": “regular”,

            "value": 450

        },

        {

            "priceTypeId": “sale”,

            "value": 280

        }

    ],

    "productId": "myProduct",

    "countryId": "USA",

    "variantId": "myVariant"

}

Example using File Importer

Price IDProduct IDVariant IDCurrency IDCountry IDStore IDZone IDPrice Value 1 Type IDPrice Value 1Price Value 2 Type IDPrice Value 2
myPrice5myProductmyVariantUSDUSAregular500sale450
myPrice6myProductmyVariantCADCANregular510

Set global prices

Set the Currency ID (one for each supported currency) and leave Store ID, Zone ID, and Country ID as NULL.

This price will be superseded by any store, zone, or country-level prices for the product’s variant for this currency.

Example using DAL API (/v2/catalog/prices)

{

    "currencyId": “USD”,

    "externalId": "myPrice",

    "priceValues": [

        {

            "priceTypeId": “regular”,

            "value": 450

        },

        {

            "priceTypeId": “sale”,

            "value": 280

        }

    ],

    "productId": "myProduct",

    "variantId": "myVariant"

}

Example using File Importer

Price IDProduct IDVariant IDCurrency IDCountry IDStore IDZone IDPrice Value 1 Type IDPrice Value 1Price Value 2 Type IDPrice Value 2
myPrice5myProductmyVariantUSDregular500sale450
myPrice6myProductmyVariantCADregular510