Jeff with support engineering here. We resolved this offline, but for the sake of transparency, the reason why two profiles are being created is because the payload has two profile objects within the profile array:
{"profiles": [
{ "email": input_data["email"] },
{
"first_name": input_data["name"],
"phone_number": input_data["phone_number"],
"sms_consent": sms_consent,
"$consent": ["sms","email"]
}
]}
The curly bracket {} signify separate profiles. So if we wanted all this information to sync over as one profile it would look like this:
payload = {
"profiles": [{
"email": input_data["email"],
"first_name": input_data["name"],
"phone_number": input_data["phone_number"],
"sms_consent": sms_consent,
"$consent": ["sms", "email"]
}]
}
In the above payload, we include all information within one set of curly brackets {} and they will sync to Klaviyo as one profile.
Thanks for sharing your question with us! I’m gonna loop in one of our engineers to take a peek at this as this payload looks correct for me and doesn’t show any obvious errors!
Jeff with support engineering here. We resolved this offline, but for the sake of transparency, the reason why two profiles are being created is because the payload has two profile objects within the profile array:
{"profiles": [
{ "email": input_data["email"] },
{
"first_name": input_data["name"],
"phone_number": input_data["phone_number"],
"sms_consent": sms_consent,
"$consent": ["sms","email"]
}
]}
The curly bracket {} signify separate profiles. So if we wanted all this information to sync over as one profile it would look like this:
payload = {
"profiles": [{
"email": input_data["email"],
"first_name": input_data["name"],
"phone_number": input_data["phone_number"],
"sms_consent": sms_consent,
"$consent": ["sms", "email"]
}]
}
In the above payload, we include all information within one set of curly brackets {} and they will sync to Klaviyo as one profile.
Search saves time. Contributing compounds value.
The ROI of your reply? One helpful answer can support dozens of teams, build your credibility, sharpen your own expertise over time, foster connectivity, and create good karma – because what goes around comes around. The community is what YOU make it.