> For the complete documentation index, see [llms.txt](https://help.branch.io/llms.txt).

# Import Cost Data Via Email Ingestor (New)

> Import ad partner cost data into Branch using an email ingestor alias your partner sends scheduled files to.

## Overview

You can set up an email ingestor that generates a unique email alias for an ad partner to send scheduled cost data files to. Email ingestion is best for recurring imports from ad partners that don't have a direct API integration with Branch. The email ingestor functionality does several key things:

1. It generates a unique email alias that you can give to your ad partner for them to send scheduled data to.
2. Data sent to the email alias gets piped to your Branch reports, where you can analyze campaign performance across multiple ad partners at once.
3. It lets you test whether the format you and your ad partner are using to report cost data works with Branch.

This guide covers file requirements, ingestor setup, and status monitoring. For an overview of all three import methods and their prerequisites, visit our guide on [importing ad partner cost data](https://help.branch.io/marketer-hub/category/import-ad-partner-cost-data-new.md).

> **Note: this guide is for new Branch**
>
> In the legacy Branch experience, cost data ingestion through API connection, file upload, or email ingestion was called ROI Hub. In the [new Branch](https://help.branch.io/marketer-hub/new-branch-overview.md) experience, ROI Hub has been replaced by the Cost Import tab. Please note that this guide is about cost data in new Branch. For information on ROI Hub in legacy Branch, visit our [legacy guide](https://help.branch.io/marketer-hub/roi-hub.md).

## File requirements

Files your ad partner sends to the email alias can have any name, but they must be CSV files and end with the `.csv` file extension. For every row in the CSV, the following columns must be filled out:

- `date` (use the format YYYY-MM-DD)
- `campaign_name`
- `cost` (enter cost data in the format 1234.56 - do not include any currency symbols or commas)

If the files include optional fields such as `country_code` or `os`, see the [full file requirements](https://help.branch.io/marketer-hub/category/import-ad-partner-cost-data-new.md) for the accepted values.

## Set up an email ingestor

To set up an email ingestor:

1. Navigate to the ad partner's page and select the **Cost Import** tab.
2. Select **Import**, then **Setup email ingestor**.
3. Configure the following fields:

   - **Email ingestor name**: A label for this ingestor.
   - **Ad partner account ID** (required): The account to associate imported data with. This is important if you are importing data for the same ad partner multiple times, as it might override existing data.
   - **Currency** (required): The currency of your cost data.
   - **Permitted domains**: The email domains that Branch will ingest reports from (you must add at least one). Type a domain and select **Add**. This could be the partner's regular base domain, or it could be an obscure domain they send emails from, depending on the ad partner.
4. Set up your column mapping in the **Verify column mapping** section.

   - Select **Auto map fields** to automatically match the columns to Branch fields, or map each column manually using the **Branch fields** dropdowns.
   - Three Branch fields are required: `date`, `campaign_name`, and `cost`. If any of these aren't mapped, a red **Required fields not mapped** banner appears.
   - To skip a column you don't want imported, map it to **EXCLUDE FIELD**.
5. Select the **Generate email alias** button.

Note the email alias that gets generated. You will need to share this email alias with your ad partner so they can send cost data to Branch.

## Check email ingestor status

Your email ingestors are listed at the top of the **Cost Import** tab, each with its creation date, permitted domains, currency, and a status.

Each import sent to the email alias also appears in the [Import history](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md#view-import-history) table on the **Cost Import** tab, alongside imports from file uploads.
