Diagnose an audience query
After these steps, you know whether an audience's filters can use indexes and have the query text to check in Salesforce.
Before you begin
- Setting
- Audience Query Diagnostics turned on for your org. It is available on request. See Editions and features.
- Permission
- Campaign Audience Builder: Admin permission set group, for the CAB Settings tab. See Permission sets.
The diagnostics only read the audience’s definition. They don’t run the audience and don’t change it.
-
Open CAB Settings → Maintain → Audience Query Diagnostics.
-
In Search Audiences, choose the audience. Sequences aren’t listed.
-
Read the summary and Recommendations, then the query sections below them.
-
After you change the audience, select Refresh Diagnostics.
Read the summary
Section titled “Read the summary”- Initial Object: the audience object, by its API name.
- Risky Filters: how many conditions use an operator that can slow large audiences. See Filter operators.
- Likely Indexed Initial Filter: whether a condition on the audience object narrows the records on a field that is likely indexed.
- Likely Indexed Positive Filter: the same for a condition on any object.
A positive condition is one that narrows to matching values, such as equals, greater than, between, starts with or includes. Likely indexed are Id, OwnerId, CreatedById, LastModifiedById, CreatedDate, LastModifiedDate, SystemModstamp, RecordTypeId, lookup fields, external IDs, unique, auto-number and name fields.
Read the query sections
Section titled “Read the query sections”- Generated Initial SOQL: the query on the audience object. Copy it with the copy icon.
- Simplified Fallback SOQL: a simpler form of that query, when CAB has one.
- Additional Generated SOQL: one numbered query per related node, Relationship Query or Aggregate Query.
- Filter Diagnostics: one row per condition with its object, field, operator, whether it is on the audience object, likely indexed and risky, and why.

