# Freshdesk

## Prerequisites

* A Freshdesk account with admin access
* Your Freshdesk domain (e.g., `https://example.freshdesk.com`)
* A Freshdesk API key

## Setup

### Step 1: Get Your API Key

1. In Freshdesk, click your profile icon in the upper right corner
2. Click **Profile Settings**
3. Click **View API Key** and copy your key

### Step 2: Connect Freshdesk in Alhena

1. In Alhena, go to **Settings > Integrations**
2. Find **Freshdesk** and click **Enable**
3. Click **Configure Settings**
4. Enter your Freshdesk domain and API key
5. Click **Connect**

***

## Automations

When you set up the Freshdesk integration, Alhena creates a new agent in your Freshdesk account called "Alhena Bot". The bot only responds to open tickets assigned to this agent.

Once Alhena answers the ticket, it moves it back to closed status. Freshdesk automatically reopens tickets when a customer replies, and Alhena will reply again.

### Setting Up an Automation

To have Alhena automatically handle tickets, create an automation to assign tickets to the Alhena Bot agent:

1. In Freshdesk, click the settings wheel in the sidebar
2. Click **Automations**
3. Click **New Rule**

<figure><img src="https://2864633804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKZ3bWFAIdLAqpW2uafZ4%2Fuploads%2FCxRcXoth4muoi7zBOJG1%2FScreenshot%202024-05-24%20at%208.55.27%20AM.png?alt=media&#x26;token=640f56d2-2f96-4073-ad06-b411f0b5e975" alt=""><figcaption></figcaption></figure>

***

## Human Transfer

Alhena transfers the conversation to a human agent when:

* The user asks for a human agent (e.g., "I want to talk to a person")
* The bot cannot find an answer in its knowledge base
* A custom rule in your answering guidelines is triggered

By default, Alhena unassigns the ticket from itself on human transfer. To assign tickets to a specific group, configure the Human Transfer Group in your integration settings.

Human agents can also manually respond to tickets or reassign them away from Alhena Bot, and the bot will stop responding.

For the complete list of human transfer triggers, see [Human Transfer Triggers](https://alhena.gitbook.io/docs/integrations/helpdesk/human-transfer-triggers).

***

## Email Tickets

Alhena can automatically respond to email tickets in Freshdesk. For each new message in a ticket, Alhena generates an answer, transferring to a human agent when needed.

Additional human transfer rules for email:

* Emails from automated systems
* Emails with "Fwd:" in the subject line

***

## Website Chat

Alhena provides a website chat widget via the Website SDK. When a human agent is needed, tickets sync to Freshchat where human agents can reply.

Outside business hours, website chat tickets can be automatically moved to Freshdesk for email follow-up. Alhena collects the customer's email address on human transfer.

***

## Bot Profile Mapping

If you use one Freshdesk account for multiple websites or products, you can set up different bot profiles with their own knowledge base. Alhena can route tickets to the appropriate bot based on the support email address.

Contact the Alhena team to set this up.

***

## FAQs

### Can I train my bot on past ticket responses?

Yes. Contact the Alhena team for assistance.

### Can I train my bot on Freshdesk canned responses?

Yes. Contact the Alhena team for assistance.


---

# 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://alhena.gitbook.io/docs/integrations/helpdesk/integrating-alhena-with-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.
