Import segmentations from customer data platform

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

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:

[
  {
    "name": "Color",
    "segments": [
      {
        "name": "Green",
        "id": "id-green"
      },
      {
        "name": "Blue",
        "id": "id-blue"
      }
    ],
    "id": "id-color"
  }
]

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

[
  {
    "name": "Color",
    "segments": [
      {
        "name": "Green"
      },
      {
        "name": "Blue"
      }
    ]
  }
]

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

[
  {
    "name": "Color",
    "segments": [
      {
        "name": "Green",
        "id": "R3JlZW4="
      },
      {
        "name": "Blue",
        "id": "Qmx1ZQ=="
      }
    ],
    "id": "Q29sb3Iy"
  }
]

Import segmentations in Content audiences

In Content SaaS, navigate to the Content audiences app. You should see your CDP integration in the list.

Click on your CDP integration, select the Segmentations tab, and click on the Edit Segmentations button in the top right.

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

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:

The segmentations can now be used by site editors to personalize content!