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

# Use external data to target users

> Target users in Kameleoon experiments using external CRM or CDP data stored via the Data API Map endpoint and retrieved with the getRemoteVisitorData method.

## Using the Data API Map endpoint to store data[​](#using-the-data-api-map-endpoint-to-store-data "Direct link to Using the Data API Map endpoint to store data")

To store additional data on Kameleoon remote servers for use with feature flags and experiments, use the Data API Map endpoint to post data for each user. For further details, refer to the [Map documentation](/api-reference/map/update-data-for-several-keys).

This section explains how to retrieve and use data in feature flags and experiments. This allows for creating more targeted and personalized experiences for users based on relevant data.

### Create custom data[​](#create-custom-data "Direct link to Create custom data")

To use any data point as a targeting criterion, you first need to create a [custom data](/user-manual/assets/custom-data/create-custom-data) entry for the data point by following these steps:

1. In the [Kameleoon app](https://app.kameleoon.com), click **Configure** > **Custom data**.
2. In the **Custom data** section, click **New custom data**.
3. Choose the project.
4. Enter a descriptive name for the custom data.
5. For the acquisition method, choose **Kameleoon SDK method**.
6. For the type, select **Single** .
7. For the data format, select **String**.
8. Choose the appropriate [scope](../../custom-data#scope-for-targeting) for the data.
9. Click **Next** and **Skip** the following screen to save the custom data.

### Retrieve data from the Data API Map endpoint[​](#retrieve-data-from-the-data-api-map-endpoint "Direct link to Retrieve data from the Data API Map endpoint")

Once you've created the custom data, you need to do the following:

1. Retrieve the relevant data from the Data API Map endpoint by using the `getRemoteData` method. See the documentation for the SDK being used.

2. The `getRemoteData` method returns a JSON object that contains data related to the user. You can parse this JSON response to retrieve the data value you want to use as a targeting condition and set it as the value of the custom data entry using the SDK `addData()` method.

### Use the custom data as a targeting criterion[​](#use-the-custom-data-as-a-targeting-criterion "Direct link to Use the custom data as a targeting criterion")

You can now use the custom data entry as a targeting criteria in your feature flags. Here's how:

1. In the **Segments** page (**Configure** > **Segments**), create a new segment or open an existing segment to open the segment builder.
2. In the \**Custom Data* section, select the custom data as a targeting criterion.
3. Save the segment and use it in the feature flags.
