# ticket-flow

Run a ticket from new to closed with allowed status changes, first-response SLAs and a CSV/JSON export

- **Space:** helpdesk-and-support-public (https://github.com/Tech-Realm/space-helpdesk-and-support-public/tree/main/ticket-flow)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3, docker
- **Routes:** stdlib-reference, zammad-or-chatwoot, saas; checks: 2
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use helpdesk-and-support-public/ticket-flow` or MCP `get_pack helpdesk-and-support-public/ticket-flow`
- **Files:** CHANGELOG.md, code/refflow.py, code/schema.json, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/fixtures/scenario.json, outcome/results.json, pack.yaml, refs/refs.yaml, spec/SPEC.md, spec/source.md

## Purpose (spec/SPEC.md)

## Goal

Run a ticket from new to closed with allowed status changes, first-response SLAs and a CSV/JSON export. Our reference flow (`code/refflow.py`, stdlib sqlite) proves the records, allowed moves, numbers and export; the same rules carry over to the self-hosted app.

## Steps

1. Model the ticket in `code/schema.json`: channels, priorities, statuses and the allowed transitions.
2. Run `python3 code/refflow.py scenario code/schema.json outcome/fixtures/scenario.json`: create, reject bad input, assign, solve, list, SLA, export.
3. Mirror the same statuses and SLA targets (urgent 1 h, high 4 h, normal 8 h, low 24 h first response) in Zammad/Chatwoot.
4. Export weekly: `refflow.py export ... csv` or the app's report export; check rows = tickets in the period.

## Edge cases

- A solved ticket can be reopened; a closed one cannot (create a follow-up).
- SLA counts wall-clock hours; business-hours SLAs need a calendar.

## Don'ts

- Don't put customer phone numbers or emails in exports that leave the desk.
- Don't skip states (open -> closed); the audit trail needs them.

## Check

`lp pack check helpdesk-and-support/ticket-flow` runs outcome/checks.yaml.



---

Canonical URL: https://logicpacks.io/packs/helpdesk-and-support-public/ticket-flow

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
