-
Notifications
You must be signed in to change notification settings - Fork 47
Property value as array #75
Comments
As per the documentation this is how the format is documented to save array values on a property: https://help.klaviyo.com/hc/en-us/articles/115005237648-About-Data-Types#list6 |
Hi @wardwj Thanks for bringing this to our attention. I think there are two issues at hand here. First it appears the array in your example is actually a string which is why you see the escaped quotes on the profile in Klaviyo. Unfortunately, if you pass that array in as an array rather than a string Klaviyo will save each value in the array with an index suffix e.g. test[0], test[1]. The issue occurs when converting the query parameters to a query string. Php's http_build_query automatically indexes the keys e.g. While this can be resolved in future versions of the SDK, in the meantime you can hopefully utilize the identify endpoint. One thing to note, you'll need to use the email address instead of the profile ID. Here's an example:
|
any ETA of when this is likely to resolve? |
Passing an array (defined as a string) as a property value and encountering this issue:
Output in klaviyo:
testing =
[\"jon\",\"doe\"]
This is the code I'm using to create this
$this->klaviyo->updateProfile($klaviyoProfile["id"], ['testing' => '["jon","doe"]' ])
The text was updated successfully, but these errors were encountered: