Offer Filtering
When a pricing rule matches, its offer filtering effects are applied to all offer-related APIs.
How Filtering Works
PricingAdjustment (from matched rule)
│
├─ disablePromotions=true → all promotions removed
├─ disableCoupons=true → all coupons removed
├─ disableBankOffers=false → bank offers NOT disabled
├─ allowedBankOfferIds=[visa-1, visa-2] → only these kept
│
└─ Applied in:
├─ OfferResolutionService.resolveBaseline() → pricing chain
├─ ContextualOfferService.getAvailableOffers() → home page
└─ ContextualOfferService.getListingOffers() → detail page
Whitelist vs Disable
- Disable (
disablePromotions: true) → removes ALL items of that type - Whitelist (
allowedBankOfferIds: [...]) → keeps only listed IDs, removes all others - Both can be combined: disable promotions + whitelist specific bank offers
Response Flag
The contextual offers API response includes:
{
"bankOffers": [...],
"promotions": [],
"contextApplied": true,
"sourceRuleId": 1
}
contextApplied: truetells the frontend this is a personalized responsesourceRuleIdidentifies which rule matched (for debugging)