docs(audiences): document that Lookup in Audiences cannot scope to a segment, add workaround FAQ - #2354
Open
george-dilthey wants to merge 1 commit into
Open
Conversation
…segment, add workaround FAQ
Contributor
george-dilthey
marked this pull request as ready for review
August 27, 2026 00:01
This was referenced Aug 27, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Added two things to
docs/audiences.md:Lookup in Audiencesbullet (in the "Using Audiences from a Clay table" section) noting the lookup searches the full audience and cannot be scoped to a specific saved segment, with a cross-reference to the new FAQ.Why
Trigger: Intercom conversation #215475628434998 — Megan Fogarty (Lucidchart) asked "Is it possible to lookup to a specific Companies segment via a Lookup to Audiences?" The human support agent (Bo Morin) answered: Lookup in Audiences searches the full audience, not a specific segment, and the workaround is to run a bulk enrichment on each segment that writes a custom field back to those company records, then have the lookup filter on that field.
Research:
Lookup in Audienceshas nosegmentIdparameter — inputs areentityType,fieldsToFilterBy,signalDaysLookback,dataToInclude,limit. The query in/workspace/clay-base/services/audiences/src/query/routes/batch-lookup.tsJOINs directly against the full entity table with no segment membership predicate. PASS.LOOKUP_IN_AUDIENCES/FeatureFlagEnum.EnableAudiencesGA).Lookup in Audiences, leaving a gap that caused Fin to escalate to a human.Source link(s)
/workspace/public-actions/apps/clay-labs/actions/lookup-in-audiences/input-parameter-schema.ts(no segment param);/workspace/clay-base/services/audiences/src/query/routes/batch-lookup.ts(full-table JOIN, no segment predicate)Uncertainties
None. The product behavior claim (Lookup in Audiences cannot scope to a segment, searches full audience by field value) is PASS from the verifier sub-agent with file:line code evidence.
Related observations
Upsert Audiences Record→Upsert segment record, docs(audiences): add archive cross-reference for Salesforce-deleted records #2348 updating Salesforce deleted-record note, docs(audiences): document OR filter group with AND exclusion pattern #2349 updating filter group UI text). None of these cover the Lookup in Audiences segment scoping limitation — my change is materially new and non-overlapping. PR docs(audiences): restructure Clay table section and rename Upsert/Update Audiences Record actions #2291 renames the action in step 2 of my new FAQ (currentlyUpdate Audiences Record); when docs(audiences): restructure Clay table section and rename Upsert/Update Audiences Record actions #2291 merges, that name may need updating to stay consistent.Closes DOC-2109