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

# Ticketing Integration and Actions

Integrate Zoho Desk with Gnani Agents to automatically create and manage support tickets — helping your team respond faster and resolve customer issues efficiently.

***

## **1. Why Integrate Ticketing?**

By connecting Zoho Desk to Gnani Agents, your agent can:

* **Automatically log customer issues** during or after a call.
* Ensure no support requests are missed.
* Reduce manual ticket creation time for your support team.

***

## **2. Set Up Zoho Desk Integration**

1. **Open Integration Settings**
   * Go to **Add Ticket Integration** in your Gnani Agents dashboard.
   * Select **Zoho** as the operator and enter an integration name.
2. **Get Zoho Credentials**
   * Open the Zoho API Console.
   * Follow Zoho’s Self Client guide to create a Self Client.
3. **Copy Client ID & Client Secret**
   * In the **Client Secret** tab, locate your **Client ID** and **Client Secret**.
   * Paste both into the integration form in Gnani Agents.
4. **Enter Account Server URL**
   * Choose the correct **Account Server URL** based on your primary region from Zoho’s region list.
5. **Generate Account SOID**
   * Follow this Zoho guide to generate your **Account SOID** and paste it into Gnani Agents.
6. **Specify Required Scopes**
   * From Zoho Desk’s scope list, add the scopes needed for your ticket actions (e.g., `ZohoDesk.tickets.CREATE`).
7. **Save**
   * Click **Save** to finalize the integration.

***

## **3. Create a Ticket Action**

1. **Navigate to Actions**
   * Go to **Manage Agents → Select Agent → Action Tab**.
2. **Create Action**
   * Click **+** to open the **Create Action** card.
3. **Fill in Details**
   * **Name:** Use only letters, numbers, or underscores.
   * **Description:** Describe when the action should trigger.
     * Example: *"Trigger this action when the user reports a technical issue."*
4. **Select Integration**
   * Choose your Zoho Desk integration.
5. **Choose Trigger**
   * **Post-Call:** Executes after the conversation ends.
     * If **Post-Call** is selected, you can:
       * Add **Variables** (sent to the API).
   * **On-Call:** Executes during the conversation.
     * If **On-Call** is selected, you can:
       * Write a message in the **Speak During Action** section.
       * Add **Before API Call Variables** (sent to the API).
       * Add **After API Call Variables** (received from the API).
6. **Set Ticketing-Specific Fields**

* **Select Action:** Choose the ticketing action type (e.g., `CREATE` for new tickets). *(Contact us to add more actions)*
* **Department ID:** Specify the Zoho Desk department for ticket creation.
* **Contact ID:** Associate the ticket with a customer profile. *(Currently for testing; contact us to make it dynamic)*
* **Payload:** Define the ticket in JSON format. The **subject**, **description**, and **priority** are mandatory:
  ```json theme={null}
  {
  	"subject": "{{subject}}",
  	"description": "{{description}}",
  	"priority": "{{priority}}" 
  } 
  ```

***

## **4. Test Your Ticket Action**

1. **Open Testing Mode**
   * Go to **Manage Agents → Select Agent → Test**.
2. **Start a Test Conversation**
   * Speak or chat with your agent in the test interface.
3. **Trigger the Action**
   * Use the same instructions or keywords from your Action’s **Description** to activate it.
4. **Verify in Zoho Desk**
   * Check Zoho Desk to confirm that a ticket is created with the correct subject, description, and priority.
5. **Check Action Logs**
   * In Gnani Agents, click **More Options (⋮)** on the Action card → **View Logs**.
   * Review logs for execution details and any errors.

***

✅ **Your Zoho Desk integration is now ready!** Your agent can log support tickets instantly, ensuring fast and efficient customer service.
