Add Personalization Using Variables
Contents
- How to use variables in Dado
- Examples of how variables are shown to employees
- Setting fallback values for variables
- Adding your own custom variables
- Advanced customization for dates
How to use variables to personalize content in Dado
Variables enable you to insert information personalized to each employee into a Message, Task or Automation. When the Task is sent to recipients, the variable will be replaced with the corresponding text.
For instance, you can use variables to:
- greet an employee by name
- tell a new hire the name of their buddy
- confirm a new hire's start date to their manager
Examples of how variables are shown to employees
Text with variables | Text as shown to an employee |
Welcome to the company, {{ participant.firstName }}. Your first day at work will be {{ participant.startDate }} | Welcome to the company, Max. Your first day at work will be 05/21/2021. |
Make sure to book a 1:1 meeting with your manager {{ manager.fullName }}. Their email is {{ manager.email }}. | Make sure to book a 1:1 meeting with your manager Maria Vasquez. Their email is maria.vasquez@company.com |
Your new hire {{ participant.fullName }} starts in two weeks. You can write them an email at {{ participant.personalEmail }} | Your new hire Maxine Zauber starts on 05/21/2021. You can write them an email at maxine.z.1997@gmail.com |
Setting fallback values for variables
When you use a variable in a timeline item, but that data is missing for a particular employee, Dado defaults to showing the variable label:
Text shown to an employee, where Dado has the data | Text shown to an employee, where the data is missing |
Welcome to the company, Max. | Welcome to the company, {{ participant.firstName }}. |
Your first day at work will be 05/21/2021. | Your first day at work will be {{ participant.startDate }} |
Usually this isn't a problem, as you will be importing all the key datapoints (eg name, first day at work) into Dado. However, there will be some occasions when you insert a variable and know that sometimes the data will be missing for some employees. In this situation, you can set a fallback value using the following syntax:
Within the curly braces, add two pipe characters ( || ) and then type your fallback value, enclosed by double-quotes.
Fallbacks can be set anywhere you use variables.
Text with variables and fallback | Text shown to an employee, where the data is present | Text shown to an employee, where the data is missing |
Laptop request from new joiner: {{ participant.laptopPreference || "No preference" }} | Laptop request from new joiner: Macbook 13" | Laptop request from new joiner: No preference |
Adding your own custom variables
Any Custom Fields you add to Dado user profiles can be used as variables. So, if you added a Custom Field called "favorite color", you could insert it into a Task/Message/Automation using the Variable {{ participant.favoriteColor }}
For more information see the article Add Custom Fields with Extra User Data
Advanced customization for dates
Variables that contain dates such as {{ participant.startDate }} can be further customized to display only parts of the date or specific formats.
To use this advanced feature, add a pipe symbol (|) after the date variable followed by a date token, such as this:
{{ participant.startDate | dd.mm.YYYY }}
Examples
Variable Date Token | |||
[month number].[year with 2 digits] | {{ participant.terminationDate | MM.YY }} | 06.22 | |
[month name] [year with 4 digits] | {{ participant.startDate | MMMM YYYY }} | June 2022 | |
[day of the week], [month] [day] | {{ participant.terminationDate | dddd, MMMM DD }} | Thursday, June 23 | |
[day of the week], [month] [day] for the Monday at the start of that calendar week |
{{ participant.terminationDate | dddd, MMMM DD :: mondayOfWeek}} | Monday, June 20 | |
[quarter number]-[year with 4 digits] | {{ participant.startDate | [Q]Q-YYYY}} |
Q2-2022 | |
|
|
|
List of date tokens
YYYY
: 4-digit year, e.g. '2021'YY
: 2-digit year, e.g. '21'MMMM
: Full-length month, e.g. 'June'MMM
: 3-character month, e.g. 'Jun'MM
: Month of the year, zero-padded e.g. '06'M
: Month of the year, e.g. '6'DD
: Day of the month, with zero e.g. '01'D
: Day of the month e.g. '1'dddd
: Day of the week, e.g. 'Sundayddd
: 3-character day of the week, e.g. 'Sun'ww
: week of the year, e.g. '52'Q
: number of calendar quarter, e.g. '2':: mondayOfWeek
: add this at the end of the date tokens to specify the date of the Monday that starts that week, instead of the date itself (see the example above)