You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
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. ?test[0]=jon&test[1]=doe and Klaviyo expects those values to instead be formatted like ?test=jon&test=doe.
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:
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: