> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-agent-management-platform-dev.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the BambooHR Templates

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Use prebuilt BambooHR action templates to auto-create dialog tasks.

**Prerequisites:** Configure [BambooHR](configuring-the-bamboohr-action.md) and [install templates](configuring-the-bamboohr-action.md#step-2-install-bamboohr-action-templates) before proceeding.

Navigate to **Automation AI > Use Cases > Dialogs**, then click the auto-created dialog to open the canvas.

***

## Supported Actions

| Action                    | Description                       | Method |
| ------------------------- | --------------------------------- | ------ |
| Create an Employee        | Creates an employee in BambooHR   | POST   |
| Get Employee by ID        | Finds an employee by ID           | GET    |
| List All Employees        | Retrieves all employees           | GET    |
| Update an Employee        | Updates employee details          | POST   |
| Get All Time Off Requests | Retrieves all time off requests   | GET    |
| Get a List of Who is Out  | Lists employees who are out       | GET    |
| Update a Request Status   | Updates a time off request status | POST   |

***

## Create an Employee

1. Install the template from [BambooHR Templates](configuring-the-bamboohr-action.md#step-2-install-bamboohr-action-templates).

2. The *Create an Employee* dialog task is added with:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img4-create-employee.png" alt="Create Employee dialog task" />

   * **createEmployee** - User intent to create an employee.

   * **companyDomain**, **firstName**, **lastName** - Entity nodes for employee details.

   * **createEmployeeService** - Bot action service to create the employee. Click **Edit Request**:

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img5-create-employee.png" alt="Request" />

     **Sample Request:**

     ```json  theme={null}
     {
       "firstName": "Alen",
       "lastName": "walker"
     }
     ```

   * **createEmployeeMessage** - Message node to display the result.

3. Click **Train**, then **Talk to Bot** to test.

4. Follow the prompts to create an employee.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img6-create-employee1.png" alt="Employee creation" />

5. Click **View Employee** to view employee details in BambooHR.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img7-create-employee2.png" alt="Employee details" />

***

## Get Employee by ID

1. Install the template from [BambooHR Templates](configuring-the-bamboohr-action.md#step-2-install-bamboohr-action-templates).

2. The *Get Employee by ID* dialog task is added with:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img8-get-employee.png" alt="Get Employee ID task" />

   * **getEmployeeByID** - User intent to find an employee by ID.

   * **companyDomain** and **id** - Entity nodes for employee details.

   * **getEmployeeByIdService** - Bot action service to fetch the employee. Click **Edit Request**:

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img9-get-employee1.png" alt="Request" />

     **Sample Request:**

     ```json  theme={null}
     {
       "id": "114",
       "firstName": "Alen",
       "lastName": "walker"
     }
     ```

   * **getEmployeeMessage** - Message node to display the result.

3. Click **Train**, then **Talk to Bot** to test.

4. Follow the prompts to find the employee.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img10-get-employee2.png" alt="Find employee" />

5. Click **View Employee** to view details in BambooHR.

***

## List All Employees

1. Install the template from [BambooHR Templates](configuring-the-bamboohr-action.md#step-2-install-bamboohr-action-templates).

2. The *List All Employees* dialog task is added with:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img11-list-employees.png" alt="List all employees" />

   * **listAllEmployees** - User intent to list employees.

   * **companyDomain** - Entity node for the company domain.

   * **listAllEmployeesService** - Bot action service to fetch all employees. Click **Edit Request**:

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img12-list-employees1.png" alt="Request" />

     **Sample Request:**

     ```json  theme={null}
     {
       "fields": ["firstName", "lastName"]
     }
     ```

     **Sample Response:**

     ```json  theme={null}
     {
       "title": "Report",
       "fields": [
         { "id": "firstName", "type": "text", "name": "First Name" },
         { "id": "lastName", "type": "text", "name": "Last Name" }
       ],
       "employees": [
         { "id": "112", "firstName": "John", "lastName": "Smith" },
         { "id": "113", "firstName": "Harry", "lastName": "Anthony" },
         { "id": "114", "firstName": "Alen", "lastName": "walker" }
       ]
     }
     ```

   * **listAllEmployeesMessage** - Message node to display results.

3. Click **Talk to Bot** to test.

4. Follow the prompts to view employees.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img13-list-employees2.png" alt="List employees" />

***

## Update an Employee

1. Install the template from [BambooHR Templates](configuring-the-bamboohr-action.md#step-2-install-bamboohr-action-templates).

2. The *Update an Employee* dialog task is added with:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img14-update-employee.png" alt="Update Employee dialog task" />

   * **updateEmployee** - User intent to update an employee.

   * **companyDomain**, **id**, **chooseField**, **firstName**, **lastName** - Entity nodes.

   * **updateEmployeeScript** - Bot action script to prepare the update.

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img15-update-employee1.png" alt="View component properties" />

   * **updateEmployeeService** - Bot action service to update the employee. Click **Edit Request**:

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img16-update-employee2.png" alt="Request" />

     **Sample Request:**

     ```json  theme={null}
     {
       "firstName": "Alen",
       "lastName": "walker"
     }
     ```

   * **getEmployeeByIdService** - Bot action service to fetch the updated employee by ID.

   * **updateEmployeeMessage** - Message node to display the result.

3. Click **Talk to Bot** to test.

4. Follow the prompts to update the employee.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img17-update-employee3.png" alt="Update employee" />

5. Click **View Employee** to view details in BambooHR.

***

## Get All Time Off Requests

1. Install the template from [BambooHR Templates](configuring-the-bamboohr-action.md#step-2-install-bamboohr-action-templates).

2. The *Get All Time Off Requests* dialog task is added with:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img18-get-time-off.png" alt="Get Time Off Request dialog" />

   * **getTimeoffRequests** - User intent to get time off requests.

   * **companyDomain**, **startDate**, **endDate** - Entity nodes for the request range.

   * **getTimeoffRequestsService** - Bot action service to fetch time off requests. Click **Edit Request**:

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img19-get-time-off1.png" alt="Request" />

     **Sample Response:**

     ```json  theme={null}
     [
       {
         "id": "1649",
         "employeeId": "112",
         "status": { "lastChanged": "2022-12-22", "status": "approved" },
         "name": "Mark Anderson",
         "start": "2022-12-14",
         "end": "2022-12-15",
         "type": { "id": "83", "name": "Vacation" },
         "amount": { "unit": "hours", "amount": "16" }
       }
     ]
     ```

   * **getTimeoffRequestsMessage** - Message node to display results.

3. Click **Talk to Bot** to test.

4. Follow the prompts.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img20-get-time-off2.png" alt="Get all time off requests" />

***

## Get a List of Who is Out

1. Install the template from [BambooHR Templates](configuring-the-bamboohr-action.md#step-2-install-bamboohr-action-templates).

2. The *Get a List of Who Is Out* dialog task is added with:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img21-get-who-out.png" alt="Who is Out dialog task" />

   * **getListWhoisOut** - User intent to list who is out.

   * **companyDomain** - Entity node for the company domain.

   * **getListWhoOutService** - Bot action service to get the list. Click **Edit Request**:

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img22-get-who-out.png" alt="Request" />

   * **getListWhoIsOutMessage** - Message node to display results.

3. Click **Talk to Bot** to test.

4. Follow the prompts.

***

## Update a Request Status

1. Install the template from [BambooHR Templates](configuring-the-bamboohr-action.md#step-2-install-bamboohr-action-templates).

2. The *Update a Request Status* dialog task is added with:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img23-update-request-status.png" alt="Update Request Status dialog task" />

   * **updateRequestStatus** - User intent to update a request.

   * **companyDomain**, **requestID**, **requestStatus** - Entity nodes.

   * **updateRequestStatusScript** - Bot action script to prepare the update.

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img24-update-request-status.png" alt="Update Request Status script" />

   * **updateRequestStatusService** - Bot action service to update the request. Click **Edit Request**:

     <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img25-update-request-status.png" alt="Request" />

     **Sample Request:**

     ```json  theme={null}
     {
       "status": "approved",
       "note": "Have fun!"
     }
     ```

   * **updateRequestStatusMessage** - Message node to display the result.

3. Click **Talk to Bot** to test.

4. Follow the prompts.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-agent-management-platform-dev/ai-for-service/integrations/actions/images/bamboo-hr-tem-img26-update-request-status.png" alt="Update Request" />


Built with [Mintlify](https://mintlify.com).