How to check multiple user attributes or other value types and insert the first available using JINJA templates

In some cases you might need to check if multiple Leanplum values, such as user attributes or event parameters, are set and insert any of them in an action. The following code will show how to check multiple values, insert the first one that's set or insert a default value if none are set.



{{userAttribute.ONE or userAttributeTWO or parameter.THREE | default('DEFAULT VALUE')}}

Useful resources:

Was this article helpful?
Have more questions? Submit a request