Browse the help center

Attach matching rules to an entity

Attach the network's category and label rules to one advertiser, campaign, banner, site, zone or placement so the ad server pairs it automatically with the other side — what Include, Exclude, "all of" and the Or divider really do, where a rule reads categories from, and why a rule that matches nothing is usually a switched-off card or a missing category.

How-to network manager Account → Advertisers → advertiser / campaign / banner → Matching rules (and Account → Publishers → site / zone / placement → Matching rules)

Every saved advertiser, campaign, banner, site, zone and placement carries a Matching rules card. It attaches the network’s category/label rules — built by your network administrator in Admin → Ad serving → Rules — to this one entity, so the ad server can pair it automatically with entities on the opposite side that carry the right categories and labels. Matching rules are a linking tool, not a filter: for every ad request the ad server takes the union of the banners linked to the placement by hand and the banners the rules pair with it, and only then does targeting narrow that pool. A rule can bring demand in that nobody linked; it cannot take out demand that was linked by hand.

Example. Northwind Media has 12 sites in the inventory category News and 40 placements under them. Instead of linking the advertiser Lakeshore Finance to 40 placements by hand, the administrator builds one Inventory rule “category News”, and the network manager attaches it as one Include line on the Lakeshore advertiser. Every banner under Lakeshore now pairs with all 40 placements, and the 41st placement created next month pairs too, as long as its site carries News and its Matching rules switch is on.

Typical scenarios

You wantSetWhere
An advertiser’s campaigns on every News site, now and in futureInclude line with the Inventory rule News on the advertiserAdvertiser → Matching rules
A placement that takes any Finance or Insurance advertiserOne Include line, Campaign rules Finance + Insurance, Combine with: any ofPlacement → Matching rules
A placement for advertisers tagged both Premium and Direct-soldOne Include line with the two Campaign rules, Combine with: all ofPlacement → Matching rules
Everything on the other side except Gambling and AdultOne Exclude line with both rules, any of — never two Exclude lines (they cancel out)Site → Matching rules
Stop a named advertiser on a siteNot a rule — a name block; see Block demand and inventoryPlacement → Banners probability → ⊘

Which tool do you actually want?

Five features shape which demand meets which inventory and are routinely confused:

You want to…UseWhy not the neighbours
Serve only when the request looks a certain way — country, OS, browser, time of day, a custom parameterTargeting / Pre-targeting — see Add targetingMatching rules never see a request. They pair entities before any request exists.
Pair this entity automatically with everything on the other side carrying a category or labelMatching rules (this card)Targeting only filters a pool that already exists; it can never add a banner to a placement.
Refuse one named advertiser, campaign, banner, site or placementBlocking — see Block demand and inventoryAn exclude line only shrinks the rule-matched pool. It cannot remove a directly linked banner.
Have a rule attached automatically to every entity created from now onthe default for boxes in Admin → Ad serving → RulesThis card attaches to the one entity you have open, and only when you click Add.
Keep programmatic (DSP) creatives of an IAB category off your inventoryBlocked IAB categories on the OpenRTB card — see Keep unwanted ad categories off your inventoryMatching rules act inside Epom’s own pairing; they are never sent in a bid request.

Step by step

