Solved

Adding more Complex Customer Profile Properties

  • 16 January 2024
  • 5 replies
  • 170 views

Badge

In our shopify we’re collecting occasions important to our customers (nephew’s birthday, their anniversary etc.). These occasions contain the following fields: recipient’s name, the date, the occasion type, the type of person the recipient is (and an occasion ID, created at date), which are stored via API in a database.

 

I think we would need to use Customer Profile Properties to be able to use these in segments and flows (e.g. sending a reminder email when a birthday is coming up, with suggestions for relevant gifts).

 

Do you have any advice on how to achieve this - e.g. using the key-value pairs of Customer Profile Properties, should there be a new property for each occasion field (perhaps utilising the occasion ID) - as they will need to be able to be related to each other somehow (so we can e.g. get the recipient’s name attached to an occasion date) - and will also need to be able to update / delete.

 

Any advice would be greatly appreciated! 

icon

Best answer by saulblum 16 January 2024, 18:01

View original

5 replies

Badge

Can JSON be used in Customer Profile Properties? This might be a solution.

Userlevel 5
Badge +7

Can JSON be used in Customer Profile Properties? This might be a solution.

You can store JSON objects and arrays in profile properties, and you can access nested properties or  loop through an array in email templates. There’s also a dictfilter django filter you can use to find a specific block in a key-value pair.

But you can’t, say, segment profiles on nested properties of those JSON objects. You also can’t have a date-triggered flow that uses a nested date property; the profile property you use has to store the date you want to trigger the flow on.

Badge

@saulblum thank you, that’s really helpful. While I think adding adding and amending this data would be fine, I can’t wrap my head around how I would use it as intended in flows.

In your opinion, would I be better creating the logic for this outside of Klaviyo and then creating an event API request for each occasion, with the information associated to the occasion included in the request?

Any other insight you have would be greatly appreciated.

Thanks,

Userlevel 5
Badge +7

If you want to trigger Klaviyo emails on dates stored in those objects, yes, your best bet would be to manage the date calculations outside Klaviyo and send an event to the profile at the right time, with whatever properties you want to access in the event body.

Badge

Thank you @saulblum, I appreciate your help!

Reply