Product Search
API reference for creating and managing Product Search promotions in Omnium OMS.
Product Search API Reference
Table of Contents
Overview
Product Search promotions allow you to create dynamic discounts based on flexible product search criteria. Unlike Category/Brand promotions that use predefined categories and brands, Product Search promotions use Omnium's powerful product search engine to define which products qualify for the discount.
Key Features
- Dynamic product selection using advanced search criteria
- Support for price-based filtering (e.g., "10% off all products between $50-$100")
- Tag-based promotions (e.g., "20% off all products tagged 'Summer2025'")
- Inventory-based promotions (e.g., "Discount on in-stock items only")
- Date-based filtering (e.g., "Products published in the last 30 days")
- Supplier-based promotions (e.g., "15% off all Nike supplier products")
- Property-based filtering (e.g., "Discount on products with specific attributes")
Supported Discount Types
- Percentage-based discount (e.g., 20% off)
- Fixed amount discounts (e.g., $10 off)
- Multi-currency support
When to Use Product Search Promotions
Use Product Search Promotions when:
- You need dynamic product selection based on multiple criteria
- Products frequently change categories or attributes
- You want to target products by price range, tags, or properties
- You need promotions based on inventory status or publication dates
- You want to create promotions for specific suppliers or assortments
Use Category/Brand Promotions when:
- You have stable category structures
- You only need simple category or brand filtering
- Performance is critical (Category/Brand promotions are slightly faster)
API Endpoints
Base URL
Create Promotion
Request Body: OmniumPromotionRequest
Update Promotion (Patch)
Request Body: OmniumPromotionPatch
Get Promotions
Delete Promotion
Data Models
OmniumPromotionRequest
The main request model for creating a Product Search promotion.
OmniumPromotionTypeRequest
The promotion type configuration for Product Search promotions.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
promotionType | int | Yes | Must be 5 for Product Search promotions |
reward | OmniumPromotionReward | Yes | Discount configuration (percentage or fixed amount) |
productSearchRequest | OmniumProductSearchRequest | Yes | Product search criteria defining which products qualify |
OmniumPromotionReward
Defines the discount to be applied.
For percentage-based discounts:
For fixed amount discounts:
Properties
| Property | Type | Required | Description |
|---|---|---|---|
percentage | decimal | Conditional | Percentage discount (0-100). Required if usePercentage = true |
usePercentage | bool | Yes | true for percentage discount, false for fixed amount |
promotionAmounts | array | Conditional | Fixed amount discounts per currency/market. Required if usePercentage = false |
OmniumProductSearchRequest
Defines the search criteria for qualifying products. This is a comprehensive model with many filtering options.
Common Search Properties
| Property | Type | Description | Example |
|---|---|---|---|
marketId | string | Filter by market | "NOR" |
storeId | string | Filter by store | "store1" |
searchText | string | Full-text search | "summer dress" |
productIds | array | Specific product IDs | ["prod1", "prod2"] |
productCategoryIds | array | Category IDs | ["cat123"] |
tags | array | Product tags | ["Summer", "Sale"] |
excludedTags | array | Exclude products with these tags | ["Clearance"] |
productType | string | Product type filter | "Clothing" |
Price Filtering
| Property | Type | Description | Example |
|---|---|---|---|
priceFrom | decimal | Minimum price | 50.00 |
priceTo | decimal | Maximum price | 200.00 |
storeIdPriceFilter | string | Store for price filtering | "store1" |
customerGroups | array | Filter prices by customer group | ["VIP"] |
Stock and Status Filtering
| Property | Type | Description | Example |
|---|---|---|---|
isInStock | bool? | In stock filter | true |
inStockMarketIds | array | Markets for stock check | ["NOR"] |
inStockWarehouseIds | array | Warehouses for stock check | ["warehouse1"] |
isActive | bool | Active products only | true |
isInactive | bool | Inactive products only | false |
isOnSale | bool? | Products on sale | true |
isPublished | bool? | Published products | true |
Product Type Filtering
| Property | Type | Description | Example |
|---|---|---|---|
isSku | bool? | SKU products (no variants) | true |
isBundle | bool? | Bundle products | true |
isPackage | bool? | Package products | true |
isMainProductVariant | bool? | Main variants only | true |
Date-Based Filtering
| Property | Type | Description | Example |
|---|---|---|---|
modifiedFrom | DateTime? | Products modified after date | "2024-01-01T00:00:00Z" |
modifiedTo | DateTime? | Products modified before date | "2024-12-31T23:59:59Z" |
daysSincePublished | int? | Days since publication | 30 |
startPublishFrom | DateTime? | Publish start date from | "2024-01-01T00:00:00Z" |
startPublishTo | DateTime? | Publish start date to | "2024-12-31T23:59:59Z" |
Supplier and Assortment
| Property | Type | Description | Example |
|---|---|---|---|
supplierIds | array | Filter by supplier IDs | ["supplier1"] |
supplierSkuIds | array | Filter by supplier SKUs | ["sku123"] |
assortmentCodeIds | array | Filter by assortment codes | ["assort1"] |
isAssortmentCodesRequired | bool? | Require assortment codes | true |
Property-Based Filtering
| Property | Type | Description | Example |
|---|---|---|---|
property | OmniumPropertyItem | Filter by property key/value | See below |
propertyListId | string | Predefined property list | "list1" |
Property Filtering Example:
Advanced Options
| Property | Type | Description | Example |
|---|---|---|---|
gtins | array | Filter by GTIN/EAN | ["1234567890"] |
externalIds | array | Filter by external IDs | ["ext123"] |
promotionIds | array | Products with specific promotions | ["promo1"] |
componentIds | array | Products containing components | ["comp1"] |
productParentIds | array | Filter by parent product IDs | ["parent1"] |
excludedProductIds | array | Exclude specific products | ["prod1"] |
For complete details on all available search options, see the Product Search API documentation.
Creating Promotions
Basic Product Search Promotion (Tag-Based)
Scenario: "20% off all products tagged 'Summer2025'"
Price Range Promotion
Scenario: "10% off all products priced between $50 and $150"
In-Stock Promotion
Scenario: "15% off all in-stock products from warehouse 'MAIN'"
Fixed Amount Discount
Scenario: "50 NOK off products with tags 'NewArrival'"
Examples
Example 1: Recently Published Products
Scenario: "25% off products published in the last 30 days"
Example 2: Supplier-Specific Promotion
Scenario: "10% off all products from supplier 'Nike'"
Example 3: Property-Based Promotion
Scenario: "20% off all products with property 'Color' = 'Red'"
Example 4: Multi-Criteria Promotion
Scenario: "15% off in-stock products tagged 'Winter' priced between 100-500 NOK"
Example 5: Category-Based with Exclusions
Scenario: "30% off category 'Shoes' except products tagged 'Premium'"
Example 6: Coupon Code Required
Scenario: "Use code SEARCH20 for 20% off tagged products"
Example 7: Multi-Currency Fixed Amount
Scenario: "$10 off in US, £8 off in UK for tagged products"
Advanced Features
1. Complex Search Criteria Combinations
Product Search promotions support combining multiple search criteria for precise targeting:
This example targets products that:
- Have at least one of "Summer" OR "Outdoor" tags
- Are priced between 50-300
- Are in stock in Norway or Sweden
- Are from a specific supplier
- Are active
- Were published in the last 90 days
2. Dynamic Product Selection
Unlike static Category/Brand promotions, Product Search promotions dynamically evaluate products at the time of cart calculation. This means:
- Products added to categories after promotion creation automatically qualify
- Products that no longer meet criteria are automatically excluded
- Tag-based promotions automatically include/exclude products as tags change
- Inventory-based promotions respect real-time stock levels
3. Performance Considerations
Product Search promotions execute a search query for each cart evaluation. For optimal performance:
- Be as specific as possible with search criteria
- Use indexed fields (productIds, categoryIds, tags) when possible
- Avoid overly broad searches (e.g., no criteria at all)
- Consider using Category/Brand promotions for simple scenarios
- Test promotion performance in your test environment
4. Combining with Other Promotion Features
Product Search promotions support all standard promotion features:
Customer Group Restrictions:
Store Restrictions:
Order Type Restrictions:
5. Promotion Combination Rules
Control stacking with other promotions:
| Property | Description |
|---|---|
canBeCombinedWithOtherPromotions | Allow combination with other combinable promotions |
alwaysApply | Apply even if other promotions have canBeCombinedWithOtherPromotions = false |
6. Priority System
Promotions with lower priority numbers are evaluated first (0 = highest priority).
7. Translations
Provide localized titles and descriptions:
Best Practices
1. Be Specific with Search Criteria
Always include meaningful search criteria to avoid performance issues:
Bad - Too broad:
Good - Specific:
2. Use Appropriate Filters
Choose the right filter type for your use case:
- Tags: Best for flexible, changing product sets
- Categories: Use when products naturally group by category
- Price Range: Ideal for tiered pricing strategies
- Supplier: Perfect for vendor-specific promotions
- Properties: Use for attribute-based targeting
- Date-based: Great for featuring new or seasonal products
3. Test Search Criteria First
Before creating a promotion, test your search criteria using the Product Search API:
This helps you verify:
- Number of products that will qualify
- Performance of the search query
- Correct interpretation of combined filters
4. Set Realistic Date Ranges
- Always set
activeTodates to avoid promotions running indefinitely - For time-sensitive promotions (e.g., flash sales), set precise times
- Use
daysSincePublishedfor rolling "new product" promotions
5. Consider Performance
- Use indexed fields (tags, categoryIds, productIds) for better performance
- Avoid complex property queries on high-traffic promotions
- Monitor promotion evaluation time in your logs
- Consider caching strategies for frequently evaluated promotions
6. Use Descriptive Names
Internal names should clearly indicate the promotion mechanics:
- Good: "Search - Summer2025 - 20 percent - price range 50-200"
- Bad: "Promo456"
7. Document Complex Criteria
For promotions with multiple search criteria, document the logic:
8. Monitor and Optimize
- Track promotion performance using analytics
- Monitor cart evaluation times
- Review products qualifying over time
- Adjust search criteria based on business results
9. Use Tags for Organization
Tag promotions for easier filtering and reporting:
10. Testing Checklist
Before activating Product Search promotions:
- Test product search criteria returns expected products
- Verify discount calculations are correct
- Test with various cart configurations
- Validate multi-currency scenarios (if applicable)
- Confirm performance is acceptable
- Test combination rules with other promotions
- Verify customer group restrictions (if used)
- Test coupon code functionality (if used)
Common Scenarios & Solutions
Scenario 1: "Discount New Products Only"
Create a rolling promotion for products published recently:
Scenario 2: "Clear Out Old Stock"
Target products that haven't been modified in 180 days:
Scenario 3: "Premium Products Only"
Combine price and tag filters:
Scenario 4: "Specific Market Stock"
Discount only products in stock in a specific market:
Scenario 5: "Exclude Sale Items"
Target regular-priced items only:
Troubleshooting
Promotion Not Applying
Check:
- Is the promotion within its
activeFromandactiveTodates? - Do products in the cart match the
productSearchRequestcriteria? - Does the cart's market/store match the promotion's
markets/stores? - If using a coupon code, has it been applied to the cart?
- Are search criteria too restrictive?
- For customer group restrictions, does the customer belong to the required group?
No Products Qualifying
Check:
- Test the search criteria using the Product Search API
- Verify products exist that match ALL criteria
- Check if
excludedTagsor other exclusions are too broad - Verify
isActive,isInStockfilters aren't excluding all products - Confirm market/store filters align with available products
Discount Amount Incorrect
Check:
- For fixed amount discounts, verify
promotionAmountsincludes the correct currency - For percentage discounts, verify
usePercentage = trueandpercentageis set correctly - Check if other promotions are being combined
Performance Issues
Check:
- Search criteria specificity - avoid overly broad searches
- Use indexed fields (tags, categoryIds) instead of complex property queries
- Consider splitting into multiple targeted promotions
- Review promotion evaluation logs for slow queries
API Response Models
Success Response (Create)
Error Response
Additional Resources
- Product Search API: Complete documentation
- Promotion Types Overview: See
PromotionTypeenum (0=Shipping, 1=CategoryOrBrand, 2=MultiBuy, 3=OrderAmount, 4=Kit, 5=ProductSearch, 6=PriceList) - Model Validation: All
MaxLengthattributes indicate array size limits - Date Formats: Use ISO 8601 format (e.g.,
2025-01-01T00:00:00Z)
Support
For questions or issues:
- Check this documentation
- Review the troubleshooting section
- Test search criteria using the Product Search API
- Examine API error messages for validation details
- Contact your Omnium support team
Document Version: 1.0 Last Updated: 2025 API Version: Compatible with Omnium OMS .NET 9.0+
