Create Audience from Segment
create_audience_from_segmentCreate a dynamic Insights Retargeting audience from a saved Insights (Spotlight) segment: the companies matching the segment inside a lookback window, refreshed automatically as the journey data changes.
TWO VARIANTS (audience_type):
"contacts" (default): Insights Retargeting Contacts, platform type WEBSITE_RETARGETING. Contacts at the matching accounts, matched through the Metadata contact graph; usable on LinkedIn, Facebook, Instagram, X and Reddit.
"accounts": Insights Retargeting Accounts, platform type WEBSITE_ACCOUNT_RETARGETING. The matching COMPANIES pushed to LinkedIn as a matched company audience; LinkedIn only. The shape for account-level INCLUSION or EXCLUSION on LinkedIn, e.g. suppressing accounts that already received 200+ impressions from a sequenced program.
WHEN: behaviour- or CRM-state-based retargeting and suppression ("retarget accounts that visited pricing", "exclude accounts we already saturated", "high engagement score not in the CRM"). NOT for firmographic / technographic / intent asks (use those audience tools), and NOT for LinkedIn ad-engagement retargeting (create_linkedin_engagement_retargeting_audience works off LinkedIn's own engagement signals; this one works off the Spotlight journey: website visits, impressions, clicks, scores, CRM state).
WORKFLOW (each step is checked and a failure is refused with the reason):
list_segments, then get_segment_criteria(segment_id, lookback_window): the segment must exist, be READY, and match at least one account in the window. A segment matching 0 accounts is refused (widen the window, or create_segment with looser criteria).
lookback_window in days (1 to 365): the window the segment's metrics are evaluated over ("in the last 90 days" = 90).
Call this tool with a descriptive name. The audience appears in the library as "Insights Retargeting Contacts (Dynamic)" or "Insights Retargeting Accounts (Dynamic)".
RETURNS: {success, id, audience_id, audience_name, status, audience_type, platform_audience_type, segment_id, segment_name, lookback_window, accounts_in_window, channels, expectedNumberOfCompanies, expectedNumberOfContacts, criteria}. Member matching is asynchronous: -1 or 0 right after creation means "not matched yet"; check again later with get_deep_audience_details.
USED AS AN EXCLUSION: Ann attaches it through add_and_edit_campaign_elements (exclude_audiences) on the campaign that must not reach those accounts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the new audience. Unique and descriptive, e.g. 'Exclude: 200+ LinkedIn impressions, 90d'. | |
| segment_id | Yes | The id of a READY segment from list_segments / create_segment. | |
| audience_type | No | contacts (default): people at the matching accounts, multi-channel. accounts: the matching companies as a LinkedIn matched audience, LinkedIn only; use it for account-level LinkedIn exclusions. | |
| lookback_window | Yes | Days the segment is evaluated over. Range 1 to 365. 30 for the last month, 90 for the last quarter. |