The rules must already exist — this card only selects from the admin catalogue — and the entity must be saved; the card is not offered on the create step.

  1. Open the entity’s edit page and scroll to Matching rules — or click it in the Features rail on the right, which mirrors the card and its switch.

  2. Turn the card’s switch on. The card expands, and the entity now takes part in rule matching. Turning it on also attaches any rules your network administrator marked default for this entity type.

  3. Build a line. The ⓘ beside the card title says in one sentence what the card does.

    • Effect — Include (pair with what matches) or Exclude (pair with everything except what matches). With Exclude chosen, a line under the row reminds you that it does not unlink anything linked by hand.
    • Rules — pick one or more rules from the searchable multi-select. Its placeholder names the side: Select Inventory Rules… on demand, Select Campaign Rules… on supply. Flip Show inactive to also list rules your network administrator has deactivated (they render greyed).
    • Combine with — appears only once you have picked two or more rules: all of (the entity must match every rule in the line) or any of (one is enough).

    Matching rules card on an advertiser with an add-line row and two saved lines separated by Or

    Matching rules add-line row with Effect set to Exclude and the note that it does not unlink anything linked by hand

  4. Click Add. The line is written immediately — there is no separate Save — and appears below as a saved line: an Include / Exclude badge, the all of: / any of: prefix when it holds two or more rules, and the rule names. With nothing selected, Add raises the error toast At least one rule should be selected!.

  5. Add more lines as needed. Consecutive lines are separated by an Or divider, which is literal: the entity qualifies if it satisfies any one line.

  6. Click Details on a line to see what its rules actually test — each rule’s category/label conditions, with their own include/exclude and all of / any of.

    Details modal listing the rules in a line and the category and label conditions of each

  7. Check the result in the Matched placements (demand) / Matched banners (supply) card immediately below: it lists what this entity currently pairs with and labels each row Matched by rules or linking, which is the quickest way to tell whether a line did anything. That card disappears when the Matching rules card does.

  8. Remove a line with its bin icon and confirm Delete record?. That write is immediate too.

The demand/supply flip

The card always selects rules of the opposite side from the entity you are on. This is the single most common reason a rule “matches nothing”.

You are editingThe card offersThose rules testSo the line controls
Advertiser / campaign / banner (demand)Inventory rulesinventory categories & labelswhich inventory your ads pair with
Site / zone / placement (supply)Campaign rulesadvertising categories & labelswhich demand pairs with your inventory

Matching rules card on a placement, offering campaign rules instead of inventory rules

What a rule looks at

A rule does not test the entity you attached it to, and it does not test the entity level you might expect. Whatever level you attach at, the pairing is always evaluated placement ↔ banner, and the categories and labels are read from these places only:

Side being matchedCategories come fromLabels come from
Inventory (a placement)the site’s inventory categoriesthe placement’s own labels
Demand (a banner)the advertiser’s advertising categoriesthe banner’s labels plus its campaign’s labels

Nothing else contributes. A zone has no categories or labels of its own in this path; a placement has labels but no categories; a campaign has labels but no categories; an advertiser has categories but no labels. If a rule matches nothing, check the row above before you check the rule.

Caveats and exceptions

How the lines are evaluated — the include/exclude arithmetic is not what most readers assume:

  • Within a line, all of intersects the rules’ matches and any of unions them.
  • A line’s Effect is applied to that result: Include keeps it; Exclude turns it into everything on the other side, minus it.
  • Between lines the results are unioned — that is the Or divider.
  • Across entity levels, the results are intersected. Site, zone and placement rules all apply to the same placement, and advertiser, campaign and banner rules all apply to the same banner: a level whose switch is on must be satisfied, and a level whose switch is off simply does not participate. So a parent’s rules constrain its children whether or not the children have their own; a child never overrides its parent.
  • Two Exclude lines cancel each other out. Because lines are unioned, “everything except A” OR “everything except B” is “everything except things that are both A and B” — if A and B do not overlap, nothing is excluded at all. To exclude two rules, put them in one Exclude line with any of.
  • An Include line next to an Exclude line does not narrow it. The Exclude line already resolves to almost everything, and the union can only widen. Keep one entity to one style — either a set of Include lines, or a single Exclude line.
  • An exclude line is not a blocklist for direct demand. Adding an Exclude line to a placement does not stop a banner that a trafficker linked to that placement in the Linked banners card — the two pools are unioned, not intersected. To stop a specific piece of demand, block it by name.

