Skip to main content
Solved

Custom Integration - Update Record Not Working

  • September 28, 2023
  • 5 replies
  • 123 views

Forum|alt.badge.img+1

Hi Everyone,

We are implementing a custom integration and I’m running into an issues when trying to updated a record on a central lists. We are following the API docs but the update route doesn't appear to update.

 

Description of the issue: 

Trying to do this function
https://developers.klaviyo.com/en/reference/update_profile

 

We have custom fields in 2 variations, with and without $). No matter what I have tried, the values do not update. Can anyone help tell me what is wrong ?

URL: https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ
PATCH {"data":{"type":"profile","id":"01HBCAGPXQPBZ99VWECNSDR2RQ","attributes":{"external_id":"WLMD_UNID_OxEx9yDq","email":"justin@snappyscripts.com","phone_number":"+18475082279"},"properties":{"$lead_stage":"INTAKE","$therapy":"ED","lead_stage":"INTAKE","therapy":"ED"}}} to https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ

OP: /api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ
HTTPCODE 200
RESPONSE: {"data":{"type":"profile","id":"01HBCAGPXQPBZ99VWECNSDR2RQ","attributes":{"email":"justin@snappyscripts.com","phone_number":"+18475082279","external_id":"WLMD_UNID_OxEx9yDq","anonymous_id":null,"first_name":"Justin","last_name":"Beck","organization":null,"title":null,"image":null,"created":"2023-09-27T22:00:27+00:00","updated":"2023-09-28T01:28:42+00:00","last_event_date":"2023-09-28T01:27:27+00:00","location":{"address1":null,"address2":null,"city":"Fairfield","country":"United States","latitude":41.1412,"longitude":-73.2637,"region":"Connecticut","zip":null,"timezone":"America/New_York"},"properties":{"Accepts Marketing":true,"Shopify Tags":[],"$source":"Marketing Event","$consent":["email","sms"],"$consent_timestamp":"2023-09-28T01:27:26.651Z","$therapy":"test2","$lead_stage":"test2","therapy":"test3","lead_stage":"init"},"subscriptions":null},"relationships":{"lists":{"links":{"self":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/relationships/lists/","related":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/lists/"}},"segments":{"links":{"self":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/relationships/segments/","related":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/segments/"}}},"links":{"self":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/"}}}

 

 

Best answer by Brian Turcotte

Hi @snappyscripts!

My apologies for the delay here! I see that you were able to file a ticket with Support and they have provided further updates since your last reply to this thread - were they able to resolve the issue? 

 

Best,

Brian

View original
Did this topic or the replies in the thread help you find an answer to your question?

5 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @snappyscripts!

 

I’m going to check on this with Engineering and I’ll update the thread ASAP!

Best,

Brian


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • October 5, 2023

Hi @Brian Turcotte any updates on this ?  
 

Also rather than posting our issues in the forum is there a direct email with can speak with someone on the engineering team


Brian Turcotte
Forum|alt.badge.img+37

Hi @snappyscripts!

 

This is most likely due to a formatting error that is processed after the initial 200 response. Have you tried building the API call using our API docs by just filling in the blank/required spaces? This would help mitigate formatting errors:

 

Then, I would recommend using an API testing service like Postman to test the API call, and if it still fails, send us the exact cURL request (from the API docs, with any sensitive information/API keys redacted) and response from this test, so that we can have more insight into the formatting you’re using.

 

Best,

Brian


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • October 5, 2023

Hi Brain,


Thank the reply, we have tried following the Update Profile API documents but they are misdocumented. We have opened numerous support tickets and we receive replies that do not offer any real solutions . 

Is there any way possible to schedule a call or connect with someone from the integrations team to help us ?  

 

Below are the most recent notes from our Dev team;

 

Yes. No luck. I just ran it again to be sure. Below is my sent/recv and the screenshot showing it not being updated. 
Eric

URL: https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ
PATCH {"data":{"type":"profile","id":"01HBCAGPXQPBZ99VWECNSDR2RQ","attributes":{"external_id":"WLMD_UNID_OxEx9yDq","email":"justin@snappyscripts.com","phone_number":"+18475082279"},"properties":{"$lead_stage":"INTAKE","$therapy":"ED","lead_stage":"INTAKE","therapy":"ED"},"meta":{"patch_properties":{"append":{"lead_stage":"INTAKE","therapy":"ED"}}}}} to https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ

OP: /api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ
HTTPCODE 200
RESPONSE: {"data":{"type":"profile","id":"01HBCAGPXQPBZ99VWECNSDR2RQ","attributes":{"email":"justin@snappyscripts.com","phone_number":"+18475082279","external_id":"WLMD_UNID_OxEx9yDq","anonymous_id":null,"first_name":"Justin","last_name":"Beck","organization":null,"title":null,"image":null,"created":"2023-09-27T22:00:27+00:00","updated":"2023-09-30T04:35:36+00:00","last_event_date":"2023-09-30T04:35:36+00:00","location":{"address1":null,"address2":null,"city":"Fairfield","country":"United States","latitude":41.1412,"longitude":-73.2637,"region":"Connecticut","zip":null,"timezone":"America/New_York","ip":"3.134.118.47"},"properties":{"Accepts Marketing":true,"Shopify Tags":[],"$source":"Marketing Event","$consent":["email","sms"],"$consent_timestamp":"2023-09-30T04:35:35.953Z","$therapy":"test2","$lead_stage":"init","therapy":"test3","lead_stage":"init"},"subscriptions":null},"relationships":{"lists":{"links":{"self":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/relationships/lists/","related":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/lists/"}},"segments":{"links":{"self":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/relationships/segments/","related":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/segments/"}}},"links":{"self":"https://a.klaviyo.com/api/profiles/01HBCAGPXQPBZ99VWECNSDR2RQ/"}}}
Screenshot 2023-10-05 at 1.44.40 PM.png

 

Please advise.


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • October 19, 2023

Hi @snappyscripts!

My apologies for the delay here! I see that you were able to file a ticket with Support and they have provided further updates since your last reply to this thread - were they able to resolve the issue? 

 

Best,

Brian