Can confirm that having thought that this issue was solved I have gone back and run my unit tests: they are now failing, so consent is no longer being set via the method recommended in one of the linked posts.
This is very important to my integration too and would appreciate a mod escalating this to support.
Same problem.
Please share the solution to fix the consent email problem
Thanks in advance
Who can we loop in to get some assistance on this?
Im using https://a.klaviyo.com/api/identify
I tried "$consent": "false" is not working. Could any one help
Thanks
looping @stephen.trumble for support
Hey @agrath , @dartacus , @Stef & @Aaron
First, I am so sorry that this post got lost in the frey, but hopefully I have the answer for you.
In order to suppress a profile via API, you would need to use the API call found here to add them to the exclusions list (suppressions) in your account: https://developers.klaviyo.com/en/reference/exclude-globally. This will still store all the profile's data in your account, but they will be suppressed and unable to receive emails going forward.
Hope this helps!
Hello @stephen.trumble
Yup I’m able to do execute and see the results as (consent status - x symbol).
However, if again want back the same email address to opt in to email consent. I’m not able to do it.
we have the below use case in our site,
In our website we have checkbox in edit form where user can change the email consent status to send or if unchecked not sent. Can we have solution for this use case?
Thanks
cc: @Stef, @dartacus @agrath
Thanks for the reply @stephen.trumble
Like, @Aaron mentioned in the last comment, I’ve got a similar issue as mentioned in my initial post.
As I could not find a way to remove the consent once it was added, I have currently used the exclusions API so that when the consent/opt-in tickbox is unticked on my side/in my other system, this is sent as an exclusion to Klaviyo, but could not find an API to remove that exclusion again.
So, my solution for that (which is not a good user experience) was that I had to disable the checkbox on my side if it had been previously checked but then unchecked and show the Klaviyo exclusion reason in a label/badge, forcing the user of my application to manually go to Klaviyo to remove it if required. And additionally do an overnight sync of the exclusions to ensure we avoid race conditions as best as we can (there appeared to be no way to get a webhook sent for changes in consent state, or exclusion state - outside of a flow)
To give context as to why we need to be able to remove consent instead of just add to the exclusion list, we have an initial state of contacts from a 3rd party system and some are active subscription product customers (so can be explictly opt-in), some are leads collected from other sources and have varying levels of opt-in (some would be explict opt in, others may be indeterminate) and some would be explictly opt-out from our current supression list behaviour in the migration.
I beleive it is different to have a contact on the exclusion list to just not having declared consent. Am I wrong?
I need to initialise all the state correctly during migration to Klaviyo and provide my customer a way to control what state the contact is in from our 3rd party system.
As I understand consent in Klaviyo, there are several states;
- Indeterminate (no consent specifically issued)
- Consent issued (green tick/explicit opt-in)
- Excluded (red tick/explicit opt-out)
Then these are per type (email, sms etc)
Can you please explain the difference between indeterminate (no explicit opt-in has been sent) and added to the exclusion list?
- Is there a charge for contacts on the exclusion list?
- Is there a charge for contacts that are not explictly opt-in, what i’m calling the indeterminate state?
- Can you send transactional emails (flows that have been explcitly marked as transactional by support) to a contact that’s in the exclusion list?
- For a contact that’s indeterminate, what can you/can’t you do? My understanding is you should look to obtain explict opt-in so this might mean sending them a welcome or do you want to be on our list email to ask them to explcitly subscribe.
From my perspective, it would be ideal to express the tri-state consent state (for email only) with three radio buttons in our other system, but there seems to be no way to remove consent once granted, and no way to remove an exclusion once added which makes this non-viable.
Thanks for your time,
Gareth
@Team any updates!! we are going Live coming week., so it would be great if we fix this.
I would also suggest to use same below API for both on and off.,
https://a.klaviyo.com/api/identify
like for email consent we are able to send ($consent : “email”) through the above API
and for off (email consent) why can’t we use the same API.?? Please consider the recommendation if it’s possible. Ideally it will save time to call different API call
@stephen.trumble @Stef
Thanks
Hey Gareth,
You can use the new v3 API endpoints to add and remove the green tick from profiles (instead of using the old v2 API endpoints).
Simply create a list (you can call it ‘all subscribers’) and set it to single opt-in in the settings.
Then POST to the v3 API endpoint Subscribe Profiles to add email profiles to the list (and have a green tick for consent on the profile).
Sample Payload:
{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"list_id": "listID",
"subscriptions": i
{
"email": "test@gmail.com"
}
]
}
}
}
If they unsubscribe, then POST to the v3 API endpoint Unsubscribe Profiles to remove email profiles from the list (and have a cross for consent on the profile).
Sample Payload:
{
"data": {
"type": "profile-unsubscription-bulk-create-job",
"attributes": {
"list_id": "listId",
"emails": a
"test@gmail.com"
]
}
}
}
I hope this helps…
D
Also to add, if you want to check consent status server side, you can do it in one call using the new v3 Get Profiles query; you can query by email in one call.
eg.
GET
https://a.klaviyo.com/api/profiles/?filter=equals(email,"test%40gmail.com")
Will return a profile object (and $consent status) of test@gmail.com from your Klaviyo account.
D
Does anybody know if there are equivalent calls that can be made using the client side object?
I can set the initial $consent using the identity call, but I can’t find a way to remove it using just the client side javascript.
Thanks
This is fantastic news, thank you!
G
Hey Gareth,
You can use the new v3 API endpoints to add and remove the green tick from profiles (instead of using the old v2 API endpoints).
Simply create a list (you can call it ‘all subscribers’) and set it to single opt-in in the settings.
Then POST to the v3 API endpoint Subscribe Profiles to add email profiles to the list (and have a green tick for consent on the profile).
Sample Payload:
{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"list_id": "listID",
"subscriptions": t
{
"email": "test@gmail.com"
}
]
}
}
}
If they unsubscribe, then POST to the v3 API endpoint Unsubscribe Profiles to remove email profiles from the list (and have a cross for consent on the profile).
Sample Payload:
{
"data": {
"type": "profile-unsubscription-bulk-create-job",
"attributes": {
"list_id": "listId",
"emails": m
"test@gmail.com"
]
}
}
}
I hope this helps…
D
I understand I can use remove the green consent using the method from @doanthan however that requires your private key which shouldn’t be revealed client side.
Like the request from @TTook is there a way to remove consent client side?