Tickiti Intervention Integrator’s Guide
This article and the rest of the API documentation in this section are written for a technical audience — integrators and developers connecting external systems to Tickiti. Familiarity with HTTP, REST, JSON and bearer-token authentication is assumed.
1. Overview
Interventions are Tickiti’s building block for helpdesk and ticket workflow automation: they let an external system drive a structured, human-in-the-loop step inside a ticket.
1.1 What is an intervention?
An intervention in Tickiti is a ticket-based workflow step initiated by an external (remote) system. It creates a ticket in Tickiti that:
- Displays structured UI fields (defined in Tickiti, populated by the remote system’s data).
- Allows Tickiti staff to review / edit those fields and then accept (or otherwise act).
- Sends the final structured data back to the remote system via a remote epilog callback.
- Optionally records completion inside Tickiti and adds a “final” response on the ticket.
Think of interventions as: “remote system asks Tickiti to make a human decision, with a structured UI, and return a structured decision.”
1.2 When to use interventions
Typical examples:
- Discount request approval (remote commerce system asks staff to approve/adjust a discount).
- VAT / compliance checks (remote system wants staff to confirm a decision).
- Account details review (staff confirms or edits proposed values).
- Location or entitlement verification.
Interventions are most useful when:
- You need human decision-making / audit trail.
- You want the decision embedded in a ticket conversation.
- You need consistent UI + consistent remote callback behaviour.
2. User-facing workflow (high-level)
- Remote system detects an event that needs a human decision (e.g., “customer requested discount”).
- Remote system calls Tickiti Create Ticket API with an
interventionname +uid+databag. - Tickiti creates/opens a ticket and posts intervention template responses:
- A staff/private response (required):
{intervention}.private - An optional public response:
{intervention}.public - Tickiti staff open the ticket and see:
- the normal ticket thread
- an Intervention panel with structured fields (checkbox/text/labels/etc).
- Staff updates fields and “Send” (ticket update).
- Tickiti posts the ticket update and also dispatches the InterventionTicketEpilogJob containing the intervention payload + response_id.
- Tickiti calls the remote system epilog endpoint with a concise payload:
ticket_id,response_id,uid,intervention,action,data. - Remote system processes it and (optionally) responds with a
finalobject. - Tickiti marks the intervention payload as accepted/completed and optionally posts a final response rendered from
{intervention}.final.
3. Data model summary (Tickiti side)
3.1 Intervention definition (interventions table)
Each intervention is configured in Tickiti with:
name(unique identifier / contract name)title(display)queue_name(where created tickets land)- remote integration settings:
remote_enabledremote_nameremote_epilog_urlremote_bearer_tokenremote_timeout_seconds- notification flags:
notify_inbox_managersfma_inbox_managers
3.2 Intervention UI fields (intervention_fields)
Each intervention has a fixed set of UI fields with:
type:text|checkbox|label|hrname: field key (not used forlabel/hr)label: optional string, may contain token placeholderswidth_px: fortextfieldsrequired: validation intent (Tickiti currently treats this as schema-level metadata)ordinal: field ordering
Token placeholders in labels (resolved from the remote data bag):
- Labels support tokens like
<span class="font-mono">{{'{{currency}}'}}</span>which are resolved from the client data bag.
3.3 Intervention instances (intervention_payloads)
When an intervention ticket is created, Tickiti stores an InterventionPayload:
ticket_idname(intervention name)uid(remote unique identifier used to correlate)accepted(boolean)payload(JSON string, contains the remote data bag and remote settings as needed)
This record is what the UI loads and what the remote epilog job references.
4. Remote integration: high-level contract
A remote system must implement:
- Create intervention ticket (call Tickiti API)
- Epilog endpoint (receive acceptance/update decision from Tickiti)
Optionally:
3. Return a final payload to Tickiti to mark completion + add a final ticket response.
5. Step-by-step technical integration
5.1 Authentication
Tickiti uses a bearer token (Sanctum personal access token style) for API access.
- The remote system stores a token issued by Tickiti.
- Tickiti stores a remote token for calling the remote epilog endpoint (separately).
There are two directions:
A) Remote → Tickiti (creating tickets)
Remote calls Tickiti with:
Authorization: Bearer <tickiti_api_token>Idempotency-Key: <uuid>
Token abilities must include: create-ticket.
B) Tickiti → Remote (epilog callback)
Tickiti calls the remote epilog URL using:
Authorization: Bearer <remote_bearer_token>(stored per intervention)
5.2 Creating an intervention ticket (Remote → Tickiti)
Endpoint (example):
POST /api/create_ticket
Required headers:
Authorization: Bearer <token>Idempotency-Key: <string>
Body shape (intervention mode):
Notes:
interventionmust exist in Tickiti’sinterventionstable.- Tickiti requires
{intervention}.privatetemplate to exist (public is optional). uidis required for interventions and is used to dedupe/reopen the same intervention ticket if resent.- Remote should treat
uidas immutable and globally unique per intervention instance.
Response:
Tickiti returns { ok: true, data: {... used_intervention flags ...} }.
5.3 How Tickiti renders the intervention UI
The intervention UI is built from:
- InterventionFields schema (from DB) to decide what controls to show
- InterventionPayload JSON to provide the data bag and any label tokens
Flow:
- Ticket loads interventions via
Ticket::interventions(): - Finds unaccepted
InterventionPayloads - Loads the matching
Interventionand itsInterventionFields(ordered by ordinal) - Decodes JSON payload and attaches title, accepted flag, ticket_id
- Resolves label tokens:
{{token}}is replaced with values found inpayload.data
The Vue component (Intervention.vue) renders:
checkbox→ binds topayload.data[field.name]text→ binds topayload.data[field.name]label→ rendered label onlyhr→ divider
5.4 Submitting an intervention decision (Tickiti → Remote)
When a staff user posts a ticket update, the UI includes:
interventions: [...](array of intervention payload objects)- This is passed to
TicketUpdateController::update_actual.
At the end of update processing:
- Tickiti dispatches
InterventionTicketEpilogJobfor each submitted intervention. - The job composes an outbound payload and POSTs it to the intervention’s
remote_epilog_url.
Outbound epilog request payload
Tickiti sends something like:
Key points:
uidis the remote correlation id.datais the structured decision data bag (what the UI edited).response_ididentifies the Tickiti response that initiated the epilog call (useful for audit).
5.5 Remote epilog endpoint behaviour (what you must implement)
The remote system must implement an HTTP endpoint that:
- Verifies bearer token.
- Parses the payload.
- Locates the remote domain object using
uid(or uses additional keys insidedataif your design requires it). - Applies business rules.
- Returns HTTP 200 JSON.
- Optionally returns a
finalobject if Tickiti should mark completion and post a final message.
Minimum response:
Response with completion (final)
If you return a final object, Tickiti will:
- append audit text to the initiating Tickiti response
- mark the intervention payload as accepted/completed
- optionally render
{intervention}.finaltemplate into a new response
Example:
Tickiti expects:
ticket_iduidinterventionfinal.response_id(must match ticket + initiating response)final.ticket_audit(string appended to Tickiti response audit trail)
6. Configuring an intervention in Tickiti
Interventions are configured in the InterventionLibrary settings page:
- Create intervention:
name: contract name, used for templates{name}.private/public/finaltitlequeue_name- notification flags
- Define UI fields:
- Add/edit/reorder fields
- Choose field types
- Set labels, including tokens like
{{currency}} - Set width for text fields
- Configure remote interface:
remote_enabledremote_name(used when generating a token label)remote_epilog_urlremote_timeout_secondsremote_bearer_token(stored securely, never displayed)- Generate remote token (optional):
- Generates a new bearer token for the configured remote name
- Shows plaintext token once for copying
7. Templates used by interventions
Tickiti uses templates to render the ticket messages around the intervention:
{name}.private(required)- Staff-only content. Usually includes explanation, context, and may embed values from the data bag.
{name}.public(optional)- Public content shown to the requestor/customer. Often a sanitized summary.
{name}.final(optional)- Posted when the remote epilog returns
final. Typically confirms what happened.
Template binding:
- On create_ticket: Tickiti calls
setData($request->input('data'))for private/public. - On completion: Tickiti calls
setData(['final' => (array)$payload->final])for final.
This means:
- Private/public templates usually read from
data.*(remote bag). - Final template usually reads from
final.*.
8. Operational guidance and best practices
- Use idempotency: Always send
Idempotency-Keyon create_ticket so retries do not create duplicate tickets. - Stable UID: Your
uidshould be stable and unique for the intervention instance. Use it as your primary correlation key. - Keep the data bag minimal: Include only what Tickiti needs to render and what you need back on acceptance.
- Treat Tickiti as the UI/audit system: The remote system remains the source of truth for domain state.
- Return meaningful
final.ticket_audit: This becomes part of the ticket record and is helpful for staff.
9. Quick reference
Required on Tickiti
- Intervention exists in DB
- Fields exist for UI
{name}.privatetemplate exists- Remote config set if remote callback required
Required on Remote
- API token to call Tickiti
create_ticket - Epilog endpoint that accepts Tickiti callback
- Correlation by
uid