Skip to main content
Solved

Accessing Profile Details in Webhook Json


I am designing a webhook to update contacts in my system when a profile enters the “Unsubscribed” list in Klaviyo. My profiles store an external ID that links them to their corresponding contact profiles on my system. The webhook needs to include this field which is stored as shown below. I also need to provide their unique Klaviyo Id in the JSON payload.

 

Above are the field I want in my payload.
 

 

Best answer by Brian Turcotte

Hi @Tomfrety!
 

I see you are attempting to include the External ID of a profile in your webhook payload, which is appearing blank during the webhook preview.

 

It appears that the syntax you used is correct, so I would first suggest confirming that the profile you selected for the preview actually has an External ID value. It’s possible that in the screenshot you provided, you were seeing the preview for a profile that had a blank External ID. You can change the profile you preview with by clicking this button at the top of the webhook preview window:

 

I would start by confirming this, and we can take it from there if it’s not the case.

 

Best,

Brian

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

3 replies

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

Hi @Tomfrety!
 

I see you are attempting to include the External ID of a profile in your webhook payload, which is appearing blank during the webhook preview.

 

It appears that the syntax you used is correct, so I would first suggest confirming that the profile you selected for the preview actually has an External ID value. It’s possible that in the screenshot you provided, you were seeing the preview for a profile that had a blank External ID. You can change the profile you preview with by clicking this button at the top of the webhook preview window:

 

I would start by confirming this, and we can take it from there if it’s not the case.

 

Best,

Brian


  • Author
  • Problem Solver I
  • 4 replies
  • August 10, 2023

Thanks for that; you are correct; I have accidentally removed the external ID. Do you know of a way also to attach the Klaviyo profile ID in the webhook payload? 


Forum|alt.badge.img+1
  • Contributor I
  • 4 replies
  • January 30, 2024

I would also like to know how to attach the Klaviyo Profile ID in the webhook payload. 

 

When i try to enter in person.id i get a “None”. 

This is really weird, as the normal response when data is not available, it will show an empty string.