HOW-TO: Set product pricing in Catalog
What’s on this page?
- Pricing logic
- Using Tulip APIs to set up prices
- Set zone level pricing (state, provincial, or regional level)
Pricing logic
Tulip enables you to define prices per variant and currency on four levels:
- Store level
- Zone level (depending on the country, this could be region, state, province, etc.)
- Country level
- 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 ID | Product ID | Variant ID | Currency ID | Country ID | Store ID | Zone ID | Price Value 1 Type ID | Price Value 1 | Price Value 2 Type ID | Price Value 2 |
myPrice | myProduct | myVariant | USD | myStore | regular | 500 | sale | 450 | ||
myPrice2 | myProduct | myVariant | USD | myStore2 | regular | 510 |
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 ID | Product ID | Variant ID | Currency ID | Country ID | Store ID | Zone ID | Price Value 1 Type ID | Price Value 1 | Price Value 2 Type ID | Price Value 2 |
myPrice3 | myProduct | myVariant | USD | US-CA | regular | 500 | sale | 450 | ||
myPrice4 | myProduct | myVariant | USD | US-NY | regular | 510 |
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 ID | Product ID | Variant ID | Currency ID | Country ID | Store ID | Zone ID | Price Value 1 Type ID | Price Value 1 | Price Value 2 Type ID | Price Value 2 |
myPrice5 | myProduct | myVariant | USD | USA | regular | 500 | sale | 450 | ||
myPrice6 | myProduct | myVariant | CAD | CAN | regular | 510 |
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 ID | Product ID | Variant ID | Currency ID | Country ID | Store ID | Zone ID | Price Value 1 Type ID | Price Value 1 | Price Value 2 Type ID | Price Value 2 |
myPrice5 | myProduct | myVariant | USD | regular | 500 | sale | 450 | |||
myPrice6 | myProduct | myVariant | CAD | regular | 510 |