Tracking

Excluding Test Sends from _Sent Queries

4 min read · SFMC SQL practitioner guide

Why test sends pollute metrics

Preview and test sends appear in _Sent alongside production deployments. Including them inflates send counts and distorts open and click rates.

Join _Job to access send classification metadata, or filter known test subscriber keys used by your team.

Production sends only

TestStormObjID is populated on preview and test send rows in _Sent. IS NULL keeps production deployments only — the same predicate the DataViews.pro sandbox utility injects.

SELECT
  s.JobID,
  COUNT(DISTINCT s.SubscriberKey) AS ProductionSends
FROM _Sent s
WHERE s.EventDate >= DATEADD(day, -30, GETDATE())
  AND s.TestStormObjID IS NULL
GROUP BY s.JobID

Sandbox utility

DataViews.pro includes an "Exclude test sends" utility toggle that injects common test-send predicates when _Sent is in your selection.

Related reference: _Sent · _Job