AgentSkillsCN

Tickets

当您需要管理HaloPSA工单时,可使用此技能:创建、更新、搜索或管理服务台相关业务。本技能覆盖工单字段、状态、优先级、工单类型、行动方案、附件、SLA协议以及工作流自动化,是MSP技术人员通过HaloPSA高效处理服务交付的必备工具。

SKILL.md
--- frontmatter
description: >
  Use this skill when working with HaloPSA tickets - creating, updating,
  searching, or managing service desk operations. Covers ticket fields,
  statuses, priorities, ticket types, actions, attachments, SLAs, and workflows.
  Essential for MSP technicians handling service delivery through HaloPSA.
triggers:
  - halopsa ticket
  - halo ticket
  - service ticket halopsa
  - create ticket halopsa
  - ticket status halo
  - ticket priority halo
  - halopsa service desk
  - halo helpdesk
  - ticket actions
  - ticket notes halopsa
  - halopsa sla

HaloPSA Ticket Management

Overview

Tickets are the core unit of service delivery in HaloPSA. Every client request, incident, problem, service request, and change flows through the ticketing system. This skill covers comprehensive ticket management including creation, updates, actions (notes), attachments, SLAs, and workflows.

Ticket Status Codes

HaloPSA uses configurable status IDs. These are common default values:

Status IDNameDescriptionBehavior
1NewNewly created ticketSLA clock starts
2In ProgressActively being workedResource assigned
3PendingWaiting for actionMay pause SLA
4On HoldTemporarily pausedSLA clock paused
5Waiting on ClientAwaiting customer responseSLA clock paused
6Waiting on Third PartyAwaiting vendor responseSLA clock paused
8ResolvedIssue fixed, awaiting closure-
9ClosedTicket completeSLA clock stopped

Note: Status IDs are configurable per instance. Query /api/Status to get your instance's values.

Status Transition Flow

code
NEW (1) ──────────────────────────────> CLOSED (9)
   │                                        ↑
   ↓                                        │
IN PROGRESS (2) ──────────────────────────>─┤
   │         │                              │
   │         ↓                              │
   │    PENDING (3) ──────────────────────>─┤
   │         │                              │
   │         ↓                              │
   │    WAITING ON CLIENT (5) ────────────>─┤
   │                                        │
   ↓                                        │
RESOLVED (8) ─────────────────────────────>─┘

Ticket Priority Levels

Priority IDNameResponse SLAResolution SLABusiness Context
1Critical15 min1 hourComplete business outage
2High1 hour4 hoursMajor productivity impact
3Medium4 hours8 hoursSingle user/workaround exists
4Low8 hours24 hoursMinor issue/enhancement

Note: Priority IDs and SLA times are configurable per instance.

Complete Ticket Field Reference

Core Fields

FieldTypeRequiredDescription
idintSystemAuto-generated unique identifier
summarystring(255)YesBrief issue summary/title
detailstextNoDetailed description (HTML supported)
client_idintYesClient/customer reference
site_idintNoSite/location within client
user_idintNoEnd user/contact for ticket

Classification Fields

FieldTypeRequiredDescription
status_idintYesCurrent status
priority_idintYesUrgency level
tickettype_idintYesTicket type (Incident, Request, etc.)
category_1stringNoPrimary category
category_2stringNoSub-category
category_3stringNoTertiary category
category_4stringNoFourth-level category

Assignment Fields

FieldTypeRequiredDescription
agent_idintNoAssigned technician
team_idintNoAssigned team/group
reportedbystringNoWho reported the issue

Timeline Fields

FieldTypeRequiredDescription
dateoccurreddatetimeNoWhen issue occurred
datecreateddatetimeSystemWhen ticket was created
daterespondeddatetimeSystemFirst response timestamp
dateresolveddatetimeSystemResolution timestamp
datecloseddatetimeSystemClosure timestamp
deadlinedatedatetimeNoSLA deadline

SLA Fields

FieldTypeRequiredDescription
sla_idintNoAssociated SLA
slaresponsestateintSystemResponse SLA state
slaresolutionstateintSystemResolution SLA state
slaholdboolNoIs SLA paused

Contract & Billing Fields

FieldTypeRequiredDescription
contract_idintNoAssociated contract
opportunityidintNoLinked opportunity
chargeabletimedecimalSystemTotal billable time
nonchargeabletimedecimalSystemTotal non-billable time

API Patterns

Creating a Ticket

http
POST /api/Tickets
Authorization: Bearer {token}
Content-Type: application/json
json
[
  {
    "summary": "Unable to access email - multiple users affected",
    "details": "<p>Sales team (5 users) reporting Outlook showing disconnected since 9am.</p><p>Webmail working fine.</p>",
    "client_id": 123,
    "site_id": 456,
    "user_id": 789,
    "tickettype_id": 1,
    "status_id": 1,
    "priority_id": 2,
    "category_1": "Email",
    "category_2": "Outlook",
    "agent_id": 101,
    "team_id": 5
  }
]

Note: HaloPSA expects an array, even for single tickets.

Response

json
{
  "tickets": [
    {
      "id": 54321,
      "summary": "Unable to access email - multiple users affected",
      "client_id": 123,
      "client_name": "Acme Corporation",
      "status_id": 1,
      "status_name": "New",
      "priority_id": 2,
      "priority_name": "High",
      "datecreated": "2024-02-15T09:23:00Z"
    }
  ]
}

Searching Tickets

Basic search:

http
GET /api/Tickets?client_id=123&status_id=1

Open tickets for client:

http
GET /api/Tickets?client_id=123&open_only=true

Search by text:

http
GET /api/Tickets?search=email%20not%20working

Date range:

