Using Information for Campaign Targeting
Targeting logic is just a query with business rules attached
Every campaign brief eventually reduces to a set of inclusion rules, exclusion rules, and ordering logic that together define exactly who receives a message. The skill of translating a marketing brief ("target lapsed high-value customers, but don't annoy anyone we've already contacted this week") into precise, unambiguous criteria is where a huge share of campaign quality is actually won or lost — a technically correct query built on a loosely-interpreted brief still produces a wrong list.
Inclusion and exclusion rules
Inclusion rules define who's eligible at all — the positive criteria a record must satisfy: purchased in category X, lifecycle stage is "active," lives in a serviceable region. Exclusion rules (suppressions) remove records that technically match the inclusion criteria but shouldn't be contacted for some other reason: already converted on this offer, opted out, in a legal/compliance hold, or already targeted by a conflicting campaign this period.
The common mistake is treating exclusions as an afterthought bolted onto a finished query, rather than a first-class part of the brief gathered up front. A campaign that forgets to exclude "already purchased this item" sends a clearly tone-deaf message and erodes trust in the whole program.
Suppression lists as shared infrastructure
Rather than rebuilding exclusion logic per campaign, mature marketing orgs maintain standing suppression lists as queryable tables: a global opt-out list, a legal/compliance hold list, a "contacted in the last 7 days" rolling list, a "recently converted on this specific offer" list. Every campaign query joins against these shared suppression tables rather than reinventing exclusion logic each time — this is both faster to build and far less error-prone than one-off suppression logic per campaign.
-- Target lapsed high-value customers for a win-back offer
SELECT c.customer_id, c.email
FROM dim_customer c
WHERE c.rfm_value_tier = 'high' -- inclusion: value tier
AND c.days_since_last_purchase BETWEEN 60 AND 180 -- inclusion: lapsed window
AND c.region = 'US' -- inclusion: serviceable market
-- exclusions / suppressions
AND c.customer_id NOT IN (SELECT customer_id FROM suppression_global_optout)
AND c.customer_id NOT IN (SELECT customer_id FROM suppression_legal_hold)
AND c.customer_id NOT IN (
SELECT customer_id FROM fact_email_sends
WHERE send_date >= CURRENT_DATE - INTERVAL '7 days' -- frequency cap: contacted this week
)
AND c.customer_id NOT IN (
SELECT customer_id FROM fact_orders
WHERE order_date >= CURRENT_DATE - INTERVAL '30 days' -- already converted recently
);Frequency capping logic
Frequency capping limits how many messages a single customer can receive within a time window, regardless of how many campaigns separately qualify them. This requires a cross-campaign view of contact history — a rolling table of all sends across every channel and campaign, not just the campaign currently being built — because a customer eligible for five simultaneous campaigns should get a prioritized subset, not five emails in one day.
Implementing this well typically means ranking competing campaigns by priority or expected value, then allocating the limited "contact slots" available for each customer in that priority order, rather than letting each campaign check the cap independently and all of them "winning" simultaneously.
Customer eligible for:
Campaign A (win-back offer) priority: 2
Campaign B (new product launch) priority: 1
Campaign C (loyalty reminder) priority: 3
Weekly contact cap: 2 messages
Arbitration result:
Send Campaign B (priority 1) -> slot 1 used
Send Campaign A (priority 2) -> slot 2 used
Suppress Campaign C this week (cap reached)Inclusion rules vs. exclusion (suppression) rules
| Aspect | Inclusion rules | Exclusion / suppression rules |
|---|---|---|
| Purpose | Defines who is eligible | Removes otherwise-eligible records |
| Typical source | Campaign brief's target audience | Compliance, frequency caps, recent conversion |
| Reusability | Mostly campaign-specific | Highly reusable across campaigns |
| Risk if wrong | Wasted spend, irrelevant targeting | Compliance violation, customer annoyance |
Suppression bugs are the ones that generate complaints
What's next
Targeting logic answers who gets a specific campaign. Segmentation, covered next, is the broader discipline of grouping customers into durable categories that many different campaigns draw from.
Next: Using Information for Customer Segmentation →
I build these systems professionally.
Whether it's a RAG pipeline, analytics migration, or AI workflow — let's talk.