Conditional notification contents
Conditional notification contents allow you to target content to specific audiences using the same notification policy and templates. You can display dynamic content for different customer segments based on their account information, such as organizational affiliation, group membership, or specific attributes.
Strivacity leverages Liquid, and open-sourced template language created by Shopify. You can find more information about the template engine at the link.
Variables
Notification HTML templates support complex logical expressions. You can apply conditional logic to notifications using the following account-related variables:
Objects | Members | Note |
---|---|---|
account | userName streetAddress region primaryPhoneNumber primaryEmail postalCode picture nickName nationalID middleName jobTitle id givenName genderCustom gender familyName department dateOfBirth country company city | The account. object can be expanded by adding custom attributes to the identity store. You can define the name of the variable in the "Attribute name" field. |
groups[] | contains objects with group name and ID members (of the groups the account is a member of) | Thegroups. list elements are the groups the account is a member of. New groups. elements are generated and added to the list when creating new groups in the Admin Console. |
organization | id name routes |
Autocomplete is supported for objects in the notification HTML editor.
Personalization
Custom variables
You can define custom variables that display different contents for varying customer segments:
This example introduces a new variable that changes its content based on an account's group membership.
Here's what the "Password reset" message looks like for a member of the "Bluemsbury customers" group:
Personalized message contents
This example contains conditional logic for showing email signautes for accounts of a specific group.
Notifications can display varying message contents for different customer bases, such as personalized signature blocks:
Here's what the "Account update" notification looks like for a member of the group:
Updated 30 days ago