Solved

Using update_property_link to add to a list rather than replacing value?

  • 30 September 2022
  • 1 reply
  • 175 views

Badge +4

Hi, I’m trying to allow subscribers to click on a link to update a custom property. The property is an array e.g. ["GS", "KS", "Promos", "Fun Things"]

 

When I use update_property_link with the link, the value replaces the entire array instead of adding to it. 

Is there a way to add to the array? Thanks!

icon

Best answer by alex.hong 1 October 2022, 03:59

View original

1 reply

Userlevel 7
Badge +58

Hi there @Happy Camper ,

Thanks for sharing.

It sounds like using a list data type would be appropriate here to store the information as a custom profile property, as you can add an array of values to a list data type. Please see About Data Types, specifically the section about "Lists":
 

A list is any array of values, e.g. ["Offer1", "Offer2"]. In Klaviyo, lists are used when the goal is to collect an array of words or phrases, where every single item in the array can be identified individually.

 

One common use case for this is when different tags are being collected under a single property, such as the Shopify Tags property. When Klaviyo stores a property as a list, this allows you to use the property in a segment or filter and then include as many available tags as you'd like — you have the ability to choose from any value stored as part of the list.

 

Another common use case is when Klaviyo captures a Placed Order metric through an integration and the data we receive along with this placed order includes an Items property. This single Items property will need to include all items purchased in the order.

 

2019-10-14_16-52-02.png

 
 

To achieve this, the property is always synced and stored as an array (a list) in Klaviyo. This allows us to store the Items property while including a series of values (i.e., each item purchased in the single order), where each value in the array can be identified individually.

When uploading a CSV that includes a list property, include the full list formatting within the cell. Make sure every entry in the column follows the list format, even if a particular person’s list contains only one item.

 

CSV_format.jpg

 

The only way to append more values within a list, other than having those value sync over through integration, is to manually upload the new values as an array.

Reply