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

# Understanding Functions

> Learn how to extend your AI agent with capabilities like transferring calls, booking appointments, and more.

## Overview

After implementing basic conversations, your agent can be enhanced with additional capabilities to perform actions such as:

* Transferring calls
* Booking appointments
* Retrieving external information
* Managing call flow (e.g., ending calls)
* Integrating with your existing systems via API calls

These capabilities can be implemented using **function calling**.

***

## Adding Functions to the Prompt

For all functions, you’ll need to ensure they are triggered in the **prompt** once added to the agent.

**Examples:**

* `If user does not have any more questions, call function end_call to hang up`
* `If the user asks to transfer the call to a specific department or extension, use function transfer_call`

***

## Extension and Transferring

For **internal transfers**, you will need to:

1. Create an **extension directory** within your prompt.
2. Navigate to **Extensions** under the **Agents** tab to manage extensions.

When implementing your directory into the prompt, it might look like this:

<img src="https://mintcdn.com/uponai/Q0-ke5nM5tIaF3MJ/images/fourth.png?fit=max&auto=format&n=Q0-ke5nM5tIaF3MJ&q=85&s=6d763ae777f39ace6367983d5ead2557" alt="Begin message type options" height="300" className="rounded-lg" data-path="images/fourth.png" />

## Uploading Extensions

Under the **Extensions** tab, you can upload a list of extensions using a `.csv` file.\
A sample file is provided on the page for reference.

Alternatively, you can add extensions manually by entering the information individually.

## Transferring Calls

In your prompt, make sure to trigger this function via `transfer_call`.

### **How to Transfer**

* Invoke `transfer_call`:
  * `action`: `"transfer"`
  * `transfer_to`: Extension from directory
* **Do NOT require/await any caller response after the transfer phrase.**

### **When to Transfer**

* Caller requests any person/department in the extension directory (e.g., *"I want to speak to \[name]"* or similar)
* For upgrade, billing, technical issues, or complex/unclear requests

### **What to Say**

* For directory names:\
  *"Sure, let me transfer you now."*
* Otherwise, choose only from:
  * *"Transferring you to \[department/person] now."*
  * *"Connecting you with \[department/person]."*
  * *"I'll connect you with \[department/person] right away."*
