For the complete documentation index, see llms.txt. This page is also available as Markdown.

Import segments

Add users to a segment, or remove them, from a file of identifiers.

Your goal

Place a list of users into one or more segments - an email list, a cookie list, a list of account IDs - or take them out again.

Expected outcome

The users in your file appear in the target segments, with the expiration behaviour you specified.

Run a segment import

1

Create the segment

In the side menu, go to Audience > Segments and click New Segment. Choose the User List type, fill in at least the name, and click Save. You are redirected to the segment page.

2

Create the import

In Computing Console, go to Jobs > Import, click New Import, and choose Datamart as the Destination type.

3

Configure it

Fill in:

  • Import name. The name for your import.

  • Document type. Choose User Segment.

  • Priority. LOW, MEDIUM, or HIGH.

Save when done.

4

Create an execution and upload the file

Create a new execution, then drag and drop your CSV. Ingestion can be followed from the same screen.

For best performance, keep each file to 100 MB at most, and split larger lists.

5

Check the result on the segment

Open the segment and look at its Import status tab. It shows every import made into the segment: the submission date, the status, the number of users treated, and the number actually imported.

The segment command

Field
Type
Description

operation

Enum, mandatory

UPDATE or DELETE.

expiration_duration

Integer, mandatory

The number of minutes before the user is removed from the segment. 0 means the user never leaves it.

compartment_id

String, optional

The compartment ID, as an identifier together with the account ID.

user_account_id

String, optional

The account ID, as an identifier together with the compartment ID.

email_hash

String, optional

The email hash, as an identifier.

user_agent_id

String, optional

The user agent ID, as an identifier.

segment_id

String, optional

The ID of the segment the user is inserted into or deleted from.

segment_ids

List of strings, optional

Several segment IDs, for example ["segment_id_1","segment_id_2"].

segment_technical_name

String, optional

The technical name of the segment.

segment_technical_names

List of strings, optional

Several technical names, for example ["technical_name_1","technical_name_2"].

expiration_ts

Number, optional

The timestamp at which the user expires from the segment. 0 means the user never leaves it.

data_bag

Escaped JSON string, optional

The data bag associated with the user–segment relationship.

Choosing between duration and timestamp

expiration_duration is relative to the import, expiration_ts is absolute. Pick according to what your list means:

You want
Use

Membership for a fixed window after the import, such as a 30-day retargeting list

expiration_duration

Membership until a specific date, such as the end of a campaign

expiration_ts

Permanent membership until you remove it

either, set to 0

Verify

  • The execution reports the success count you expected.

  • The segment's user count moves by roughly the number of lines imported - allowing for users already in it.

  • A user from the file appears in the segment, and leaves it when the expiration is reached.

Last updated

Was this helpful?