The switch

  • Both sides must have the card switched on for a pairing to happen. Rule matching only ever considers inventory whose placement, zone or site has rules on, and demand whose banner, campaign or advertiser has rules on. A placement with a perfect Include line will never pair with a banner whose whole advertiser chain has rules off — and no message anywhere says so.
  • On with no lines matches whatever the admin decided, and the card’s empty state tells you which way it is set. Either “…will receive traffic based on all applicable system rules. If necessary, select and apply specific rules to limit traffic.” — it pairs with everything on the other side that also has rules on — or “…will receive no rule-matched traffic; only directly linked items keep serving. Select and apply specific rules to receive matched traffic.” — it drops out of rule matching entirely, while hard links keep serving. The switch is Rules management in Admin → Inventory & campaigns settings, set separately for the Publishers tab (All campaigns rules / None of campaigns rules) and the Advertisers tab (All inventory rules / None of inventory rules). A network ships on the permissive All… setting, so switching a card on and adding nothing is, by default, a broadening change rather than a no-op. (“No traffic” always means no rule-matched traffic; directly linked banners keep serving either way.)
  • Turning the switch on runs apply default rules every time, not just the first. Any rule your network administrator marked default for this entity type and that is not on any of the entity’s lines yet is added as a single-rule line. A default rule you folded into a multi-rule line counts as attached and is not added again; one you deleted comes back the next time the card is switched on.
  • Turning the switch off does not delete the lines. It only stops the entity taking part; the lines are hidden and come back when you switch it on again — along with any defaults added in the meantime, and minus any rule your network administrator deleted while the card was off.

Rules change under you

  • A deactivated rule can silently stop your entity pairing. Inactive rules are dropped from the ad server’s cache; a line whose every rule is inactive is dropped with them, and an entity left with no live lines falls back to the Rules management setting above — which usually means no rule-matched traffic. The line still shows in the card, greyed. Check for grey before you debug anything else.
  • A rule still referenced by an entity with its card on cannot be deleted — the delete is refused and the admin grid reports which entities hold it. Entities whose card is switched off do not block the delete: the rule is removed from their lines (a line left with no rule is removed too), so it is gone when the card is switched on again.
  • Editing a rule in Admin changes it retroactively for every entity that references it. There is no per-entity copy — the card stores a pointer. A rule renamed or re-scoped changes what your line does without your line changing.
  • Changes reach ad serving in two stages. They land at the next ad-cache reload, and then the first request for a given placement after that reload is still answered from the previously computed set while a background worker recalculates. Allow a couple of minutes and a second request before concluding a rule does not work.

Who can do this

  • The card is a network-manager card as shipped, on both sides: demand (advertiser, campaign, banner) attaches Inventory rules; supply (site, zone, placement) attaches Campaign rules. Advertisers and publishers do not get the card — the pairing still happens to their entities; they simply do not see or set it. For an advertiser, unexpected delivery on inventory you never linked is the first thing to ask the network about; for a publisher, demand you did not link can be paired with your inventory by a network rule.
  • Reading the saved lines and opening Details needs only view rights on the entity, so a role without Manage Rules still sees the lines, read-only. Add, the bin icon and the on/off switch need update rights on the entity and Manage Rules for that side; a call without them is refused with a 403 naming rules management. On a Can View share, saved lines and Details are read-only; with rules off, the card is hidden.

Not working?

SymptomCheckWhere
The rule pairs nothingThe other side’s card is off somewhere in its chain — a banner needs rules on at banner, campaign or advertiser level, a placement at placement, zone or site.The Matching rules switch on the entities you expect to pair
Still nothing, both sides onThe categories are not where the rule reads them: inventory categories on the site, advertising categories on the advertiser; labels on the placement, the banner and its campaign.Site → categories; advertiser → categories; see What a rule looks at
The picker offers the wrong kind of ruleIt offers the opposite side’s rules by design: Inventory rules on demand, Campaign rules on supply.The placeholder text (Select Inventory Rules… / Select Campaign Rules…)
The picker is emptyNo rule of that type exists yet; the card never creates one.Admin → Ad serving → Rules
A rule name is greyThe administrator deactivated it; the ad server ignores it, and a line with only inactive rules is dropped.Admin → Rules; Show inactive
Two Exclude lines exclude nothingLines are unioned; “except A or except B” is nearly everything. Put both rules in one Exclude line with any of.The saved lines
An Exclude line did not stop an advertiserHand-linked banners stay; rules only shrink their own pool. Block it by name.Placement → Banners probability → ⊘
A line you deleted came backIt is a default for rule; switching the card on re-adds it. Fold it into a multi-rule line or ask the administrator to drop the default.Admin → Rules → default for
Pairs appeared although the card has no linesRules management is on All… for that tab: on with no lines pairs with everything. Add Include lines to narrow.Admin → Inventory & campaigns settings
The change is not serving yetTwo-stage propagation: next cache reload, then a second request. Wait a couple of minutes.—
Add refused with 403Update rights on the entity plus Manage Rules for that side are needed.Your administrator
At least one rule should be selected!Nothing is picked in Rules.The add-line row

