UserChoice
The record of a user's choice for one of your processing activities, its fields, and how to declare it in the schema.
Your goal
Know what a UserChoice holds and declare it in your schema, so that the platform can apply your users' choices and you can query them.
Expected outcome
UserChoice is declared in your published schema with the properties you query on indexed, and you know where each of its fields comes from.
What a UserChoice is
A UserChoice is the choice a user has made regarding data privacy and the data processing declared by your organisation. The platform uses it to adapt application behaviour to the user's choices automatically. Each UserChoice concerns one of your processing activities.
How choices are captured, and how they are enforced, is in Manage consent & Processing activities.
The UserChoice object
{
"$processing_id": "1004",
"$choice_ts": 1561622248000,
"$choice_acceptance_value": true,
"$creation_ts": 1561622248000,
"$channel_id": "1234",
"$choice_source_id": "1001",
"$user_agent_id": "vec:123456789",
"$compartment_id": "1234",
"$user_account_id": "123456789",
"$email_hash": {
"$hash": "a1b2c3d4e5",
"$email": "random@example.com"
},
"custom_property_1": "custom_value_1"
}$processing_id
The processing activity concerned. Mandatory by API; set automatically from $processing_token on a $set_user_choice event.
$choice_ts
When the choice was given by the user. Mandatory by API; set automatically from the event's $ts.
$choice_acceptance_value
The acceptance value. Mandatory by API; set automatically from the event property of the same name.
$creation_ts
System field. The creation timestamp of the choice. Cannot be modified, by API or by event.
$channel_id
The channel the choice was collected on. Optional by API; set automatically from the activity origin.
$choice_source_id
The source of the choice. Optional by API; set automatically from $choice_source_token. See When several sources set the same choice.
$user_agent_id, $user_account_id with $compartment_id, $email_hash
The identifiers. From a $set_user_choice event they are copied from the activity; through the /user_choices API they come from the request payload, or from the URL if the payload has none.
any custom property
Optional. Set automatically from the event's custom properties - this is where the evidence of a valid consent lives.
Declare choices in the schema
Any property can be indexed, and these should be: processing_id, choice_ts, creation_ts, and choice_acceptance_value. The others - standard or custom - are mostly used to prove the validity of a choice, so indexing them may not be necessary.
Related pages
Last updated
Was this helpful?