🎉  Userflow joins forces with Beamer to create all-in-one growth toolkit

Read more
blog single image
blog single image
Userflow Updates

List attributes

blog author
Sebastian Seilund

June 22, 2022

You can now store list attributes in Userflow (in addition to strings, boolean, numbers and dates).

List attributes are useful for e.g. representing all the features a user has access to, or a list of roles they posses.

Setting list attributes (either via Userflow.js or via our REST API) is very simple:

userflow.identify(user.id, {
 features: ['flows', 'launchers', 'checklists']
})

Appending, prepending, remove list values

We even have a few new list operations (append, prepend and remove) for manipulating existing list attributes. See Userflow.js docs. Example of adding "themes" to the end of list attribute called features:

userflow.updateUser({
 features: {append: 'themes'}
})

Using list attributes in flows

When using list attributes in a condition in the builder, you can target users whose list includes "one or more of" or "all of" the given values:

list-condition

Migrating string attributes to lists

If you have existing string attributes formatted as comma-separated lists, you may want to migrate these to proper list attributes to take advantage of the better condition support.

The best way to migrate is to start writing the new list attribute to a different attribute name. Let's say you had this before:

userflow.identify(user.id, {
 features: 'flows,launchers,checklists'
})

Then run both the old string attribute and the new list attribute side-by-side for a while. This is so your existing flows that depend on the old features attribute do not break.

userflow.identify(user.id, {
 features: 'flows,launchers,checklists',
 // Name this whatever you want, this is just an example
 features_list: ['flows', 'launchers', 'checklists']
})

Finally, you can change your content to start using the features_list attribute instead of features.

Note that it is allowed to switch the data type of existing attributes from string to list, and vice versa, but be careful:

  • When you change a string attribute to a list attribute, all existing values will become lists with 1 element containing the string value. 'a,b,c' will become ['a,b,c'] (we don't automatically split comma-separated strings).
  • When you change a list attribute to a string attribute, all existing values will become the first element of the list (i.e. any additional elements are dropped). ['a', 'b', 'c'] will become 'a'.

🤔 Teaser

I wonder what kind of survey question list attributes could be useful for? It rhymes with Schmultiple Schelection.

2 min 33 sec. read

blog single image
Userflow Updates

List attributes

blog author
Sebastian Seilund

June 22, 2022

You can now store list attributes in Userflow (in addition to strings, boolean, numbers and dates).

List attributes are useful for e.g. representing all the features a user has access to, or a list of roles they posses.

Setting list attributes (either via Userflow.js or via our REST API) is very simple:

userflow.identify(user.id, {
 features: ['flows', 'launchers', 'checklists']
})

Appending, prepending, remove list values

We even have a few new list operations (append, prepend and remove) for manipulating existing list attributes. See Userflow.js docs. Example of adding "themes" to the end of list attribute called features:

userflow.updateUser({
 features: {append: 'themes'}
})

Using list attributes in flows

When using list attributes in a condition in the builder, you can target users whose list includes "one or more of" or "all of" the given values:

list-condition

Migrating string attributes to lists

If you have existing string attributes formatted as comma-separated lists, you may want to migrate these to proper list attributes to take advantage of the better condition support.

The best way to migrate is to start writing the new list attribute to a different attribute name. Let's say you had this before:

userflow.identify(user.id, {
 features: 'flows,launchers,checklists'
})

Then run both the old string attribute and the new list attribute side-by-side for a while. This is so your existing flows that depend on the old features attribute do not break.

userflow.identify(user.id, {
 features: 'flows,launchers,checklists',
 // Name this whatever you want, this is just an example
 features_list: ['flows', 'launchers', 'checklists']
})

Finally, you can change your content to start using the features_list attribute instead of features.

Note that it is allowed to switch the data type of existing attributes from string to list, and vice versa, but be careful:

  • When you change a string attribute to a list attribute, all existing values will become lists with 1 element containing the string value. 'a,b,c' will become ['a,b,c'] (we don't automatically split comma-separated strings).
  • When you change a list attribute to a string attribute, all existing values will become the first element of the list (i.e. any additional elements are dropped). ['a', 'b', 'c'] will become 'a'.

🤔 Teaser

I wonder what kind of survey question list attributes could be useful for? It rhymes with Schmultiple Schelection.

2 min 33 sec. read

You can now store list attributes in Userflow (in addition to strings, boolean, numbers and dates).

List attributes are useful for e.g. representing all the features a user has access to, or a list of roles they posses.

Setting list attributes (either via Userflow.js or via our REST API) is very simple:

userflow.identify(user.id, {
 features: ['flows', 'launchers', 'checklists']
})

Appending, prepending, remove list values

We even have a few new list operations (append, prepend and remove) for manipulating existing list attributes. See Userflow.js docs. Example of adding "themes" to the end of list attribute called features:

userflow.updateUser({
 features: {append: 'themes'}
})

Using list attributes in flows

When using list attributes in a condition in the builder, you can target users whose list includes "one or more of" or "all of" the given values:

list-condition

Migrating string attributes to lists

If you have existing string attributes formatted as comma-separated lists, you may want to migrate these to proper list attributes to take advantage of the better condition support.

The best way to migrate is to start writing the new list attribute to a different attribute name. Let's say you had this before:

userflow.identify(user.id, {
 features: 'flows,launchers,checklists'
})

Then run both the old string attribute and the new list attribute side-by-side for a while. This is so your existing flows that depend on the old features attribute do not break.

userflow.identify(user.id, {
 features: 'flows,launchers,checklists',
 // Name this whatever you want, this is just an example
 features_list: ['flows', 'launchers', 'checklists']
})

Finally, you can change your content to start using the features_list attribute instead of features.

Note that it is allowed to switch the data type of existing attributes from string to list, and vice versa, but be careful:

  • When you change a string attribute to a list attribute, all existing values will become lists with 1 element containing the string value. 'a,b,c' will become ['a,b,c'] (we don't automatically split comma-separated strings).
  • When you change a list attribute to a string attribute, all existing values will become the first element of the list (i.e. any additional elements are dropped). ['a', 'b', 'c'] will become 'a'.

🤔 Teaser

I wonder what kind of survey question list attributes could be useful for? It rhymes with Schmultiple Schelection.

About the author

Co-Founder of Userflow

Sebastian Seilund is the co-founder and former CEO of Userflow, where he built one of the leading user onboarding platforms for SaaS companies. With experience as a software engineer at Google and having founded multiple successful software companies, including Denmark's first user-friendly accounting software, Sebastian brings deep technical expertise to discussions about product-led growth and user experience.

Effortless Onboarding,
Powerful Results

Try the most-loved user onboarding product on the market.

CASE STUDIES

All case studies
iconicon

Evocalize

a case study

How Evocalize Boosted Product Adoption and Engagement With Userflow 

Learn how
iconicon

Visma Dinero

a case study

How Visma Dinero provides 24/7 onboarding and support with in-app content and AI Assistant.

Learn how
iconicon

Iteratively

a case study

How Iteratively gives users an awesome first-time experience

Learn how
iconicon