Reference

The add-line row

ControlWhat it doesDefault
Card switchTurns rule matching on for this entity. Writes at once and runs apply default rules.Off, unless your network administrator ticked this entity type in Rules panel default status (Admin → Inventory & campaigns settings), which decides the switch’s state on newly created entities
EffectInclude = pair with what the line matches. Exclude = pair with everything except what it matches.Include
RulesSearchable multi-select of the opposite side’s rules.empty
Show inactiveAlso lists rules your network administrator deactivated; they render greyed.Off
Combine withall of (AND) / any of (OR) across the rules in this line. Hidden until two rules are picked.all of
AddWrites the line. No confirmation, no Save step.—
Refresh (circular-arrow icon, end of the row)Re-reads the saved lines from the server. Useful when a colleague is editing the same entity.—

A saved line

ElementWhat it tells you
Include / Exclude badgethe line’s Effect
all of: / any of:the Combine-with operator — shown only when the line holds two or more rules
rule namesgreyed if that rule has since been deactivated by your network administrator
Or dividerseparates consecutive lines; the entity qualifies on any one of them
Detailsopens the read-only modal below. Available to everyone who can see the card.
bin icondeletes the line after a Delete record? confirmation. Hidden when you cannot edit.

The Details modal — read-only, three levels deep, from the outside in:

LevelWhat it shows
the lineits Include/Exclude badge and either All of these rules must match: or Any one of these rules can match:
each ruleits name; and All conditions below must match: when the rule has two or more conditions
each conditionan Include/Exclude badge, an all of: / any of: prefix when it names two or more values, then the Category chips and Label chips it tests

Permissions

PermissionLets you
View rights on the entitySee the saved lines and open Details.
Update rights on the entity + Manage Rules for that sideSwitch the card, Add and delete lines.

Over the API

The card has a REST twin per entity kind (advertiser, campaign, banner, site, zone, placement), under /rest-api/rules/{kind}/…:

TaskCall
Switch the card on / offPOST /rest-api/rules/{kind}/{id}/enable.do · …/disable.do
Read the saved linesGET /rest-api/rules/{kind}/{id}/get.do — also answers rulesEnabled
Add a linePOST /rest-api/rules/{kind}/{id}/add.do with ruleIds, include (true = Include) and operator (AND = all of, OR = any of)
Remove a linePOST /rest-api/rules/{kind}/{id}/remove.do with ruleGroupId
Open a line’s DetailsGET /rest-api/rules/{kind}/show-details.do?ruleGroupId=…
List the rules you may attachGET /rest-api/rules/{kind}/available-rules.do?type=INVENTORY on a demand-side kind, type=CAMPAIGN on a supply-side one

Adding a line while the rules switch is off saves it and tells you so: the answer carries rulesEnabled: false and a warning (The rule group is saved, but rules are switched off on this …: it takes effect once they are enabled.). The line does nothing until the switch is on. An unknown rule id is a 400 (No rules with these ids: …) and nothing is saved. The permissions are the card’s own: view rights to read, update rights plus Manage Rules to change.

Related pages

Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.

A registration has already been submitted from this page. Please try again in 10 minutes.