# Ticket Resolution

> Create, triage, advance, and close HubSpot support tickets — pipeline discovery, contact/company association, priority queues, bulk stage moves, resolution close-out.

- **Type:** Skill
- **Install:** `agentstack add skill-hubspot-agent-cli-skills-ticket-resolution`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [HubSpot](https://agentstack.voostack.com/s/hubspot)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [HubSpot](https://github.com/HubSpot)
- **Source:** https://github.com/HubSpot/agent-cli-skills/tree/main/ticket-resolution

## Install

```sh
agentstack add skill-hubspot-agent-cli-skills-ticket-resolution
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Read `bulk-operations/SKILL.md` first — JSONL piping, batch read, pagination, dry-run/digest/confirm, and `hubspot history` recovery live there. `hubspot  --help` is authoritative. Tickets use the `tickets` object type (plural, e.g. `tickets:45123`).

## 1. Discover pipeline + stages (portal-specific, run every session)

Stage IDs differ in every portal — never hard-code them.

```bash
hubspot pipelines list --type tickets --format table
hubspot pipelines stages --type tickets --pipeline  --format table
```

The stage table prints each stage's `ID` and `Label` ("New", "Waiting on contact", "Closed", etc.).

## 2. Verify enum option values for THIS portal

`hs_ticket_priority`, `hs_ticket_category`, and `hs_resolution` are all `enumeration` properties — option values are portal-configurable and `hubspot properties get` does NOT return them. Discover by probing or by reading live records:

```bash
# Probe: send an invalid value; the 400 error lists the allowed options.
hubspot objects update --type tickets  --property hs_resolution=__probe__
# error: "was not one of the allowed options: [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
```

Do NOT assume HubSpot defaults — read the portal.

## 3. Create a ticket and associate it

`subject` is the only practically-required property. Skipping `hs_pipeline`/`hs_pipeline_stage` lands the ticket in the default pipeline's first stage.

```bash
hubspot objects create --type tickets \
  --property subject="Login error on mobile app" \
  --property content="User reports 401 since v3.2 release." \
  --property hs_pipeline= \
  --property hs_pipeline_stage= \
  --property hs_ticket_priority= \
  --property hs_ticket_category=
# Capture the "id" from the output JSON.

hubspot associations create --from tickets: --to contacts:
hubspot associations create --from tickets: --to companies:
```

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:"", hs_pipeline_stage:"",
    hs_ticket_priority:"", hs_ticket_category:""}}' \
| hubspot objects create --type tickets
```

## 4. Triage queries

```bash
# Open tickets by priority
hubspot objects search --type tickets \
  --filter "hs_pipeline_stage= 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=" \
  --properties subject,hs_ticket_priority,createdate
```

Filter by owner with `hubspot_owner_id=` (find IDs via `hubspot owners list --format table`).

## 5. Advance tickets through stages (bulk update from search)

```bash
hubspot objects search --type tickets \
  --filter "hs_ticket_category=BILLING_ISSUE AND hs_pipeline_stage=" \
| jq -c '{id, properties:{hs_pipeline_stage:""}}' \
| hubspot objects update --type tickets --dry-run
```

Re-pipe the same search without `--dry-run` to execute. For >100 rows, follow the `--digest/--confirm` flow in `bulk-operations/SKILL.md` ("Safe destructive workflow"). Reassign in bulk works identically with `{hubspot_owner_id:""}`.

## 6. Log a resolution note

Activity creation lives in `sales-execution/SKILL.md` (notes/calls/meetings/tasks). After creating the note there, link it: `hubspot associations create --from notes: --to tickets:`.

## 7. Close the ticket

`hs_resolution` is an enumeration — pass an allowed option value from Step 2, not free text. HubSpot then computes `hs_is_closed=true`, `closed_date`, and `time_to_close`.

```bash
hubspot objects update --type tickets  \
  --property hs_pipeline_stage= \
  --property hs_resolution=
```

## Known limitations

- `properties get`/`list` do not return enum options — probe via update error or read live records (CLI ask logged).
- No Conversations/Inbox API surface — chat threads and inbox emails are not CLI-accessible.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [HubSpot](https://github.com/HubSpot)
- **Source:** [HubSpot/agent-cli-skills](https://github.com/HubSpot/agent-cli-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-hubspot-agent-cli-skills-ticket-resolution
- Seller: https://agentstack.voostack.com/s/hubspot
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