http
GET /api/Tickets?dateoccurred_start=2024-02-01&dateoccurred_end=2024-02-29

Paginated results:

http
GET /api/Tickets?page_no=1&page_size=50&order=datecreated&orderdesc=true

Getting a Single Ticket

http
GET /api/Tickets/54321

With related data:

http
GET /api/Tickets/54321?includedetails=true&includeactions=true

Updating a Ticket

http
POST /api/Tickets
Authorization: Bearer {token}
Content-Type: application/json

Update status:

json
[
  {
    "id": 54321,
    "status_id": 2,
    "agent_id": 101
  }
]

Resolve ticket:

json
[
  {
    "id": 54321,
    "status_id": 8,
    "resolution": "Cleared Outlook cache and repaired Office installation."
  }
]

Actions (Notes/Updates)

Actions are the activity log for a ticket - notes, time entries, emails, and status changes.

Action Types

Type IDNameDescription
0NoteInternal note
1EmailEmail correspondence
2Phone CallPhone call log
3Site VisitOn-site visit
4Status ChangeStatus transition

Adding an Action

http
POST /api/Actions
Authorization: Bearer {token}
Content-Type: application/json

Internal note:

json
[
  {
    "ticket_id": 54321,
    "note": "<p>Initial triage: Issue started after KB5034441 update.</p>",
    "outcome": "Investigation",
    "actiontype_id": 0,
    "hiddenfromuser": true
  }
]

Client-visible note:

json
[
  {
    "ticket_id": 54321,
    "note": "<p>We've identified the cause. A technician is working on the fix.</p>",
    "outcome": "Customer Update",
    "actiontype_id": 0,
    "hiddenfromuser": false,
    "emailto": "john.smith@acme.com"
  }
]

Time entry:

json
[
  {
    "ticket_id": 54321,
    "note": "<p>Troubleshooting email connectivity issue.</p>",
    "timetaken": 30,
    "charge": true,
    "actiontype_id": 0,
    "agent_id": 101
  }
]

Getting Ticket Actions

http
GET /api/Actions?ticket_id=54321

Attachments

Uploading an Attachment

http
POST /api/Attachment
Authorization: Bearer {token}
Content-Type: multipart/form-data

Form data:

  • file: The file to upload
  • ticket_id: Associated ticket ID
  • isimage: true/false
  • filename: Original filename

Listing Attachments

http
GET /api/Attachment?ticket_id=54321

Response

json
{
  "attachments": [
    {
      "id": 111,
      "filename": "screenshot.png",
      "contenttype": "image/png",
      "filesize": 145678,
      "datecreated": "2024-02-15T09:30:00Z"
    }
  ]
}

SLA Calculations

SLA States

StateDescription
0Not Started
1Running
2Paused
3Met
4Breached

SLA Logic

javascript
function calculateSLAStatus(ticket) {
  const now = new Date();
  const deadline = new Date(ticket.deadlinedate);

  if (ticket.status_id === 9) {
    // Closed - check if met deadline
    const resolved = new Date(ticket.dateresolved);
    return resolved <= deadline ? 'Met' : 'Breached';
  }

  if (ticket.slahold) {
    return 'Paused';
  }

  if (now > deadline) {
    return 'Breached';
  }

  const hoursRemaining = (deadline - now) / (1000 * 60 * 60);
  if (hoursRemaining < 1) {
    return 'At Risk';
  }

  return 'On Track';
}

Common Workflows

Ticket Creation Flow

  1. Validate client exists and has active contract
  2. Check for duplicates - search open tickets with similar summary
  3. Auto-set defaults:
    • Status -> New (1)
    • Priority -> Medium (3) if not specified
  4. Calculate SLA based on priority and contract
  5. Route to team based on category or client settings
  6. Send acknowledgment to end user

Status Transition Validation

javascript
function validateStatusTransition(currentStatus, newStatus, ticket) {
  const errors = [];
  const warnings = [];

  switch (newStatus) {
    case 8: // Resolved
    case 9: // Closed
      if (!ticket.resolution) {
        errors.push('Resolution is required');
      }
      if (currentStatus === 1) {
        warnings.push('Closing without In Progress step');
      }
      break;

    case 2: // In Progress
      if (!ticket.agent_id) {
        warnings.push('No agent assigned');
      }
      break;
  }

  return {
    canTransition: errors.length === 0,
    errors,
    warnings
  };
}

Escalation Workflow

  1. Identify at-risk tickets - SLA approaching or breached
  2. Reassign to senior tech or escalation team
  3. Update priority if needed
  4. Add action documenting escalation reason
  5. Notify manager via email action

Error Handling

Common API Errors

CodeMessageResolution
400Invalid field valueVerify picklist IDs for your instance
400Client ID requiredAll tickets need a client
401UnauthorizedRefresh OAuth token
403Insufficient permissionsCheck API application permissions
404Ticket not foundConfirm ticket ID exists
429Rate limitedImplement exponential backoff

Validation Errors

ErrorCauseFix
client_id requiredMissing clientAll tickets need a client
tickettype_id invalidUnknown typeQuery /api/TicketType for valid IDs
status_id invalidUnknown statusQuery /api/Status for valid IDs
priority_id invalidUnknown priorityQuery /api/Priority for valid IDs

Best Practices

  1. Validate before creating - Search for duplicates, verify client
  2. Use descriptive summaries - Include who's affected and symptoms
  3. Set accurate priority - Use impact/urgency matrix
  4. Log time promptly - Add time entries as work happens
  5. Update status accurately - Keeps queues accurate for reporting
  6. Document thoroughly - Future technicians will thank you
  7. Use hidden notes for technical details - Keep client notes professional
  8. Monitor SLAs - Address at-risk tickets proactively

Related Skills