crm-lookup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSource of truth
权威来源
hubspot <command> --helpbulk-operations/SKILL.mdhubspot <command> --helpbulk-operations/SKILL.mdPick properties from the live schema
从实时架构中选择属性
Schemas drift. Run for the live set. First-pass for a brief:
hubspot properties list --type <type>--properties| Object | |
|---|---|
| contacts | |
| companies | |
| deals | |
| tickets | |
Contact ad/campaign attribution lives on (e.g. , /, , ). Full list: .
hs_analytics_*hs_analytics_sourcehs_analytics_source_data_1_2hs_analytics_first_touch_converting_campaignhs_analytics_last_touch_converting_campaignhubspot properties list --type contacts | grep hs_analytics_架构会随时间变化。运行 获取实时属性集合。以下是首次使用时可选用的精简参数:
hubspot properties list --type <type>--properties| 对象 | |
|---|---|
| 联系人 | |
| 公司 | |
| 交易 | |
| 工单 | |
联系人的广告/营销归因信息存储在属性中(例如、/、、)。完整列表可通过以下命令查看:。
hs_analytics_*hs_analytics_sourcehs_analytics_source_data_1_2hs_analytics_first_touch_converting_campaignhs_analytics_last_touch_converting_campaignhubspot properties list --type contacts | grep hs_analytics_1. Lookup by ID
1. 通过ID查找
Up to ~100 IDs in a single batch call:
bash
hubspot objects get --type contacts 12345 67890 23456 --properties email,firstname,lastname,company,phone,lifecyclestage单次批量调用最多可查询约100个ID:
bash
hubspot objects get --type contacts 12345 67890 23456 --properties email,firstname,lastname,company,phone,lifecyclestage2. Find one by email / domain (exact match)
2. 通过邮箱/域名查找(精确匹配)
emaildomain--filterbash
hubspot objects search --type contacts --filter "email=jane@acme.com" \
--properties email,firstname,lastname,company,lifecyclestage,hubspot_owner_id
hubspot objects search --type companies --filter "domain=acme.com" \
--properties name,domain,industry,annualrevenue,hubspot_owner_idemaildomain--filterbash
hubspot objects search --type contacts --filter "email=jane@acme.com" \
--properties email,firstname,lastname,company,lifecyclestage,hubspot_owner_id
hubspot objects search --type companies --filter "domain=acme.com" \
--properties name,domain,industry,annualrevenue,hubspot_owner_idOR — multiple emails in one call
或 — 单次调用查询多个邮箱
hubspot objects search --type contacts
--filter "email=alice@acme.com" --filter "email=bob@acme.com" --properties email,firstname
--filter "email=alice@acme.com" --filter "email=bob@acme.com" --properties email,firstname
undefinedhubspot objects search --type contacts
--filter "email=alice@acme.com" --filter "email=bob@acme.com" --properties email,firstname
--filter "email=alice@acme.com" --filter "email=bob@acme.com" --properties email,firstname
undefined3. Find by partial name (token + client-side narrowing)
3. 通过部分名称查找(令牌匹配 + 客户端筛选)
~dealname~acmejqbash
hubspot objects search --type deals --filter "dealname~acme" --properties dealname,amount,dealstage \
| jq -c 'select(.properties.dealname | ascii_downcase | contains("acme corp"))'~dealname~acmejqbash
hubspot objects search --type deals --filter "dealname~acme" --properties dealname,amount,dealstage \
| jq -c 'select(.properties.dealname | ascii_downcase | contains("acme corp"))'4. Find all associated records (two CLI calls, not xargs)
4. 查找所有关联记录(两次CLI调用,无需xargs)
Pattern: → → batch. Never — that spawns one process per record. Use plural in (, , ); shows singular but only plural avoids a warning.
associations listjq -c '{id}'objects getxargs -I{} hubspot objects get …--fromcontacts:companies:deals:--helpbash
undefined流程: → → 批量处理。切勿使用 — 这会为每条记录启动一个进程。在参数中使用复数形式(、、);显示的是单数形式,但只有复数形式可避免警告。
associations listjq -c '{id}'objects getxargs -I{} hubspot objects get …--fromcontacts:companies:deals:--helpbash
undefinedAll contacts at a company
某公司的所有联系人
hubspot associations list --from companies:67890 --to contacts
| jq -c '{id}'
| hubspot objects get --type contacts --properties email,firstname,lastname,jobtitle
| jq -c '{id}'
| hubspot objects get --type contacts --properties email,firstname,lastname,jobtitle
hubspot associations list --from companies:67890 --to contacts
| jq -c '{id}'
| hubspot objects get --type contacts --properties email,firstname,lastname,jobtitle
| jq -c '{id}'
| hubspot objects get --type contacts --properties email,firstname,lastname,jobtitle
Open deals for a contact (filter client-side; "open" varies by pipeline)
某联系人的未结交易(客户端筛选;“未结”定义因管道而异)
hubspot associations list --from contacts:12345 --to deals | jq -c '{id}'
| hubspot objects get --type deals --properties dealname,amount,dealstage,hs_is_closed
| jq -c 'select(.properties.hs_is_closed != "true")'
| hubspot objects get --type deals --properties dealname,amount,dealstage,hs_is_closed
| jq -c 'select(.properties.hs_is_closed != "true")'
undefinedhubspot associations list --from contacts:12345 --to deals | jq -c '{id}'
| hubspot objects get --type deals --properties dealname,amount,dealstage,hs_is_closed
| jq -c 'select(.properties.hs_is_closed != "true")'
| hubspot objects get --type deals --properties dealname,amount,dealstage,hs_is_closed
| jq -c 'select(.properties.hs_is_closed != "true")'
undefined5. Get a record plus its associations
5. 获取记录及其关联信息
bash
contact_id=12345
hubspot objects get --type contacts $contact_id --properties email,firstname,lastname,company,lifecyclestagebash
contact_id=12345
hubspot objects get --type contacts $contact_id --properties email,firstname,lastname,company,lifecyclestageAssociated company (usually one)
关联公司(通常只有一个)
hubspot associations list --from contacts:$contact_id --to companies | jq -c '{id}' | head -1
| hubspot objects get --type companies --properties name,domain,industry,annualrevenue
| hubspot objects get --type companies --properties name,domain,industry,annualrevenue
hubspot associations list --from contacts:$contact_id --to companies | jq -c '{id}' | head -1
| hubspot objects get --type companies --properties name,domain,industry,annualrevenue
| hubspot objects get --type companies --properties name,domain,industry,annualrevenue
Associated deals
关联交易
hubspot associations list --from contacts:$contact_id --to deals | jq -c '{id}'
| hubspot objects get --type deals --properties dealname,amount,dealstage,closedate
| hubspot objects get --type deals --properties dealname,amount,dealstage,closedate
undefinedhubspot associations list --from contacts:$contact_id --to deals | jq -c '{id}'
| hubspot objects get --type deals --properties dealname,amount,dealstage,closedate
| hubspot objects get --type deals --properties dealname,amount,dealstage,closedate
undefinedConstraints
限制条件
- Search returns ≤100 per page. For more, use the pagination loop in .
bulk-operations/SKILL.md - is token-based; substring filtering happens in
~after the search.jq - If the lookup feeds a write (update, delete, merge), follow the → digest →
--dry-runflow in--confirm.bulk-operations/SKILL.md
- 搜索结果每页最多返回100条。如需更多结果,请使用中的分页循环。
bulk-operations/SKILL.md - 为令牌匹配;子字符串筛选需在搜索后通过
~完成。jq - 如果查找结果用于写入操作(更新、删除、合并),请遵循中的
bulk-operations/SKILL.md→ 摘要 →--dry-run流程。--confirm