Segments import
Use this feature to add or remove user points from segments.
How-to
Use the bulk import endpoints to create a document import with the
USER_SEGMENT
document type andAPPLICATION_X_NDJSON
orTEXT_CSV
mime type.Create an execution with your user segment commands formatted in
ndjson
orcsv
depending on the mime type you chose.
User segment command
Each line in the uploaded file can have the following properties:
field
type
description
operation
Enum (Mandatory)
Either UPDATE
or DELETE
compartment_id
String (Optional)
The Compartment ID acting as a user identifier in correlation with the user account ID
user_account_id
String (Optional)
The User Account ID acting as a user identifier in correlation with the user account ID.
segment_id
String (Optional)
The Id of the segment in which the User is inserted/deleted.
segment_technical_name
String (Optional)
The technical name of the segment in which the User is inserted/deleted.
expiration_duration
Integer (Mandatory)
The number of minutes before the user will be removed from the segment. 0 means that the User will never leave the segment
expiration_ts
Number (Optional)
The timestamp of the expiration date of the User in the segment. A value of 0 means that the user will never leave the segment
data_bag
Escaped JSON String (Optional)
The data bag associated with the user/segment relationship
Example
You can have UPDATE and DELETE operations in the same file upload.
Please note, if not using csv
, that the uploaded data is in ndjson
and not json
. That means the different profiles are not separated by commas, but by a line separator \n
Last updated