I'm trying to figure out how to set a property on a user's Klaviyo profile to a value that's present in the data of a custom event that Black Crow AI sends into Klaviyo for the user.
The event is "Black Crow - Cross Sell Prediction" and the value from that event that we want to put in a user profile property called "blackcrow_storefront_url" is "{{ event.landing_page_url }}".
We want to do this so the URL for a personalized storefront we have for the user can be set on their profile so it can be used for that user in various flows/campaigns.
I'm trying to do this by having a flow triggered by the event and then using a Webhook to call Klaviyo's API to update user profile properties.
I don't think we want to use any API that requires including a private key within a webhook in a flow (or should I?) so we're trying to use this Destination URL: https://a.klaviyo.com/client/profiles/?company_id=XmstFr
And this JSON body:
{
"type": "profile",
"attributes": {
"email": "{{ person.email }}",
"properties": {
"blackcrow_storefront_url" : "{{ event.landing_page_url }}"
}
}
}
I’m currently getting a 400 error when I use Preview > Send Test Request but I'm not sure why.
What do you suggest as the best way to do what I'm trying to do?
If the general approach I'm taking is correct, is the Destination URL and the JSON body correct?
What Headers are required?
Why the 400 error?
It would be really nice if the "Profile property update" feature allowed us to use variables but it doesn't seem to. Any guidance is much appreciated!