> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatcrafterai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions

# Zendesk Actions Reference

Complete reference of actions your ChatCrafterAI agent can perform with Zendesk integration.

## Ticket Actions

### Create Ticket

Generate a new support ticket from conversation.

**Required parameters:**

* Subject (ticket title)
* Description (issue details)
* Requester email (customer who reported issue)

**Optional parameters:**

* Priority (low, normal, high, urgent)
* Type (question, incident, problem, task)
* Tags (for categorization)
* Custom fields

**Returns:**

* Ticket ID
* Ticket status
* Creation timestamp
* Ticket URL

### Get Ticket Status

Check current status of a ticket.

**Required:** Ticket ID

**Returns:**

* Status (new, open, pending, solved, closed)
* Priority level
* Assigned agent
* Last updated timestamp
* Subject and description

### Add Comment to Ticket

Add information to existing ticket.

**Required parameters:**

* Ticket ID
* Comment text

**Optional:**

* Public (visible to customer) or internal (agent-only)
* Attachments

**Returns:**

* Comment ID
* Timestamp
* Confirmation

### Update Ticket

Modify ticket properties.

**Required:** Ticket ID

**Can update:**

* Priority (escalate or de-escalate)
* Status (pending, solved, etc.)
* Assignee (transfer to different agent)
* Tags
* Custom fields

**Returns:** Updated ticket object

### List Tickets for Customer

Show all tickets for a specific customer.

**Required:** Customer email or Zendesk user ID

**Optional filters:**

* Status (open, pending, solved, etc.)
* Date range

**Returns:** Array of tickets with IDs, subjects, and statuses

### Search Tickets

Find tickets matching criteria.

**Search parameters:**

* Keyword in subject/description
* Status filter
* Priority filter
* Date range
* Assignee

**Returns:** Matching tickets with basic info

## Customer Actions

### Create Customer

Add new customer to Zendesk (if doesn't exist).

**Required parameters:**

* Email address
* Name

**Optional:**

* Phone number
* Organization
* Tags
* Custom fields

**Returns:**

* Customer ID
* Verification status

### Get Customer Info

Retrieve customer details from Zendesk.

**Required:** Email or customer ID

**Returns:**

* Customer name
* Email and phone
* Organization
* Created date
* Total tickets submitted
* Tags

### Look Up by Email

Find customer using email address.

**Required:** Email address

**Returns:** Customer object with all details

### Get Customer Ticket History

View all past tickets for customer.

**Required:** Customer email or ID

**Returns:**

* List of tickets with dates
* Ticket subjects
* Current status of each
* Resolution notes for solved tickets

## Common Agent Patterns

### Issue Reporting Flow

1. Customer says: "I have a problem"
2. Agent asks: "Please describe the issue"
3. Customer explains problem
4. Agent creates ticket in Zendesk
5. Agent responds: "Ticket #12345 created. We'll respond within 24 hours"

### Status Check

1. Customer asks: "What's the status of ticket #12345?"
2. Agent looks up ticket in Zendesk
3. Agent retrieves status and details
4. Agent responds: "Ticket #12345 is open, assigned to John. Last updated yesterday"

### Escalation

1. Customer says: "This isn't resolved, I need to speak to a manager"
2. Agent updates ticket priority to "urgent"
3. Agent adds comment: "Customer requesting escalation"
4. Agent assigns to senior agent queue
5. Agent responds: "I've escalated your ticket. A senior agent will contact you shortly"

### Adding Information

1. Customer says: "I have more details about ticket #12345"
2. Agent asks: "What would you like to add?"
3. Customer provides information
4. Agent adds comment to ticket
5. Agent responds: "Information added to ticket #12345"

### FAQ vs Ticket Decision

1. Customer asks question
2. Agent checks if it can answer from knowledge base
3. **If simple:** Agent answers directly (no ticket)
4. **If complex:** Agent creates ticket and provides ticket ID

## Action Parameters

Common parameters used across actions:

**Ticket Parameters:**

* `subject` - Ticket title/summary
* `description` - Detailed issue description
* `priority` - low, normal, high, urgent
* `status` - new, open, pending, solved, closed
* `type` - question, incident, problem, task
* `tags` - Array of tags for categorization
* `assignee_id` - Agent to assign ticket to
* `ticket_id` - Zendesk ticket number

**Customer Parameters:**

* `email` - Customer email address
* `name` - Customer full name
* `user_id` - Zendesk user ID
* `phone` - Phone number
* `organization` - Company name

**Comment Parameters:**

* `body` - Comment text
* `public` - true (customer sees) or false (internal)
* `author_id` - Who is adding comment

## Response Data

Actions return structured data including:

**Ticket Data:**

* Ticket ID
* Subject and description
* Status and priority
* Created and updated timestamps
* Requester information
* Assigned agent
* Tags
* Comments count
* Custom field values

**Customer Data:**

* User ID
* Name and email
* Phone number
* Organization
* Created date
* Last login
* Ticket count
* Tags

**Comment Data:**

* Comment ID
* Author name
* Comment body
* Timestamp
* Public/private flag

## Workflows

### Ticket Lifecycle in Agent

1. **Creation:**
   * Customer describes issue in chat
   * Agent gathers necessary information
   * Agent creates ticket with details
   * Customer receives ticket ID

2. **Tracking:**
   * Customer asks for status
   * Agent retrieves current state
   * Agent shows progress and updates

3. **Updates:**
   * Customer provides more information
   * Agent adds comment to ticket
   * Agents see updates in Zendesk

4. **Escalation:**
   * Customer requests escalation
   * Agent increases priority
   * Agent assigns to appropriate queue
   * Agent notified

5. **Resolution:**
   * Agent solves issue in Zendesk
   * Agent can notify customer when status changes to "solved"
   * Customer can reopen if needed

## Priority Levels

**Low:**

* General questions
* Non-urgent requests
* Feature suggestions

**Normal:**

* Standard support issues
* Default priority
* Most tickets

**High:**

* Issues affecting operations
* Time-sensitive matters
* Important customers

**Urgent:**

* System outages
* Critical bugs
* Escalated issues
* VIP customers

## Ticket Statuses

**New:** Just created, not yet reviewed

**Open:** Agent actively working on it

**Pending:** Waiting for customer response or external factor

**Solved:** Issue resolved, waiting for customer confirmation

**Closed:** Fully resolved and closed

## Limitations

**API Rate Limits:**

* Zendesk limits API requests (typically 700/minute)
* Agent automatically handles rate limiting

**Data Access:**

* Agent can only access tickets it creates or public tickets
* Cannot access deleted tickets
* Respects Zendesk user permissions

**Automation Rules:**

* Zendesk triggers and automations still apply
* Agent-created tickets follow same workflow rules
* SLA policies remain active

## Best Practices

* Always collect sufficient information before creating ticket
* Use appropriate priority levels (don't over-escalate)
* Add meaningful tags for categorization
* Keep descriptions clear and detailed
* Link related tickets when applicable
* Notify customer with ticket ID for reference

## Next Steps

Use these actions to build comprehensive support automation that reduces agent workload while maintaining excellent customer service.
