Skip to content

    Pre-launch API. The concepts described here are settled, but the API shape is not: request and response fields, parameters and defaults can still change. Build against it, and talk to your Luigi's Box contact before you put an integration into production.

    Resolving conflicts

    View source

    Several rules can target the same product, from the same campaign or from different ones. One of them wins. Knowing which is what lets you write a broad policy and a narrow exception without them fighting.

    The winner is decided per product, in this order:

    1. Specificity. A rule matching by identity beats one matching by criteria, which beats one matching everything. A hand-picked exception always survives a broad rule. A pin on a list of several IDs counts as criteria here; only a pin on one product is identity.
    2. Effect type, at equal specificity. A ban beats a pin on the same product: an identity-level ban removes a product an identity-level pin wanted at position 1. A bury beats a boost on the same product. Hard and soft mode play no part: a soft bury beats a hard boost. A pin never conflicts with a boost or bury; it is placed after them and overrides whatever they did to the same product.
    3. Campaign age. The rule from the more recently created campaign wins — measured to the second, so two campaigns created within the same second tie here and fall to an internal identifier nobody chooses. Inside one campaign, two rules that tie on specificity and type have no defined order either. Both cases resolve the same way on every request, but neither is something you can author, so do not write two rules that compete for the same product or position and expect to know which wins.

    Each step only runs when the one above it ties.

    Resolution does not decide “rule A beats rule B” — it decides, for each product, which rule applies to that product.

    A boost covering two products, one of which a ban also covers, loses that one product and keeps the other. The boost is not discarded; it has one fewer product.

    Two boosts, or two buries, on one product do not add up. One wins by the same chain and the other is discarded; the stronger one does not win by being stronger.

    Two pins conflict when they claim the same position, or the same product at two positions. The chain picks one and drops the other for that position and product only, so a campaign with several pins can have one lose and the rest place normally.

    A broad rule plus a narrow exception works. Bury a whole brand, then pin one of its products by ID. The pin wins on specificity, and every other product in the brand stays buried. When a policy has exceptions, write the policy broadly and the exceptions specifically, rather than writing the policy as a list that excludes them.

    A ban is the strongest thing you can write. Only a more specific rule beats it. A criteria-level ban and an identity-level pin is a coherent pair — the pinned product survives, everything else the ban matches disappears. A ban and a pin at the same specificity is not: the ban wins, and the pin does nothing.

    A surviving pin, or an identity-level boost or bury, protects the products it names from a broader ban. Without that, a criteria ban would remove a pinned product before the pin could place it, and the pin’s win on specificity would be theoretical.

    The exception is not only ranked higher; it is kept in the results so the exception can apply.

    The exception has to be a pin on a single product. A pin selecting by criteria, or by a list of IDs, picks its product after ranking — the highest-ranked match no other pin has claimed — and is never protected from a criteria ban: the ban removes the product first, and the pin takes the next match.

    Sponsored placements enter the same chain as an additional source of decisions, resolved by the same rules with one addition: at full parity, the external decision wins.

    Full parity is narrow. Specificity and effect type are resolved first, so your identity-level ban still removes a product a sponsored placement pinned, and your bury still beats a sponsored boost at equal specificity. Your rules remain the outer boundary; sponsored content fills the space you leave for it.