# Dictionary — ticket_support_effort

This document defines the source's objects and fields. It publishes meaning and method, not observed production values.

## Authority and boundary

- **Semantic owner:** EDU Support Analytics (edu-support-analytics)
- **Data owner:** csaiautomations-portal
- **Boundary:** composite — Two native tables in two databases behind one multidb wire: work_events (Cssurvey.star_deliveries) and tickets (Kayako.cases). The source publishes their meaning; it does not return a pre-joined analytical row.
- **Transformations:** Transport only. The join between work_events.unit and tickets.caseid is performed by the reader; no computed effort metrics are returned as source fields. Every published field is source-captured (genesis 'captured'): written by the operational store — the Kayako case record and the STAR delivery log — at ticket/event time, never user-entered or derived in this layer. duration_seconds is timer-clocked, and the work_events ledger is effectively append-only (see its trap and the rate limitations).
- **Freshness:** Both tables are live operational stores. The manual-effort rate is right-censored: a window's worked-ticket count keeps filling for weeks after the tickets were created.

## Object: `tickets`

The native Kayako ticket record and its lifecycle state (table: cases).

**Grain:** One row per EDU support ticket.

| Field | Type | Genesis | Meaning | Nullable | Allowable values | Sensitivity | Invariants |
|---|---|---|---|---|---|---|---|
| `caseid` | integer | captured | Stable ticket identifier assigned by the source. Join key to work_events.unit — but note the type mismatch trap on that relationship. | no | — | internal | — |
| `subject` | string | captured | Requester-supplied ticket subject. Free text, never a governed topic label; do not classify from it. Null = no subject recorded on the ticket. | yes | — | person-bearing | — |
| `createdat` | unix epoch integer (seconds) | captured | Time the ticket was created. Filter with UNIX_TIMESTAMP('YYYY-MM-DD') and display with FROM_UNIXTIME(); a string-literal comparison returns garbage. | no | — | internal | — |
| `requesterid` | integer | captured | Identifier of who filed the ticket. Automated-side tickets are filed under automation requester accounts. It can resolve to a personal address via a separate identity store, but that resolution is out of scope for this source — treat requesterid as person-linked, not a lookup this layer offers. Null = no requester identity recorded (unattributed origin). | yes | — | person-bearing | — |
| `caseformid` | integer enum | captured | The form the ticket was filed under; carries the EDU scope predicate. | no | 53, 6 | internal | EDU scope = caseformid IN (53, 6): 53 is EDU Support, 6 is 2hr Learning Support. |
| `casestatusid` | integer enum | captured | Current lifecycle state of the ticket. | no | 1, 2, 3, 4, 5, 6 | internal | Resolved / terminal = casestatusid IN (4,5) (4 completed, 5 closed). In-flight = 1 new, 2 open, 3 pending, 6 hold. A ticket with zero logged agent time is automated only when resolved; in-flight zero-time is indeterminate and may simply be unworked. |

### Relationships

- `caseid` → `work_events.unit` (one-to-many): A ticket has zero or more recorded work events. Zero events together with a resolved status is the zero-touch / automated case.

### Known traps

- subject is free text; never treat it as a governed classification.
- createdat is a unix epoch integer, not a string — the wrong comparison style silently returns garbage.
- A ticket with no work_events is not automatically automated; it may be in-flight or unworked. Zero agent time counts as automated only when casestatusid IN (4,5).

## Object: `work_events`

The manual-work ledger: source-captured evidence that a human logged handling time against a ticket (table: star_deliveries).

**Grain:** One row per recorded agent work event (a person spending measured time on a ticket).

| Field | Type | Genesis | Meaning | Nullable | Allowable values | Sensitivity | Invariants |
|---|---|---|---|---|---|---|---|
| `unit` | string | captured | Ticket id this work event belongs to; join key to tickets.caseid. Stored as a string here while caseid is an integer — cast one side in an app-layer join. | no | — | internal | — |
| `ic` | string | captured | Identity handle of the agent who logged the time. The presence of a row attributes human effort to the ticket; group by it for hours per agent. | no | — | person-bearing | — |
| `duration_seconds` | integer | captured | Seconds the agent spent on the event — clock-measured: it equals date_end_delivery minus date_start_delivery exactly (verified: exact match on 100% of records), i.e. a timer on the work event, not a self-entered estimate. Divide by 3600 for hours; sum over the human roles for total effort. No enforced upper bound — an unusually large value (a multi-hour, top-of-the-tail event) can be a timer left running, so treat the extreme tail as suspect when ranking the most-expensive work. | no | — | internal | — |
| `unit_type` | string enum | captured | The agent role / event kind. An open operational enum with dozens of values across teams and event types (e.g. training, DevOps, Finance, notion); only L1, L2, and MS — the three human EDU-support roles (L1/L2 support tiers plus MS, a third support role) — count as manual work, and every other value is excluded from the effort measure. The full set is not enumerated here because it is an open operational list owned by the source, not a governed dimension. | no | — | internal | Manual work = a ticket carrying rows where unit_type IN ('L1','L2','MS') AND duration_seconds > 0. |
| `product` | string | captured | Product scope of the delivery. Filter product = 'edu' to scope to education. | no | — | internal | — |
| `date_end_delivery` | ISO 8601 datetime string | captured | When the work event ended; the time anchor for 'work logged in a window'. Compare with string date literals, not epoch — the opposite of tickets.createdat. There is no separate row-insertion timestamp — this work-end time is the only landing anchor, and a ticket's rows accrue over the span its work covers (see the rate's right-censoring). | no | — | internal | — |
| `event_type` | string | captured | Kind of delivery event (work starts plus lifecycle markers). Summing duration_seconds over the human unit_types is the safe effort measure and sidesteps this nuance. Null = event kind not recorded. | yes | — | internal | — |

### Relationships

- `unit` → `tickets.caseid` (many-to-one): Each work event belongs to exactly one ticket.

### Known traps

- unit is a string while tickets.caseid is an integer — cast one side in an app-layer join or the merge silently yields zero matches (inside a SQL IN(...) list it coerces fine).
- STAR-logged time under-counts human involvement: a non-STAR human who helps logs no time here. An actor-level bot/human classification off the ticket record catches them; the size of that gap is not asserted here — it is re-measurable by comparing the STAR-worked set against that actor classification over the same window (the actor classification is a separate construction).
- date_end_delivery is an ISO datetime string while tickets.createdat is a unix epoch integer — they take opposite comparison styles.

## Route-away rules

- **What topics or categories are these tickets about?** Route to The EDU weekly ticket-classification layer (ask the EDU analytics owner). Topic is a judged label, not derivable from these two tables at a reliable grain; a subject keyword split lands a large share in 'other' and must not be produced here.
- **What did this support work cost?** Route to The cost / unit-economics source, owned separately — ask the EDU analytics owner (owner.semanticContact) for the current pointer. Compensation and per-ticket cost are not owned here. This source measures effort in time, never money.
- **Which actors (bots vs humans) touched a ticket?** Route to The actor-level bot/human classification over the ticket store — a separate construction; ask the EDU analytics owner (owner.semanticContact) for the pointer. STAR-logged time is the effort ledger, not the actor census; the richer bot/human signal is a separate construction over the ticket store.
