thankful-gpu-70135
12/09/2023, 1:50 AMidentify call is ending up sending two events to klaviyo. You'll see this is an array of 2 events. The first is expected but the second is not as it's not patching anything.
So it seems like there is a bug here with the destination. It's causing issues on klaviyo's side in certain cases as it's stomping properties in our user profiles.
This may be a special case where we have identify calls that are modified by a transformation that drops all traits EXCEPT EMAIL and properties.subscribe.
[
{
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs",
"headers": {
"Authorization": "Klaviyo-API-Key xxxhiddenxxx",
"Content-Type": "application/json",
"Accept": "application/json",
"revision": "2023-02-22"
},
"params": {},
"body": {
"JSON": {
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"list_id": "SN6fp6",
"subscriptions": [
{
"email": "chrisb+one@bigcartel.com",
"channels": {
"email": [
"MARKETING"
]
}
}
]
}
}
},
"JSON_ARRAY": {},
"XML": {},
"FORM": {}
},
"files": {}
},
{
"version": "1",
"type": "REST",
"method": "PATCH",
"endpoint": "https://a.klaviyo.com/api/profiles/01HGXXREVZ9NAJ8TPKMSE39HH1",
"headers": {
"Authorization": "Klaviyo-API-Key xxxxxxx",
"Content-Type": "application/json",
"Accept": "application/json",
"revision": "2023-02-22"
},
"params": {},
"body": {
"JSON": {
"data": {
"type": "profile",
"attributes": {
"external_id": "14455",
"email": "chrisb+one@bigcartel.com",
"properties": {}
},
"id": "01HGXXREVZ9NAJ8TPKMSE39HH1"
}
},
"JSON_ARRAY": {},
"XML": {},
"FORM": {}
},
"files": {}
}
]millions-activity-52391
12/09/2023, 1:50 AMthankful-gpu-70135
12/11/2023, 8:40 AMmillions-activity-52391
12/11/2023, 11:46 AMthankful-gpu-70135
12/11/2023, 5:50 PMthankful-gpu-70135
12/11/2023, 6:49 PMpayload is empty and skip that call. There's no reason to make a PATCH call in that case because no props would ever be updated.
But the longer term fix is likely to not split the calls at all, but Rudderstack should talk to Klaviyo about what it recommendsmillions-activity-52391
12/12/2023, 12:24 PMthankful-gpu-70135
12/13/2023, 11:34 PMmillions-activity-52391
12/15/2023, 6:41 PMthankful-gpu-70135
12/17/2023, 5:30 AM/api/profiles
example body:
{
"data": {
"type": "profile",
"attributes": {
"external_id": "4781",
"email": "david+suppressed@bigcartel.com"
}
}
}thankful-gpu-70135
12/17/2023, 5:32 AM[
{
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs",
"headers": {
"Authorization": "Klaviyo-API-Key xxxxxhiddenxxxxx",
"Content-Type": "application/json",
"Accept": "application/json",
"revision": "2023-02-22"
},
"params": {},
"body": {
"JSON": {
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"list_id": "SN6fp6",
"subscriptions": [
{
"email": "david+suppressed@bigcartel.com",
"channels": {
"email": [
"MARKETING"
]
}
}
]
}
}
},
"JSON_ARRAY": {},
"XML": {},
"FORM": {}
},
"files": {}
},
{
"version": "1",
"type": "REST",
"method": "PATCH",
"endpoint": "https://a.klaviyo.com/api/profiles/01H946WQ5NEGBT47NQZ92JF07B",
"headers": {
"Authorization": "Klaviyo-API-Key pk_xxxxxxxhiddenxxxxxx",
"Content-Type": "application/json",
"Accept": "application/json",
"revision": "2023-02-22"
},
"params": {},
"body": {
"JSON": {
"data": {
"type": "profile",
"attributes": {
"external_id": "4781",
"email": "david+suppressed@bigcartel.com"
},
"id": "01H946WQ5NEGBT47NQZ92JF07B"
}
},
"JSON_ARRAY": {},
"XML": {},
"FORM": {}
},
"files": {}
}
]millions-activity-52391
12/18/2023, 2:04 PMmillions-activity-52391
12/18/2023, 2:45 PMthankful-gpu-70135
12/18/2023, 4:14 PMthankful-gpu-70135
12/18/2023, 4:15 PMmillions-activity-52391
12/18/2023, 5:00 PMthankful-gpu-70135
12/18/2023, 5:02 PMgroup event in your docs doesn't say anything about the subscription event:
> The group call lets you link an identified user with a group like a company, organization, or an account. You can also record any custom traits associated with that group like the company name, number of employees, etc.
Why would this work to send a properties.subscribe: true trait to klaviyo and not cause an error? This would then force us to great the notion of a group Id which isn't present today
Right now, the bug seems to be that we are using a transform to convert an identify call to a track call to them, but Rudderstack still insists on sending a PATCH call to them.bulky-breakfast-19942
12/18/2023, 5:08 PMgropId as equivalent to properties.listId . so you need to send your listId value as groupIdbulky-breakfast-19942
12/18/2023, 5:11 PMthankful-gpu-70135
12/19/2023, 5:29 PMproperties: {
subscribe: true
}
And the destination configuration has a LIstID (see screenshot). So if you're saying that the group call is the right way to do this, then the entire experience is wrong here for Klaviyo and likely others.
Also, the group call documentation doesn't even mention anything about email subscriptions in any way. The entire purpose of that call is to group users together into a group ID. Also, the listID is destination specific (just for Klaviyo) so it's confusing to use a generic group call for one destination.
In other words, a listId in klaviyo of "123ABC" does not apply to any other destination. It's super odd to me to have us send a generic group call like:
rudderanalytics.group("123-ABC");
when this only ever will apply to Klaviyo. Is this what you mean for us to do and stop sending properties.subscribe: true as part of our traits?millions-activity-52391
12/21/2023, 3:07 PMbulky-breakfast-19942
12/28/2023, 5:03 AMthankful-gpu-70135
12/28/2023, 5:47 AMbulky-breakfast-19942
12/28/2023, 6:02 AMthankful-gpu-70135
12/29/2023, 7:19 PMbulky-breakfast-19942
12/30/2023, 7:51 AMbulky-breakfast-19942
12/30/2023, 7:51 AMthankful-gpu-70135
12/31/2023, 3:18 AM