Developer Handover Pack
Everything needed to build the automation from scratch: current state, full agent specs, data flow, and the build stack.
Developer Handover Pack
IT Helpdesk Request Handling
[YourCompany.com] · IT Department · Prepared by FullSpec · [Today's Date]
This document provides the complete technical specification for the IT Helpdesk Request Handling automation. It covers the current-state process map, all three agent specifications with IO contracts, the end-to-end data flow, and the recommended build stack. The FullSpec team uses this pack to configure, wire, and test every component. Your team's role during this phase is to provide API credentials, confirm SLA thresholds, and supply historical ticket data for triage tuning.
01Process snapshot
02Agent specifications
Reads the raw text of each incoming IT support request and applies a structured classification and priority score. The agent evaluates category keywords (hardware, software, access, general) and severity signals (business impact phrases, user count, affected system type) to assign a category and a P1 to P4 priority tier without any human input. It then creates a fully pre-filled ticket in Freshdesk so no manual data entry is required. Estimated build time: 16 hours. Complexity: Complex.
// Input request_text: string // raw body from email, form, or Slack message requester_email: string // sender address from Gmail or Slack user profile requester_name: string // display name resolved from Slack or Gmail header source_channel: enum // 'email' | 'slack' | 'form' received_at: ISO8601 // timestamp of original submission // Classification logic category: enum // 'hardware' | 'software' | 'access' | 'general' priority: enum // 'P1' | 'P2' | 'P3' | 'P4' confidence_score: float // 0.0–1.0; tickets below 0.7 flagged for IT Manager review // Output freshdesk_ticket_id: string // e.g. 'TKT-00412' freshdesk_ticket_url: string // direct link to the created ticket category: enum // confirmed category written to Freshdesk custom field priority: enum // P1–P4 written to Freshdesk priority field status: 'open' // ticket status on creation
- Freshdesk tier must be Growth or above to enable custom ticket fields and the API v2 endpoint for programmatic ticket creation. Confirm the active plan before build starts.
- The category classification ruleset must be seeded with a minimum of two to three weeks of historical ticket data (at least 60 labelled examples) before go-live to achieve the 92% target accuracy KPI.
- The confidence_score threshold of 0.70 must be configurable via an environment variable so the IT Manager can raise or lower it without a code change.
- If source_channel is 'email', the Gmail API watch subscription must be scoped to the shared inbox label only (not the full mailbox). OAuth scope required: https://www.googleapis.com/auth/gmail.readonly.
- Deduplication: if two submissions arrive within 10 minutes from the same requester_email with identical category classification, the second is merged into the first ticket as a note rather than creating a new record.
- If the Freshdesk API returns a non-2xx response, the automation platform must log the failure to the error table and send a Slack alert to the IT Manager channel before halting the workflow for that request.
- Confirm with the IT Manager that Slack slash command intake (/it-request) is enabled in the relevant workspace and that the app has bot token scopes: commands, users:read, chat:write.
Triggered the moment the Triage and Priority Agent creates a classified ticket in Freshdesk. The agent queries the Freshdesk API to retrieve each technician's current open ticket count and assigns the new ticket to the technician with the lowest open count who is tagged for the relevant category. It then fires two Slack messages: one to the requester confirming their ticket details, and one to the assigned technician with a summary and a direct Freshdesk link. Estimated build time: 10 hours. Complexity: Moderate.
// Input
freshdesk_ticket_id: string // from Triage and Priority Agent output
category: enum // 'hardware' | 'software' | 'access' | 'general'
priority: enum // P1–P4
requester_email: string
requester_name: string
// Assignment logic
technician_pool: array // filtered by category skill tag in Freshdesk
open_ticket_counts: map // { technician_id: integer } from Freshdesk API
assigned_technician_id: string // technician with lowest open count in pool
// Output
freshdesk_ticket_id: string // ticket updated with assignee
assigned_technician_name: string
assigned_technician_slack_id: string
requester_slack_dm_ts: string // Slack message timestamp for requester DM
technician_slack_dm_ts: string // Slack message timestamp for technician DM
// On tie in workload
// If two technicians share the lowest open count, assign to the one
// whose last assignment timestamp is older (round-robin fallback).- The technician roster in Freshdesk must have skill/category tags applied to each agent profile before this agent can filter correctly. Confirm tagging is complete before the Assignment and Notification Agent build begins.
- Slack user IDs for all technicians must be pre-mapped to their Freshdesk agent IDs in a lookup table stored in the automation platform's credential store. This mapping must be updated whenever a technician is added or removed.
- If all technicians in the relevant category pool are at or above a configurable overload threshold (default: 10 open tickets), the agent must assign the ticket to the IT Manager and send an overload alert to the IT Manager Slack channel rather than picking a saturated technician.
- The requester Slack DM must include: ticket number, category, priority, assigned technician name, and a plain-language estimated response time derived from the SLA configuration.
- The technician Slack DM must include: ticket number, one-line request summary, priority badge, and a direct URL to the Freshdesk ticket.
- Slack chat.postMessage requires the bot token scope chat:write and the Slack app must be invited to any private channels used for IT Manager alerts.
Runs on two separate triggers. First, it polls open P1 and P2 Freshdesk tickets on a scheduled interval and fires a PagerDuty alert when any P1 or P2 ticket has exceeded its SLA response window without a status change. Second, it listens for the Freshdesk ticket.resolved webhook event and writes a structured resolution entry to the Notion knowledge base, including the category, resolution summary, and fix steps. Estimated build time: 12 hours. Complexity: Moderate.
// Input (SLA breach path)
freshdesk_ticket_id: string
priority: 'P1' | 'P2'
created_at: ISO8601
last_updated_at: ISO8601
sla_response_due_at: ISO8601 // from Freshdesk SLA policy field
current_status: string // 'open' | 'pending'
// Output (SLA breach path)
pagerduty_event_action: 'trigger'
pagerduty_severity: 'critical' | 'error' // P1 -> critical, P2 -> error
pagerduty_summary: string // 'P1 ticket TKT-00412 breached SLA by 47 min'
pagerduty_dedup_key: string // freshdesk_ticket_id to prevent duplicate alerts
// Input (resolution path)
freshdesk_ticket_id: string
category: enum
resolution_notes: string // technician notes from Freshdesk ticket body
resolved_by: string // technician name
resolved_at: ISO8601
// Output (resolution path)
notion_page_id: string // newly created knowledge base entry
notion_page_url: string
kb_entry: {
category: enum,
issue_summary: string, // first 200 chars of original request
resolution_steps: string, // extracted or summarised from resolution_notes
resolved_by: string,
resolved_at: ISO8601
}- PagerDuty must have a dedicated IT Helpdesk Escalation service configured with a routing key before the agent is wired. The routing key is stored as an environment variable in the automation platform credential store.
- The dedup_key in PagerDuty events must be set to the Freshdesk ticket ID so that repeated 15-minute poll cycles do not generate duplicate pages for the same stalled ticket.
- SLA thresholds (P1: 1 hour, P2: 4 hours by default) must be confirmed with the IT Manager and entered as environment variables, not hardcoded, so they can be adjusted for business-hours-only coverage.
- PagerDuty alert suppression must be configured for out-of-hours periods if the team does not operate a 24/7 on-call rota. Confirm on-call schedule configuration with the IT Manager before go-live.
- The Notion knowledge base database must have the following properties created before build: Category (select), Issue Summary (title), Resolution Steps (rich text), Resolved By (text), Resolved At (date). The database ID must be stored in the credential store.
- The Notion integration token must have insert access to the target database. It must not have read access to any other Notion workspace content. Use a dedicated Notion internal integration scoped to the knowledge base page only.
- If the resolution_notes field in Freshdesk is empty when the ticket is marked resolved, the agent must write a placeholder entry ('No resolution notes recorded') and send a Slack prompt to the resolving technician asking them to add notes within 24 hours.
03End-to-end data flow
// ─── TRIGGER ───────────────────────────────────────────────────────────────
// An employee submits an IT support request via one of three channels.
SOURCE: Google Workspace shared inbox -> Gmail API watch (push notification)
fields: message_id, from_email, subject, body_text, received_at
SOURCE: Slack slash command (/it-request) -> Slack Events API callback
fields: user_id, user_email, command_text, team_id, received_at
SOURCE: Web intake form -> webhook POST to automation platform endpoint
fields: requester_name, requester_email, issue_description, submitted_at
// Normalise all three sources to a shared payload before passing to Agent 1:
normalised_request: {
request_text: string,
requester_email: string,
requester_name: string,
source_channel: 'email' | 'slack' | 'form',
received_at: ISO8601
}
// ─── AGENT 1: Triage and Priority Agent ───────────────────────────────────
// Input: normalised_request
STEP 1.1 Deduplication check
lookup: requester_email + category match within past 10 minutes
if duplicate -> merge as note on existing ticket, halt workflow
else -> proceed
STEP 1.2 Category classification
keyword matching + severity signal scoring against category ruleset
output: category ('hardware' | 'software' | 'access' | 'general')
confidence_score (0.0–1.0)
if confidence_score < 0.70 -> flag ticket for IT Manager review
STEP 1.3 Priority assignment
P1: system down, multiple users affected, business-critical service
P2: single user blocked, core tool unavailable
P3: degraded performance, workaround available
P4: general query, non-urgent request
output: priority ('P1' | 'P2' | 'P3' | 'P4')
STEP 1.4 Freshdesk ticket creation
POST /api/v2/tickets
payload: { subject, description, email, category (custom_field),
priority, source, status: 'open', tags: [source_channel] }
output: freshdesk_ticket_id, freshdesk_ticket_url
// ─── HANDOFF: Agent 1 -> Agent 2 ──────────────────────────────────────────
// Freshdesk fires ticket.created webhook to automation platform endpoint.
// Payload passed forward:
// freshdesk_ticket_id, category, priority,
// requester_email, requester_name, freshdesk_ticket_url
// ─── AGENT 2: Assignment and Notification Agent ───────────────────────────
// Input: freshdesk_ticket_id, category, priority, requester_email, requester_name
STEP 2.1 Query technician workload
GET /api/v2/tickets?filter=open&assignee_id={id} for each technician in pool
filter pool by category skill tag
output: open_ticket_counts map { technician_id: integer }
STEP 2.2 Assignment logic
select technician with lowest open_ticket_count in category pool
tie-break: oldest last_assignment_timestamp (round-robin)
if all technicians >= overload_threshold (default 10) -> assign to IT Manager
PUT /api/v2/tickets/{freshdesk_ticket_id} { responder_id: assigned_technician_id }
output: assigned_technician_id, assigned_technician_name, assigned_technician_slack_id
STEP 2.3 Notify requester via Slack DM
Slack API: chat.postMessage { channel: requester_slack_id }
message fields: ticket_number, category, priority, assigned_technician_name,
estimated_response_time (derived from SLA config)
output: requester_slack_dm_ts
STEP 2.4 Alert technician via Slack DM
Slack API: chat.postMessage { channel: assigned_technician_slack_id }
message fields: ticket_number, issue_summary (first 200 chars),
priority, freshdesk_ticket_url
output: technician_slack_dm_ts
// ─── PARALLEL BRANCH: SLA MONITORING (Agent 3, path A) ───────────────────
// Scheduled poll every 15 minutes. Runs independently of Agent 2 completion.
STEP 3A.1 Query open P1/P2 tickets
GET /api/v2/tickets?filter=open&priority=1 (P1)
GET /api/v2/tickets?filter=open&priority=2 (P2)
output: list of { freshdesk_ticket_id, created_at, sla_response_due_at,
last_updated_at, current_status }
STEP 3A.2 SLA breach check
for each ticket: if now() > sla_response_due_at and status in ('open','pending')
-> breach confirmed
STEP 3A.3 PagerDuty escalation
POST https://events.pagerduty.com/v2/enqueue
payload: { routing_key, event_action: 'trigger',
dedup_key: freshdesk_ticket_id,
severity: P1->'critical' / P2->'error',
summary: 'P{n} ticket {id} breached SLA by {elapsed} min' }
output: pagerduty_dedup_key (stored to prevent re-alert on next poll cycle)
// ─── EVENT BRANCH: RESOLUTION (Agent 3, path B) ──────────────────────────
// Triggered by Freshdesk ticket.resolved webhook.
STEP 3B.1 Receive resolution event
fields: freshdesk_ticket_id, category, resolution_notes, resolved_by,
resolved_at
if resolution_notes is empty -> write placeholder + send Slack prompt
to resolved_by technician
STEP 3B.2 Write Notion knowledge base entry
POST https://api.notion.com/v1/pages
parent: { database_id: KB_DATABASE_ID }
properties: {
'Category': { select: { name: category } },
'Issue Summary': { title: [{ text: { content: issue_summary } }] },
'Resolution Steps': { rich_text: [{ text: { content: resolution_steps } }] },
'Resolved By': { rich_text: [{ text: { content: resolved_by } }] },
'Resolved At': { date: { start: resolved_at } }
}
output: notion_page_id, notion_page_url
// ─── END OF FLOW ──────────────────────────────────────────────────────────04Recommended build stack
More documents for this process
Every document generated for IT Helpdesk Request Handling.