Overview
Automatically create Zendesk support tickets when conversations need human attention, seamlessly integrating AI support with your existing ticketing system.Video Walkthrough
Requirements
- Active Zendesk account
- Zendesk integration connected (see Integration Setup below)
- API token with ticket creation permissions
- Appropriate support group assignments
Setup Instructions
Step 1: Connect Zendesk Integration
Zendesk Integration
Connect your Zendesk account first
Step 2: Create Escalation Path
- Navigate to Agents → Your Agent → Escalations
- Click “Create Escalation Path”
- Fill in the basic information:
- Name: Descriptive name (e.g., “Zendesk Support Tickets”)
- Platform: Select “Zendesk”
- Platform Integration: Choose your connected Zendesk account
Step 3: Configure Zendesk Settings
Configure ticket creation settings:- Default Priority: normal, low, high, or urgent
- Default Type: question, incident, problem, or task
- Tags (optional): Auto-apply tags (e.g., “ai-escalation”, “chatbot”)
- Group ID (optional): Assign to specific support group
- Subject Template (optional): Custom ticket subject format
Step 4: Save Configuration
Click “Save” to create the escalation path.Step 5: Configure Webhook (Required for Agent Replies)
After saving the escalation path, a Webhook Configuration section appears with a webhook URL and signature token. You must configure this webhook in Zendesk so that agent replies are routed back to the customer.- In Zendesk, go to Admin Center → Apps and integrations → Webhooks
- Click “Create webhook”
- Set the events as “Comment Created” and “Status Changed”.
- Configure:
- Endpoint URL: Copy the webhook URL shown on your escalation path
- Request method: POST
- Request format: JSON
- Custom header: Add
X-SupportUnicorn-Webhookwith the signature token shown on your escalation path
- Click “Create webhook”
Step 6: Use a Separate API User (Important)
The API credentials used in your escalation path should belong to a dedicated service account, not a real agent account. Support Unicorn filters out comments from the API user to prevent webhook loops (the system echoing its own messages). If your agent account is the same as the API user, your replies will be silently ignored. To set up a dedicated API user:- In Zendesk, create a new agent or admin user (e.g., “Support Unicorn Bot”)
- Generate an API token for this user
- Use this user’s email and API token in your escalation path configuration
- Run
rake zendesk:populate_user_idsto store the API user ID
Configuration Options
| Option | Description | Required | Values |
|---|---|---|---|
| Default Priority | Ticket priority level | Yes | low, normal, high, urgent |
| Default Type | Ticket type | Yes | question, incident, problem, task |
| Tags | Comma-separated tags | No | Any string |
| Group ID | Zendesk group to assign | No | Numeric ID |
| Subject Template | Custom subject format | No | Text with variables |
Priority Levels
Choose the appropriate priority for escalated tickets:- Low: General inquiries, non-urgent questions
- Normal: Standard support requests (default)
- High: Important issues needing prompt attention
- Urgent: Critical issues requiring immediate response
Ticket Types
Select the appropriate type:- Question: General customer inquiries
- Incident: Service disruptions or errors
- Problem: Root cause of multiple incidents
- Task: Work items or requests
Subject Template
Customize the ticket subject line:Available Variables
{{customer_name}}: Customer’s name or identifier{{channel_name}}: Communication channel{{escalation_reason}}: Why escalated{{agent_name}}: AI agent name{{timestamp}}: When escalated
Ticket Content
The ticket description automatically includes:- Escalation Reason: Why the conversation was escalated
- Channel: Where the conversation took place (Live Chat, SMS, etc.)
- Full Transcript: Complete conversation history
- Customer Information: Name, email, identifier
- Timestamp: When escalation occurred
Tags
Use tags to categorize and track AI escalations: Common Tags:ai-escalation: Identifies AI-escalated ticketschatbot: Originated from chatbotchannel-livechat/channel-sms: Indicates channelbilling,technical,sales: Topic categories
ai-escalation, chatbot, channel-livechat, billing
Group Assignment
Assign tickets to specific Zendesk groups:-
Find your group ID in Zendesk:
- Go to Admin → People → Groups
- Click on a group
- Group ID is in the URL:
.../groups/[GROUP_ID]/edit
- Enter the Group ID in escalation settings
- Tier 1 Support:
123456 - Billing Team:
234567 - Technical Support:
345678
How It Works
When escalation is triggered:- Ticket Created: New ticket created in Zendesk with full conversation history
- AI Pauses: AI agent stops responding to the customer
- Agent Assigned: Ticket routed per Zendesk rules
- Context Included: Full conversation transcript in ticket description
- Notification Sent: Agent receives Zendesk notification
- Human Response: Agent responds through Zendesk
- Reply Routed: Zendesk webhook sends the reply back to Support Unicorn
- Customer Receives: Reply delivered to customer on original channel (live chat, SMS, or WhatsApp)
Reply Flow (Agent → Customer)
When a Zendesk agent replies to an escalated ticket:- Zendesk fires the webhook to your Support Unicorn endpoint
- Support Unicorn matches the ticket ID to the original conversation
- The reply is routed back to the customer via their original channel:
- Live Chat: Delivered via WebSocket in real-time
- SMS: Sent via Twilio
- WhatsApp: Sent via Twilio
Customer Follow-up Messages
When a customer sends additional messages after escalation:- The message is stored in the conversation
- It is automatically added as a public comment on the Zendesk ticket
- The Zendesk agent sees it in real-time
Managing Zendesk Escalations
Test Connection
- Navigate to Agents → Your Agent → Escalations
- Find your Zendesk escalation path
- Click “Test Connection”
- Verify test ticket appears in Zendesk
Activate/Deactivate
Toggle the “Active” switch to enable or disable the escalation path.Edit Settings
- Navigate to Agents → Your Agent → Escalations
- Click the Zendesk escalation path
- Update configuration
- Click “Save Changes”
Best Practices
- Clear Tagging: Use consistent tags for reporting and filtering
- Appropriate Priority: Set realistic default priorities
- Group Assignment: Route to appropriate teams
- Subject Templates: Include key information in subject
- SLA Monitoring: Track response times for escalated tickets
- Regular Review: Analyze escalation patterns to improve AI
Example Use Cases
Use Case 1: Billing Issues
Configuration:- Priority: High
- Type: Question
- Tags:
ai-escalation, billing, urgent - Group: Billing Team (ID: 234567)
- Trigger: Keywords (“refund”, “charge”, “billing”)
Use Case 2: Technical Problems
Configuration:- Priority: Normal
- Type: Incident
- Tags:
ai-escalation, technical, bug - Group: Technical Support (ID: 345678)
- Trigger: Keywords (“error”, “broken”, “not working”)
Use Case 3: General Escalations
Configuration:- Priority: Normal
- Type: Question
- Tags:
ai-escalation, general - Group: Tier 1 Support (ID: 123456)
- Trigger: Message count > 5
Using in Procedures
Reference the escalation path in AI procedures:Procedures Guide
Learn how to use escalations in procedures
Troubleshooting
Tickets Not Being Created
- Verify Zendesk integration is connected and active
- Check API token has ticket creation permissions
- Ensure escalation path is activated
- Test connection using “Test Connection” button
- Review Zendesk API logs for errors
Tickets Created in Wrong Group
- Verify Group ID is correct
- Check that group exists in Zendesk
- Ensure API user has permission to assign to group
- Review Zendesk automation rules (may override)
Tags Not Applied
- Verify tag syntax (comma-separated, no special chars)
- Check Zendesk tag permissions
- Ensure tags don’t conflict with Zendesk triggers
Agent Replies Not Reaching Customer
- Webhook not configured: Ensure you completed Step 6 (webhook setup in Zendesk). Without it, no data reaches Support Unicorn when agents reply.
- Same user for API and agent: If the API user ID matches the replying agent’s ID, replies are silently filtered as “webhook loops”. Use a separate service account for the API credentials (see Step 7).
- Webhook URL incorrect: Verify the webhook URL in Zendesk matches the one shown on your escalation path.
- Trigger not firing: Ensure the Zendesk trigger conditions match (public comment, by agent, correct tags).
- Check server logs: Look for
Skipping comment: posted by API user— this means the API user ID matches the agent. Look forNo conversation found for Zendesk ticket— this means the ticket ID doesn’t match any escalated conversation.
”Failed to connect to human agent” Error
This can occur if a previous Slack integration was removed. The escalation to Zendesk succeeds, but the system may still attempt a Slack handoff which fails. Check that:- No stale Slack escalation paths are active on the same agent
- The agent’s highest-priority active escalation path is the Zendesk one
Missing Conversation Context
- Verify escalation template includes transcript
- Check webhook configuration
- Review escalation service logs