Market Data Requirements
Market data is for cases where product prices and availability differ by region, by city or by individual store — a chain with branches in several cities, for example. You set your own values for each market: they don't replace the main product catalog, they complement it with local prices, availability and other parameters.
For products that come from an XML feed, market data is passed through a market CSV feed or the Product API; for products added through the API, through the Product API only. If the catalog has no data for a product in a given market, the product is considered unavailable to contacts with that marketId and is not shown in product recommendations.
What a Market Is
A market is a region you define yourself: a country, a city, a specific store, or any other area. Each market has a unique identifier, marketId. You give the same identifier in the market data of a product, in orders, and in web tracking events. In recommendations the contact then sees the products and prices of their own market.
A contact belongs to a market when the Market ID field in their profile is filled. It is filled automatically when marketId is passed in an order or in the purchasedItems web tracking event; otherwise the value is written to the profile like any other contact field. While the field is empty, the market data restrictions don't apply to the contact.
Markets in Campaigns With RecommendationsIn campaigns with recommendations,
marketIdis passed automatically when the organization has a market feed configured and the contact profile includesmarketId. Contacts withoutmarketIdreceive recommendations without market-based filtering. This works for broadcast, single, and test sends.
Market CSV Feed Columns
Required columns:
id— must match the product identifier in the catalog;marketID— market identifier; must matchmarketIdin the contact card;availability— product availability in this market:1— in stock,0— out of stock;salePrice— current product price in this market.
Optional columns:
price— old price (before the discount);currency— currency code;new— new item indicator.
CSV file example:
id,marketID,availability,price,salePrice,currency,new
TV_123456,Kyiv_1,1,3000.00,2980.00,UAH,1
TV_123456,Kyiv_2,1,2990.00,2960.00,UAH,0
Laptop_1234590,Dnipro,1,12900.00,12800.00,UAH,1
Laptop_1234590,Odessa,0,13100.00,13000.00,UAH,0In this example, the product TV_123456 is available in two markets (Kyiv_1 and Kyiv_2) at different prices: salePrice is the current price and price is the old one. The product Laptop_1234590 is unavailable in the Odessa market (availability is 0).
Passing Through the API
Through the API the same data is passed in productId, marketId, isInStock, price, oldPrice, and currency. How to pass market data is described in Market Data, and the mapping of feed columns to API fields is in If You Are Switching from a Market Feed.
Updated 19 minutes ago
