User choices import
Use this feature to UPSERT or DELETE user_choices in your datamart.
How-to
Use the bulk import endpoints to create a document import with theUSER_CHOICE
document type and APPLICATION_X_NDJSON
mime type. Only ndjson
data is supported for user choices.
Then, create an execution with your user choice import commands formatted in ndjson
.
User choice import command
Each line in the uploaded file can have the following properties:
field | type | description |
operation | Enum | Either |
compartment_id | String (Optional) | The Compartment ID, acting as a user identifier in correlation with |
user_account_id | String (Optional) | The User Account ID, acting as an identifier in correlation with |
email_hash | String (Optional) | The Email Hash, acting as an identifier |
user_agent_id | String (Optional) | The User Agent ID, acting as an identifier |
force_replace | Boolean (Optional) | Mandatory when the operation is
If false, the object passed in the |
user_choice | JSON Object (Optional) | Mandatory when operation is UPSERT. This is a JSON Object representing the User Choice. Please refer to the User choices page for more information. Note that the |
Example
You can, of course, upload multiple user choices at once. Note the uploaded data is in ndjson
format and not json
. That means the different choices are not separated by commas, but by a line separator \n
When importing choices with identifiers, only one identifier is allowed per line. For example, you shouldn't specify the user agent ID if the Email Hash is already used in a line.
Last updated