Solved

Removing a property from an array

  • 16 December 2021
  • 1 reply
  • 225 views

Badge +2

Is it possible to remove a value from a custom property array? Or is it only possible to replace the existing value?

I’m worried about a race condition where a klaviyo flow adds an item to the array at the same time as my custom integration is resetting the value with /identify.

icon

Best answer by David To 16 December 2021, 19:50

View original

1 reply

Userlevel 7
Badge +60

Hello @FeralTree,

Great question!

Although you can remove and unset profile properties using either the API or an Update Profile Property flow step method, this would remove/unset the entire profile property as a whole. You would not be able to remove/unset a specific value if the profile property was recorded in an array format. 

Depending on what your goal may be, I would suggest building in some delay as part of your identify calls or utilizing flow filters to alleviate these race conditions from occurring. If it helps, @Digimatic has a great thread on a similar subject of utilizing APIs to unset profile properties which I’ve included below:

I hope this helps!

David

Reply