# Freshdesk

Freshdesk is a cloud-based customer support platform that helps businesses manage customer interactions through ticketing, automation, and multi-channel support. It enables teams to efficiently handle customer queries via email, chat, phone, social media, and self-service portals. Freshdesk also offers AI-powered automation, analytics, and integrations to improve response times and enhance customer satisfaction.

### **How to Integrate Freshdesk with ZBrain Flow** <a href="#how-to-integrate-freshdesk-with-zbrain-flow" id="how-to-integrate-freshdesk-with-zbrain-flow"></a>

To integrate Freshdesk with ZBrain Flow:

1. Click the ‘+’ button in ZBrain Flow.
2. In the search bar, type "Freshdesk" and select it from the available options.
3. Choose an available action to start the setup process.

### **How to Create a Connection Between Freshdesk and ZBrain Flow** <a href="#how-to-create-a-connection-between-freshdesk-and-zbrain-flow" id="how-to-create-a-connection-between-freshdesk-and-zbrain-flow"></a>

To establish a connection between Freshdesk and ZBrain Flow:

1. **Enter a Connection Name** – Provide a name for easy identification.
2. **Enter the Base URL and API Token** – These credentials are required for authentication.
3. **Click ‘Save’** – This completes the connection setup.

### **How to Retrieve Base URL and API Token from Freshdesk** <a href="#how-to-retrieve-base-url-and-api-token-from-freshdesk" id="how-to-retrieve-base-url-and-api-token-from-freshdesk"></a>

**Base URL:**

* Log in to your Freshdesk account.
* The base URL follows this format:

```
https://yourdomain.freshdesk.com
```

Replace yourdomain with your actual Freshdesk subdomain.

**API Token:**

* Click on your profile picture in the top-right corner.
* Select "Profile Settings".
* In the right panel, locate and click ‘View API Key.’
* Complete the captcha verification to reveal and copy your API key.
* Use this API key for authentication in ZBrain Flow.

### **Available Actions in ZBrain Flow** <a href="#available-actions-in-zbrain-flow" id="available-actions-in-zbrain-flow"></a>

#### **1. Get Tickets** <a href="#id-1.-get-tickets" id="id-1.-get-tickets"></a>

Retrieves a list of support tickets from Freshdesk, allowing for automated tracking and reporting.

**Configuration Steps**

* Select an existing connection or create a new one.

#### **2. Get Contact from ID** <a href="#id-2.-get-contact-from-id" id="id-2.-get-contact-from-id"></a>

Fetches detailed information about a specific contact in Freshdesk using a Contact ID.

**Configuration Steps**

* Select an existing connection or create a new one.
* Enter the Contact ID.

### **Where to Find Contact ID in Freshdesk?** <a href="#where-to-find-contact-id-in-freshdesk" id="where-to-find-contact-id-in-freshdesk"></a>

* Log in to Freshdesk.
* Navigate to Contacts from the dashboard.
* Click on a contact to open their details.
* The Contact ID is visible in the URL.

Example:

{% code lineNumbers="true" %}

```
https://yourdomain.freshdesk.com/a/contacts/56789
```

{% endcode %}

Here, 56789 is the Contact ID.

#### **3. Get Ticket Status** <a href="#id-3.-get-ticket-status" id="id-3.-get-ticket-status"></a>

Retrieves the current status (e.g., Open, Pending, Resolved, or Closed) of a specific support ticket.

**Configuration Steps**

* Select an existing connection or create a new one.
* Enter the Ticket ID to fetch its status.

### **Where to Find Ticket ID in Freshdesk?** <a href="#where-to-find-ticket-id-in-freshdesk" id="where-to-find-ticket-id-in-freshdesk"></a>

* Log in to Freshdesk.
* Go to the Tickets section from the dashboard.
* Each ticket has a unique Ticket ID displayed next to its title or in the ticket URL.

Example:

{% code lineNumbers="true" %}

```
https://yourdomain.freshdesk.com/a/tickets/12345
```

{% endcode %}

Here, 12345 is the Ticket ID.

#### **4. Get Freshdesk Contacts** <a href="#id-4.-get-freshdesk-contacts" id="id-4.-get-freshdesk-contacts"></a>

Retrieves a list of contacts from Freshdesk, with optional filtering to refine results.

### **Configuration Steps**

* Select an existing connection or create a new one.
* Choose an optional filter:
  * Email
  * Mobile
  * Phone
  * Company ID
  * Updated Since
* Enter the filter value (if an optional filter is selected).
* Select an optional status filter (Blocked, Deleted, Unverified, or Verified).
* Enter the number of results to return (set to 0 for all results; max is 100).

#### **5. Get All Tickets by Status** <a href="#id-5.-get-all-tickets-by-status" id="id-5.-get-all-tickets-by-status"></a>

Fetches support tickets filtered by their status.

**Configuration Steps**

* Select an existing connection or create a new one.
* Choose one or more ticket statuses:
  * Open
  * Pending
  * Resolved
  * Closed

#### **6. Custom API Call** <a href="#id-6.-custom-api-call" id="id-6.-custom-api-call"></a>

Allows users to execute API requests to Freshdesk for advanced operations.

**Configuration Steps**

* Select an existing connection or create a new one.
* Choose the HTTP Method:
  * **GET** – Retrieve tickets, contacts, or other data.
  * **POST** – Create new contacts or tickets.
  * **PATCH** – Update existing records.
  * **PUT** – Replace complete records.
  * **DELETE** – Permanently remove data.
  * **HEAD** – Fetch response headers without retrieving content.
* **Add Headers** – Define any additional headers required for the API request. Authorization headers are automatically injected. Click ‘+ Add Item’ to include more headers.
* **Add Query Parameters** – Customize API requests with query parameters to filter results or specify additional options. Click ‘+ Add Item’ to add more parameters.
* **Enter JSON Body** – Provide structured request data in JSON format.
* **Set Timeout (in Seconds)** – Define a timeout duration to prevent delays in processing.

> **Note:** Click *‘f’* to insert dynamic values for flexible configurations.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/freshdesk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
