# Audienceone Export Integration

Treasure Data can send user list data to DAC AudienceOne. You can make a user list in Treasure Data that targets a segment and then send the list to AudienceOne to use in your advertisement campaigns. Refer to [AudienceOne webpage](https://www.dac.co.jp/service/solution/audienceone).

# Prerequisites

- Basic knowledge of Treasure Data
- An AudienceOne account


# Required access information from AudienceOne

Treasure Data and AudienceOne have collaborated to ensure a secure data exchange. You must request access to the AudienceOne account on behalf of Treasure Data. Ask your AudienceOne account administrator for the following information:

- API Key
- Database name
- Table name


# Usage

To export data, you create or select an existing connection, create or reuse a query, and then run the query to export your user lists. You can use **td_global_id** lists as user lists.

## Create or reuse a query

- Go to Query Editor. You can pick the query language and write your query.
- Select your database and table.
- Access the query that you plan to use to export data.


### Query output should include following columns:

- **time**: unix timestamp of data transferred.
- **crm_category_name**: Name of the segment that is shown in the AudienceOne console.
- **crm_value**: Id of the segment.
- **customer_id**: td_global_id.


## Create or Select an Existing AudienceOne Connection

| **Option** | **Task Steps** | **Tip** |
|  --- | --- | --- |
| Create a connector | - Go to [Connections](https://console.treasuredata.com/app/connections). - Select the `AudienceOne` icon from `Sources Catalog`. - Complete the required fields on the first pane. - In the `API Key` field, enter the API Key you get from AudienceOne.  Next you complete the Configuration fields. | You don't have to modify `Endpoint` field. |
| Select a connector | - Go to [TD Console](https://console.treasuredata.com/users/sign_in). - Go to [Query Editor](https://console.treasuredata.com/app/queries/editor). - Access the query that you plan to use to export data. - Select `Output results`. The `Choose Saved Connection` dialog opens. - Type the connection name in the search box to filter and select the connection that you want.  Next, you complete the Configuration fields. | You can also create a new connection from here by selecting `Create New Connection`. |


Creating a new connection:

1. Open **TD Console**.
2. Navigate to **Integrations Hub** >  **Catalog**.
3. Click the search icon on the far-right of the Catalog screen, and enter **AudienceOne**.
4. Hover over the AudienceOne connector and select **Create Authentication**.
![](/assets/audienceone.c82a952e74fbb65b52a701ff2bab57b67b20c90ada5d750bfc5ecb1c3746349c.ea963586.png)
      The following dialog opens. Enter the information, and then click **Continue**. Give the connection a name and click **Done**.
![](/assets/audienceonenewauth.1bd09e7f42b43f68ef8b53c630c3839cbf0ded7e852f1f454675b4698c9a72c6.ea963586.png)
5. Selecting an existing connection:


![](/assets/image-20190924-182845.f494df6945cfea1408773bdfc908f994d65e0ba5a7c2fd85dc917d8bae1c21d3.ea963586.png)

## Configure the Connection by Specifying the Parameters

After you select your AudienceOne connection, the Configuration dialog pane appears:

![](/assets/image-20190924-182923.bb5c5de61fd22436fcb044f96f3b3d920794069792830cf2b68129232b89b247.ea963586.png)

## Execute the query

Either save the query with a name and then run the query or just run the query. When the query completes successfully, the result is automatically processed.