## Introduction

### Goal

Import segmentations from an external Customer Data Platform (CDP) so that they can be used to personalize content.

### Required Role

This task requires the [Site Admin](🔗) role.

### Prerequisites

  • A [Customer Data Platform integration](🔗) must have been added in your Content SaaS environment.

  • Your frontend application (SPA) must have [implemented segment-based personalization](🔗) for this CDP integration.

## Prepare Segmentations in JSON Format

The CDP integration is designed to work with any external CDP. Therefore, the segmentations managed in the CDP must be saved in a generic [JSON](🔗) format before they can be imported into [_Content audiences_](🔗).

The JSON must be an array of **segmentation** objects. Each **segmentation** object can have the following properties:

  • `name` (required): a string defining the segmentation's name

  • `id` (optional): a string defining the segmentation's identifier

  • `segments` (required): an array of **segment** objects

Each **segment** object can have the following properties:

  • `name` (required): a string defining the segment's name

  • `id` (optional): a string defining the segment's identifier

The `id` is used in the frontend application (SPA) to communicate visitor segments, as determined by the CDP, to Content SaaS, in order to get personalized content. If the CDP provides identifiers for segmentations and segments, you must use those. If the CDP doesn't provide identifiers, you may leave the `id` properties out and they will be automatically generated by [base64](🔗) encoding the `name` properties on import.

For example, consider a CDP defining one segmentation named "Color" with identifier "id-color", containing the segments "Green" (identifier "id-green") and "Blue" (identifier "id-blue"). You would use the following JSON to import this segmentation into _Content audiences_:



If the CDP only defined names for the segmentations and segments and no separate identifiers, you could leave out the `id` properties:



On importing the above JSON, the `id` properties would be automatically generated by base64 encoding the `name` properties:



### Import Segmentations in Content Audiences

In Content SaaS, navigate to the [_Content audiences_](🔗) app. You should see your [CDP integration](🔗) in the list.

1279


Click on your CDP integration, select the _Segmentations_ tab, and click on the _Edit Segmentations_ button in the top right.

1280


You can now either import the segmentations JSON from a file, or copy-paste it in the text area.

1280


Click on _Import_ to import the segmentations.

The imported segmentations should now be displayed in a list. You can click on a segmentations to view its details:

1279


The segmentations can now be used by site editors to [personalize content](🔗)!