# Box Connector

## Overview

This topic describes how to configure and use the Box connector for the Aisera platform as a data source.

The Box connector uses the **File Data** data source during setup.  This method increases your flexibility by allowing you to Easily ingest data from multiple non-contiguous folders and sub-folders. This configuration supports the following key features.

#### Multiple Folder Ingestion

In the Data Source configuration, you can enter multiple **Box Folder IDs** separated by commas in the **Folder Id** parameter. This allows you to include content from several specific folders within a single data source.

#### Recursive Folder Crawling

When **Enable Recursion** is selected, the connector will automatically crawl and ingest supported files from all sub-folders nested within the specified **Folder IDs**. This eliminates the need to manually add every sub-folder ID individually when you want to include nested content.

## Prepare

### Authorization

The Box connector for the Aisera Platform supports **OAuth 2.0** for authentication. You will need to create a **Custom Application** on the Box Platform to authorize the Aisera Platform to ingest data. Go to [Setup with OAuth 2.0](https://developer.box.com/guides/authentication/oauth2/oauth2-setup/) for instructions on how to do this.

You will need to set the Redirect URI during the setup of the custom application. The redirect URI is: `https://<your_tenant>.login.aisera.<top_level_domain>/?id=aisera.oauth.oauthCommand`&#x20;

You will need to enable the following options in the **Application Scopes**:

* Write All files and Folders Stored in Box
* Manage Enterprise Properties

For the integration step, take note of the following credentials:

* Access Token URL
* Authorization URL
* Client Id
* Client Secret

{% hint style="info" %}
Access Token URL and Authorization Token URL are usually the same for all Box Cloud instances, and are generally in the format of:

`https://<account>.box.com/api/oauth2/token`

`https://<account>.box.com/api/oauth2/authorize`
{% endhint %}

#### Manual Approval

You may need to manually approve the application if the application if the application is inactive by default. Go to [Platform App Approval ](http://developer.box.com/guides/authroization/platform-app-approval/)to learn about how to enable an application.

## Integration Setup

1. In the Aisera Admin UI navigate to **Settings > Integrations**

2. Click on **+ New Integration**

3. In the menu, select **Box** and click **Next**<br>

   <div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2Fdxl0kigbv8QWgRBJAz43%2Fimage.png?alt=media&#x26;token=067d21cd-5bd8-4e7c-aed4-dfdc07591958" alt=""><figcaption></figcaption></figure></div>

4. Enter the configuration details, then click  **Next**

   <table><thead><tr><th width="157.20001220703125">Field</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>The name used to identify the integration</td></tr><tr><td>Description</td><td>A description of the integration and it's purpose</td></tr></tbody></table>

5. Under the **Auth Type** dropdown select **OAuth**<br>

   <div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FTLDYcGifCrcQLyhhUGMe%2Fimage.png?alt=media&#x26;token=2762a521-c3f6-4f1b-ab31-c966c21423ca" alt=""><figcaption></figcaption></figure></div>

6. Enter the collected credentials

7. Click **OK**

When you click **Ok** you will be directed to the Box Platform to authorize the Aisera Platform to use OAuth. When authorization is complete the integration will be saved.

## Data Source Setup

To set up the **File Data** data source for the Box connector:

1. In the Aisera Admin UI navigate to **Settings > Data Sources**
2. Click **+ New Data Source** in the upper right corner
3. Select **File Data** and click **Next**\ <br>

   <div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FWkBzhXNlncKzqU0nHv1p%2Fimage.png?alt=media&#x26;token=4c843a03-921f-4d7e-b186-9e08e35115ed" alt=""><figcaption></figcaption></figure></div>
4. Select **Cloud Files**. You can now see the integrations that are available for your tenant<br>

   <div align="left"><figure><img src="https://aisera.gitbook.io/~gitbook/image?url=https%3A%2F%2F2983236984-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiZkLJr3EjXkd2tHYiQJP%252Fuploads%252FRytW67jEyLAn6p8rNKZA%252F8.png%3Falt%3Dmedia&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=8971ddcd&#x26;sv=2" alt="" width="563"><figcaption><p>Box Data Source Configuration</p></figcaption></figure></div>
5. Choose the **Box integration** that you created in Step 2
6. After you enter the integration, you will see the updated **Folder Id** parameter. Enter a comma-separated list of Folder Ids corresponding to the folders you want to ingest data from
7. All remaining configurations are optional. See the section below for more information. Click **Next** until the window closes to complete the creation of the **Data Source**

## Optional Configurations

### Enable Recursion

When enabled, the Aisera Platform will check for and ingest content from all subfolders contained in the folders listed in the **Folder Id** field.

## Post Setup Actions

Your Aisera team can use test knowledge articles to ingest and then determine the specific fields that are mapped, if your data source administrators want to restrict the access of the Aisera Service User account to only those fields.
