ticket-resolution
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRead first — JSONL piping, batch read, pagination, dry-run/digest/confirm, and recovery live there. is authoritative. Tickets use the object type (plural, e.g. ).
bulk-operations/SKILL.mdhubspot historyhubspot <command> --helpticketstickets:45123请先阅读——其中包含JSONL管道传输、批量读取、分页、试运行/摘要/确认以及恢复功能。是权威参考文档。工单使用对象类型(复数形式,例如)。
bulk-operations/SKILL.mdhubspot historyhubspot <command> --helpticketstickets:451231. Discover pipeline + stages (portal-specific, run every session)
1. 发现管道与阶段(特定于门户,每次会话都需运行)
Stage IDs differ in every portal — never hard-code them.
bash
hubspot pipelines list --type tickets --format table
hubspot pipelines stages --type tickets --pipeline <pipeline_id> --format tableThe stage table prints each stage's and ("New", "Waiting on contact", "Closed", etc.).
IDLabel每个门户中的阶段ID都不同——切勿硬编码这些ID。
bash
hubspot pipelines list --type tickets --format table
hubspot pipelines stages --type tickets --pipeline <pipeline_id> --format table阶段表格会显示每个阶段的和(例如“新建”、“等待联系人回复”、“已关闭”等)。
IDLabel2. Verify enum option values for THIS portal
2. 验证当前门户的枚举选项值
hs_ticket_priorityhs_ticket_categoryhs_resolutionenumerationhubspot properties getbash
undefinedhs_ticket_priorityhs_ticket_categoryhs_resolutionenumerationhubspot properties getbash
undefinedProbe: send an invalid value; the 400 error lists the allowed options.
探测:传入无效值;400错误会列出允许的选项。
hubspot objects update --type tickets <some_ticket_id> --property hs_resolution=probe
hubspot objects update --type tickets <some_ticket_id> --property hs_resolution=probe
error: "was not one of the allowed options: [ISSUE_FIXED, FEATURE_REQUEST_TRACKED, ...]"
错误信息:"不是允许的选项之一: [ISSUE_FIXED, FEATURE_REQUEST_TRACKED, ...]"
Or read values already in use:
或者读取已在使用的值:
hubspot objects list --type tickets --limit 10
--properties hs_ticket_priority,hs_ticket_category,hs_resolution
--properties hs_ticket_priority,hs_ticket_category,hs_resolution
Do NOT assume HubSpot defaults — read the portal.hubspot objects list --type tickets --limit 10
--properties hs_ticket_priority,hs_ticket_category,hs_resolution
--properties hs_ticket_priority,hs_ticket_category,hs_resolution
请勿假设使用HubSpot默认值——请读取当前门户的配置。3. Create a ticket and associate it
3. 创建工单并建立关联
subjecths_pipelinehs_pipeline_stagebash
hubspot objects create --type tickets \
--property subject="Login error on mobile app" \
--property content="User reports 401 since v3.2 release." \
--property hs_pipeline=<pipeline_id> \
--property hs_pipeline_stage=<new_stage_id> \
--property hs_ticket_priority=<value_from_step_2> \
--property hs_ticket_category=<value_from_step_2>subjecths_pipelinehs_pipeline_stagebash
hubspot objects create --type tickets \
--property subject="Login error on mobile app" \
--property content="User reports 401 since v3.2 release." \
--property hs_pipeline=<pipeline_id> \
--property hs_pipeline_stage=<new_stage_id> \
--property hs_ticket_priority=<value_from_step_2> \
--property hs_ticket_category=<value_from_step_2>Capture the "id" from the output JSON.
从输出的JSON中记录“id”。
hubspot associations create --from tickets:<ticket_id> --to contacts:<contact_id>
hubspot associations create --from tickets:<ticket_id> --to companies:<company_id>
Bulk intake from a JSONL queue (see `bulk-operations/resources/json-patterns.md` for reshape patterns):
```bash
cat support_requests.jsonl \
| jq -c '{properties:{subject:.subject, content:.description,
hs_pipeline:"<pipeline_id>", hs_pipeline_stage:"<new_stage_id>",
hs_ticket_priority:"<priority>", hs_ticket_category:"<category>"}}' \
| hubspot objects create --type ticketshubspot associations create --from tickets:<ticket_id> --to contacts:<contact_id>
hubspot associations create --from tickets:<ticket_id> --to companies:<company_id>
从JSONL队列批量导入(如需重塑格式,请参考`bulk-operations/resources/json-patterns.md`):
```bash
cat support_requests.jsonl \
| jq -c '{properties:{subject:.subject, content:.description,
hs_pipeline:"<pipeline_id>", hs_pipeline_stage:"<new_stage_id>",
hs_ticket_priority:"<priority>", hs_ticket_category:"<category>"}}' \
| hubspot objects create --type tickets4. Triage queries
4. 分类查询
bash
undefinedbash
undefinedOpen tickets by priority
按优先级筛选未关闭工单
hubspot objects search --type tickets
--filter "hs_pipeline_stage=<open_stage_id> AND hs_ticket_priority=HIGH"
--properties subject,hubspot_owner_id,createdate
--filter "hs_pipeline_stage=<open_stage_id> AND hs_ticket_priority=HIGH"
--properties subject,hubspot_owner_id,createdate
hubspot objects search --type tickets
--filter "hs_pipeline_stage=<open_stage_id> AND hs_ticket_priority=HIGH"
--properties subject,hubspot_owner_id,createdate
--filter "hs_pipeline_stage=<open_stage_id> AND hs_ticket_priority=HIGH"
--properties subject,hubspot_owner_id,createdate
Unassigned
未分配的工单
hubspot objects search --type tickets
--filter "!hubspot_owner_id AND hs_pipeline_stage=<open_stage_id>"
--properties subject,hs_ticket_priority,createdate
--filter "!hubspot_owner_id AND hs_pipeline_stage=<open_stage_id>"
--properties subject,hs_ticket_priority,createdate
Filter by owner with `hubspot_owner_id=<id>` (find IDs via `hubspot owners list --format table`).hubspot objects search --type tickets
--filter "!hubspot_owner_id AND hs_pipeline_stage=<open_stage_id>"
--properties subject,hs_ticket_priority,createdate
--filter "!hubspot_owner_id AND hs_pipeline_stage=<open_stage_id>"
--properties subject,hs_ticket_priority,createdate
使用`hubspot_owner_id=<id>`按负责人筛选(可通过`hubspot owners list --format table`获取ID)。5. Advance tickets through stages (bulk update from search)
5. 推进工单阶段(从搜索结果批量更新)
bash
hubspot objects search --type tickets \
--filter "hs_ticket_category=BILLING_ISSUE AND hs_pipeline_stage=<new_stage_id>" \
| jq -c '{id, properties:{hs_pipeline_stage:"<waiting_stage_id>"}}' \
| hubspot objects update --type tickets --dry-runRe-pipe the same search without to execute. For >100 rows, follow the flow in ("Safe destructive workflow"). Reassign in bulk works identically with .
--dry-run--digest/--confirmbulk-operations/SKILL.md{hubspot_owner_id:"<new>"}bash
hubspot objects search --type tickets \
--filter "hs_ticket_category=BILLING_ISSUE AND hs_pipeline_stage=<new_stage_id>" \
| jq -c '{id, properties:{hs_pipeline_stage:"<waiting_stage_id>"}}' \
| hubspot objects update --type tickets --dry-run移除参数后重新执行相同的搜索管道即可完成操作。如果记录超过100条,请遵循中的流程(“安全破坏性工作流”)。批量重新分配负责人的操作与此类似,只需使用即可。
--dry-runbulk-operations/SKILL.md--digest/--confirm{hubspot_owner_id:"<new>"}6. Log a resolution note
6. 记录结案备注
Activity creation lives in (notes/calls/meetings/tasks). After creating the note there, link it: .
sales-execution/SKILL.mdhubspot associations create --from notes:<note_id> --to tickets:<ticket_id>活动创建功能位于中(包括备注、通话、会议、任务)。创建备注后,执行以下命令建立关联:。
sales-execution/SKILL.mdhubspot associations create --from notes:<note_id> --to tickets:<ticket_id>7. Close the ticket
7. 关闭工单
hs_resolutionhs_is_closed=trueclosed_datetime_to_closebash
hubspot objects update --type tickets <ticket_id> \
--property hs_pipeline_stage=<closed_stage_id> \
--property hs_resolution=<allowed_resolution_value>hs_resolutionhs_is_closed=trueclosed_datetime_to_closebash
hubspot objects update --type tickets <ticket_id> \
--property hs_pipeline_stage=<closed_stage_id> \
--property hs_resolution=<allowed_resolution_value>Known limitations
已知限制
- /
properties getdo not return enum options — probe via update error or read live records (CLI ask logged).list - No Conversations/Inbox API surface — chat threads and inbox emails are not CLI-accessible.
- /
properties get不会返回枚举选项——可通过更新错误探测或读取现有记录获取(已记录CLI需求)。list - 无Conversations/Inbox API接口——聊天线程和收件箱邮件无法通过CLI访问。