Skip to main content
When a user submits an application, fills out a form, or triggers an action in your app, you can automatically create a support ticket in Halo — no manual intervention required. This guide walks through the recommended approaches from simplest to most flexible.

How Ticket Creation Works

Halo creates tickets through the AI chat pipeline. When you send a message to the chat API with the right context, the AI agent evaluates the request and creates a ticket when it detects an issue that needs human follow-up. There are two approaches: Both approaches use the same Chat API endpoint and benefit from the full AI pipeline — the ticket includes conversation context, user data, and company information automatically.

Prerequisites

  • A HaloAgents widget key (ab_live_...) — copy yours from Setup > Install in the dashboard
  • An agent with ticket escalation enabled (configure in AI Agents > [Your Agent] > Actions > Ticket Escalation)
  • Optionally, an Identity Secret (ha_secret_...) if you use identity verification
The widget key is publishable and safe in your install snippet. For server-side REST calls in this guide, call from your backend and enable identity verification when scoping by user_id.

Approach 1: Chat API with Context

This is the recommended approach. Send the form/application data as structured context alongside a chat message describing the request. The AI agent triages the submission and creates a ticket with full context attached.

Step 1: Identify the User

Before sending the submission, make sure the user exists in Halo. Call the identify endpoint so the ticket is linked to the right person:
If the user already exists, their record is updated. If they’re new, they’re created.

Step 2: Send the Submission as a Chat Message

Use the Chat API to send the submission data. Pass the form fields as context entries so the AI (and your team) can see exactly what was submitted:
The AI agent processes the message, sees the application context, and — if escalation is enabled — creates a ticket that includes all the submitted data.

What Happens Next

  1. The AI creates a ticket with the application details in the metadata
  2. Your team sees the ticket in the Halo dashboard with the full submission
  3. If Slack notifications are configured, your team gets notified immediately
  4. The AI responds with a confirmation (returned in the text field)
  5. You can store the session_id to send follow-up messages to the same conversation

Approach 2: Chat API with Forced Escalation

If you want a ticket created every time (no AI triage), phrase the message to explicitly request human follow-up. The AI recognizes escalation intent and creates a ticket immediately:
Phrases like “please create a support ticket”, “I need human help”, or “please escalate this” trigger the AI’s escalation logic, which creates a ticket and routes it to your team.

Full Integration Example

Here’s a complete example of handling a form submission in a Next.js API route and automatically creating a ticket in Halo:

Using Webhooks from Other Systems

If you receive webhooks from external systems (Stripe, HubSpot, your own app, etc.), you can forward them to Halo the same way:

Configuring Ticket Behavior

Escalation Settings

The AI’s ticket creation behavior is controlled by your agent’s escalation settings. Configure these in the dashboard under AI Agents > [Your Agent] > Actions > Ticket Escalation:

Ticket Consolidation

If a user already has an open ticket, new escalations are merged into the existing ticket instead of creating duplicates. This keeps your inbox clean when the same user submits multiple requests.

Notifications

When a ticket is created, Halo can notify your team via:
  • Slack — instant notifications in your configured channel
  • Email — notification emails to assigned team members
  • Dashboard — real-time updates in the Halo inbox

Context Types for Submissions

Use context entries to structure submission data so it’s readable by both the AI and your team. Here are common patterns:

Application / Form Submission

Support Request

Feature Request

Order / Transaction


Checking Ticket Status

After a ticket is created, you can view it in the Halo dashboard. The ticket includes:
  • The original submission message
  • All structured context data from the request
  • User and company information
  • The AI’s triage notes and conversation history
  • Priority status (based on your escalation filters)
Tickets created through the chat API appear in your Halo inbox just like any other ticket. Your team can respond, reassign, snooze, or resolve them using the standard workflow.

Next Steps

Chat API Reference

Full reference for the chat endpoint used to create tickets.

Context Entries

Learn about all context types for structuring submission data.

Identify Users

API reference for creating and updating user records.

Identify Companies

API reference for creating and updating company records.