audience-targeting
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFoundation
基础准备
Read first — pagination, JSONL piping, destructive-op safety. Reshape recipes in . Resource: is the filter-expression cookbook (lifecycle, lead status, email engagement, activity, deals, owner).
bulk-operations/SKILL.mdbulk-operations/resources/json-patterns.mdresources/contact-segmentation-filters.md请先阅读——其中包含分页、JSONL管道传输、破坏性操作安全相关内容。可参考中的重构示例。参考资源:是筛选表达式指南,涵盖生命周期、线索状态、邮件互动、活动、交易、负责人等筛选维度。
bulk-operations/SKILL.mdbulk-operations/resources/json-patterns.mdresources/contact-segmentation-filters.mdFilter syntax cheat sheet
筛选语法速查表
Source of truth: .
hubspot objects search --help- One flag = one AND group:
--filter.--filter "lifecyclestage=lead AND !hubspot_owner_id" - Multiple flags are OR'd. Use for enum-OR-enum.
--filter - Operators: ,
=,!=,>,>=,<,<=(CONTAINS_TOKEN — whole-word, NOT substring).~ - HAS_PROPERTY: bare or
name. NOT_HAS_PROPERTY:name?. Dates:!name.YYYY-MM-DD
~jobtitle~directorjq权威来源:。
hubspot objects search --help- 一个标志对应一组AND条件:
--filter。--filter "lifecyclestage=lead AND !hubspot_owner_id" - 多个标志为OR关系,适用于枚举值之间的或运算。
--filter - 运算符:、
=、!=、>、>=、<、<=(CONTAINS_TOKEN——匹配完整单词,而非子字符串)。~ - HAS_PROPERTY:直接写或
name;NOT_HAS_PROPERTY:name?;日期格式:!name。YYYY-MM-DD
~jobtitle~directorjqProperties this skill turns on
本技能启用的属性
Full live list: . Enum options aren't exposed by ; discover with .
hubspot properties list --type contactsproperties gethubspot objects list --type contacts --properties <name> --limit 100 --format json | jq -r '.data[].properties.<name> // empty' | sort -uCore fields used here: , (bare/ for owned/unowned; for IDs), ( excludes opted-out), / (recency), / / (string or ), (0 net-new, has-pipeline).
lifecyclestagehubspot_owner_id!hubspot owners lisths_email_optout!=truehs_email_last_open_datenotes_last_contactedjobtitlecountrycity=~num_associated_deals>=1Firmographics (, , ) live on companies — see cross-object section.
industrynumberofemployeesannualrevenue完整实时列表:。不会展示枚举选项;可通过以下命令查看:。
hubspot properties list --type contactsproperties gethubspot objects list --type contacts --properties <name> --limit 100 --format json | jq -r '.data[].properties.<name> // empty' | sort -u此处使用的核心字段:、(直接写字段名/表示已分配负责人/未分配负责人;可通过获取ID)、(排除已退订用户)、/(互动时效性)、//(字符串匹配用或)、(0表示新线索,表示已进入销售管道)。
lifecyclestagehubspot_owner_id!hubspot owners lisths_email_optout!=truehs_email_last_open_datenotes_last_contactedjobtitlecountrycity=~num_associated_deals>=1企业属性(、、)存储在企业对象中——请查看跨对象操作章节。
industrynumberofemployeesannualrevenueCommon segments
常见细分群体示例
bash
undefinedbash
undefinedRecent leads (this quarter, not yet owned)
近期线索(本季度创建,尚未分配负责人)
hubspot objects search --type contacts
--filter "lifecyclestage=lead AND createdate>2026-01-01 AND !hubspot_owner_id"
--properties email,firstname,lastname,createdate
--filter "lifecyclestage=lead AND createdate>2026-01-01 AND !hubspot_owner_id"
--properties email,firstname,lastname,createdate
hubspot objects search --type contacts
--filter "lifecyclestage=lead AND createdate>2026-01-01 AND !hubspot_owner_id"
--properties email,firstname,lastname,createdate
--filter "lifecyclestage=lead AND createdate>2026-01-01 AND !hubspot_owner_id"
--properties email,firstname,lastname,createdate
Decision-makers by jobtitle (OR across tokens)
按职位头衔筛选决策者(多关键词或运算)
hubspot objects search --type contacts
--filter "jobtitledirector" --filter "jobtitlevp" --filter "jobtitle~chief"
--properties email,jobtitle,company
--filter "jobtitle
--properties email,jobtitle,company
hubspot objects search --type contacts
--filter "jobtitledirector" --filter "jobtitlevp" --filter "jobtitle~chief"
--properties email,jobtitle,company
--filter "jobtitle
--properties email,jobtitle,company
Engaged but not yet MQL (opened recently, still lead, opted in)
已互动但尚未成为MQL的用户(近期打开邮件,仍为线索状态,已订阅)
hubspot objects search --type contacts
--filter "lifecyclestage=lead AND hs_email_last_open_date>2026-04-01 AND hs_email_optout!=true"
--properties email,firstname,hs_email_last_open_date
--filter "lifecyclestage=lead AND hs_email_last_open_date>2026-04-01 AND hs_email_optout!=true"
--properties email,firstname,hs_email_last_open_date
hubspot objects search --type contacts
--filter "lifecyclestage=lead AND hs_email_last_open_date>2026-04-01 AND hs_email_optout!=true"
--properties email,firstname,hs_email_last_open_date
--filter "lifecyclestage=lead AND hs_email_last_open_date>2026-04-01 AND hs_email_optout!=true"
--properties email,firstname,hs_email_last_open_date
Geographic — US contacts opted in
地理位置筛选——已订阅的美国联系人
hubspot objects search --type contacts
--filter "country=United States AND hs_email_optout!=true"
--properties email,state,city
--filter "country=United States AND hs_email_optout!=true"
--properties email,state,city
More patterns (lead status, deals, owners, combined AND/OR) in `resources/contact-segmentation-filters.md`.hubspot objects search --type contacts
--filter "country=United States AND hs_email_optout!=true"
--properties email,state,city
--filter "country=United States AND hs_email_optout!=true"
--properties email,state,city
更多筛选模式(线索状态、交易、负责人、AND/OR组合)请查看`resources/contact-segmentation-filters.md`。Cross-object: companies-in-industry → their contacts
跨对象操作:特定行业企业 → 其联系人
industrynumberofemployeesannualrevenuexargs -I{} hubspot objects getassociations list{"id":"...","type":"company_to_contact"}objects getbash
undefinedindustrynumberofemployeesannualrevenuexargs -I{} hubspot objects getassociations list{"id":"...","type":"company_to_contact"}objects getbash
undefinedStep 1: target companies. Industry options are portal-specific — discover with:
步骤1:筛选目标企业。行业选项因门户而异——可通过以下命令查看:
hubspot objects list --type companies --properties industry --limit 100 --format json \
hubspot objects list --type companies --properties industry --limit 100 --format json \
| jq -r '.data[].properties.industry // empty' | sort -u
| jq -r '.data[].properties.industry // empty' | sort -u
hubspot objects search --type companies
--filter "industry=SOFTWARE AND numberofemployees>=100"
--properties name,industry,numberofemployees \
--filter "industry=SOFTWARE AND numberofemployees>=100"
--properties name,industry,numberofemployees \
target_companies.jsonl
hubspot objects search --type companies
--filter "industry=SOFTWARE AND numberofemployees>=100"
--properties name,industry,numberofemployees \
--filter "industry=SOFTWARE AND numberofemployees>=100"
--properties name,industry,numberofemployees \
target_companies.jsonl
Step 2: gather association IDs (associations list has no batch --from), then ONE batched
步骤2:收集关联ID(associations list不支持批量--from参数),然后执行一次批量
objects get for all contacts.
objects get获取所有联系人。
while read -r cid; do hubspot associations list --from "companies:$cid" --to contacts; done
< <(jq -r '.id' target_companies.jsonl)
| jq -c '{id}' | sort -u
| hubspot objects get --type contacts --properties email,firstname,jobtitle,hs_email_optout \
< <(jq -r '.id' target_companies.jsonl)
| jq -c '{id}' | sort -u
| hubspot objects get --type contacts --properties email,firstname,jobtitle,hs_email_optout \
target_contacts.jsonl
while read -r cid; do hubspot associations list --from "companies:$cid" --to contacts; done
< <(jq -r '.id' target_companies.jsonl)
| jq -c '{id}' | sort -u
| hubspot objects get --type contacts --properties email,firstname,jobtitle,hs_email_optout \
< <(jq -r '.id' target_companies.jsonl)
| jq -c '{id}' | sort -u
| hubspot objects get --type contacts --properties email,firstname,jobtitle,hs_email_optout \
target_contacts.jsonl
Optional: drop opted-out
可选步骤:移除已退订用户
jq -c 'select(.properties.hs_email_optout != "true")' target_contacts.jsonl > campaign_audience.jsonl
undefinedjq -c 'select(.properties.hs_email_optout != "true")' target_contacts.jsonl > campaign_audience.jsonl
undefinedSaving and reusing a segment
保存与复用细分群体
A segment is a JSONL file. Re-use for updates, exports, or re-fetches:
bash
undefined细分群体以JSONL文件形式保存,可用于更新、导出或重新获取数据:
bash
undefinedSave
保存细分群体
hubspot objects search --type contacts
--filter "lifecyclestage=lead AND hs_email_optout!=true"
--properties email,firstname,lastname,jobtitle \
--filter "lifecyclestage=lead AND hs_email_optout!=true"
--properties email,firstname,lastname,jobtitle \
segments/opted_in_leads.jsonl
hubspot objects search --type contacts
--filter "lifecyclestage=lead AND hs_email_optout!=true"
--properties email,firstname,lastname,jobtitle \
--filter "lifecyclestage=lead AND hs_email_optout!=true"
--properties email,firstname,lastname,jobtitle \
segments/opted_in_leads.jsonl
Assign owner (dry-run first per bulk-operations/SKILL.md)
分配负责人(请先按照bulk-operations/SKILL.md执行试运行)
jq -c '{id, properties:{hubspot_owner_id:"12345"}}' segments/opted_in_leads.jsonl
| hubspot objects update --type contacts --dry-run
| hubspot objects update --type contacts --dry-run
jq -c '{id, properties:{hubspot_owner_id:"12345"}}' segments/opted_in_leads.jsonl
| hubspot objects update --type contacts --dry-run
| hubspot objects update --type contacts --dry-run
Re-fetch with different properties later
后续重新获取不同属性的数据
jq -c '{id}' segments/opted_in_leads.jsonl
| hubspot objects get --type contacts --properties email,lifecyclestage,hs_lead_status
| hubspot objects get --type contacts --properties email,lifecyclestage,hs_lead_status
Destructive ops on a saved segment follow the dry-run → digest → confirm flow in `bulk-operations/SKILL.md`.jq -c '{id}' segments/opted_in_leads.jsonl
| hubspot objects get --type contacts --properties email,lifecyclestage,hs_lead_status
| hubspot objects get --type contacts --properties email,lifecyclestage,hs_lead_status
针对已保存细分群体的破坏性操作,请遵循`bulk-operations/SKILL.md`中的试运行→验证→确认流程。Known limits
已知限制
- No Lists API surface. Can't save as a HubSpot list or filter by list membership.
- is token-match, not substring. No regex operator.
~ - does not return enum options — discover via
properties get+objects list.jq - has no batch
associations list. Loop to gather IDs, batch the downstream--from.objects get - For >100 results, use the pagination loop in .
bulk-operations/SKILL.md
- 无Lists API接口,无法保存为HubSpot列表或按列表成员身份筛选。
- 为完整单词匹配,而非子字符串匹配,不支持正则运算符。
~ - 不会返回枚举选项——需通过
properties get+objects list查看。jq - 不支持批量
associations list参数,需循环收集ID后执行批量--from。objects get - 结果超过100条时,请使用中的分页循环。
bulk-operations/SKILL.md