Related posts I’ve read:
Hi all,
I’m trying to control $consent via API; doing a custom integration.
Right now, I’m only concerned about email consent, but in the future, other types may be required.
On our remote web application we have a tickbox “opt in to Marketing” and this should map to $consent[“email”].
We’re using the v1/identify api for synchronising our records to Klaviyo profiles, and all other custom fields are synchronising correctly.
- When creating a new contact (unique email address, e.g. subaddress for testing) if we send $consent: [] or $consent: false then the contact is still getting email consent, shown by checking the consent display block on the right hand side of the profile in Klaviyo
- When updating a contact, I can send $consent: [“email”] to give an existing contact with no consent, email consent, but sending $consent: [] does not remove it again
- I have tried many permutations using values null, [], false, “false”, “False”, “None”, “none”, [“none”], [“None”] with both keys $consent and $email_consent. I also tried email_consent: false and $consent: [false]
- We can successfully add a manual_exclusion for a contact using the v1/people/exclusion api however this isn’t really correct for our use case as by default all contacts would not have $consent, then if you tick the box on our side, we’d give them $consent, then if you untick the box we’d want to remove that - instead of keeping them with consent but excluding them; when you untick the box on our side and we send the exclusion, for now, I have to disable the tickbox unless the manual exclusion is removed in Klaviyo then we sync all exclusions overnight.
- We are not concerned at this point with specific lists or segments, just the overall consent state of the contact
- When I test sending various values to identify, I get a “1” back and can see that the timestamp shown in the profile consent block does update, but the consent state itself does not change