This guide explains how to display a manager's information, such as their full name or email address, in a message template.
By default, the [manager] attribute returns an internal object reference, not a human-readable value. To retrieve specific details like a name or email, you must use the [REFERENCE] function to look up the manager's user profile and return the desired attribute.
The [REFERENCE] Function
The [REFERENCE] function looks up an object (like a user, group, or department) and returns a specified attribute from that object.
The general syntax for the function is: [REFERENCE;<AttributeToReturn>;<LookupAttribute>;<ObjectType>;<SourceAttributeValue>]
-
AttributeToReturn: The attribute you want to display (e.g.,
DisplayName,Email). -
LookupAttribute: The attribute used to find the object (e.g.,
UserId,EmployeeNumber). -
ObjectType: A number specifying the type of object to look up.
-
SourceAttributeValue: The attribute containing the reference value (in this case,
[manager]).
Configuration Examples
The specific LookupAttribute to use depends on the source HR system.
For Users from Visma
Users imported from Visma have a UserId that is used to look up the manager's profile.
-
To get the manager's full name:
[REFERENCE;DisplayName;UserId;1;[manager]] -
To get the manager's email address:
[REFERENCE;Email;UserId;1;[manager]] -
To get the manager's mobile number:
[REFERENCE;Mobile;UserId;1;[manager]]
For Users from Agresso (UBW)
For users imported from Agresso (Unit4 Business World), the manager reference is their EmployeeNumber.
-
To get the manager's full name:
[REFERENCE;DisplayName;EmployeeNumber;1;[manager]] -
To get the manager's email address:
[REFERENCE;Email;EmployeeNumber;1;[manager]] -
To get the manager's mobile number:
[REFERENCE;Mobile;EmployeeNumber;1;[manager]]
Procedure
Follow these steps to add the manager's details to a notification.
-
Navigate to and open the message template you wish to edit.
-
Insert the appropriate
[REFERENCE]expression into the message body or subject line where you want the information to appear. The example below shows how to add the manager's name to a data table within the notification. -
Optionally, you can create a clickable email link for the manager. To do this, use the
mailto:prefix when inserting a link.-
URL:
mailto:[REFERENCE;Email;UserId;1;[manager]] -
Text to display:
[REFERENCE;DisplayName;UserId;1;[manager]]
-
This configuration will display the manager's full name as a clickable link that opens a new email addressed to them.