Patronum Macros and Lookup Functionality
Patronum Macros and Lookup Functionality
This document explains the usage of macros within Patronum policies, including how macros work in workflows,
policy actions, executors, forwarding addresses, rename user configurations, assign user/group actions,
email templates, and the Policy Lookup module.
1. Overview of Macros in Patronum
Macros in Patronum are dynamic placeholders used throughout policies and workflows.
When a policy runs, Patronum evaluates the macro against the targeted user and replaces
the macro with the corresponding value.
Macros help automate policy behavior and reduce the need for creating multiple individual policies.
Macro | Purpose |
{Manager} | Uses the targeted user’s manager account. |
{Admin} | Uses the Patronum administrator account for the domain. |
{lookup} | Uses values configured in the Policy Lookup module based on matching conditions. |
{recoveryEmail} | Uses the targeted user’s recovery email address. |
{First Name} | Uses the user’s first name. |
{Last Name} | Uses the user’s last name. |
{Company Name} | Uses the company name of the targeted user. |
{email} | Uses the targeted user email address. |
{username} | Uses the targeted username. |
{first initial} | Uses the first character of the user first name. |
{lastinitial} | Uses the first character of the user last name. |
{firstname} | Uses the full first name of the user. |
{lastname} | Uses the full last name of the user. |
2. Policy Lookup Module ({lookup})
The {lookup} macro is a recently added feature in Patronum.
It allows administrators to centralize policy logic into a single reusable lookup table.
The lookup functionality is configured from:
Settings > Policy Lookup
When a policy runs and encounters the {lookup} macro, Patronum:
- Evaluates the targeted user conditions.
- Searches the Policy Lookup module.
- Finds the matching condition.
- Uses the configured attributes/actions associated with that condition.
Currently Supported Lookup Tasks
- Send Email
- Drive Transfer
- Archive Bucket
- Move To OU
Lookup Workflow Example
Example 1
If:
User custom attribute "department = Sales" AND user is suspended
Then:
• Email = sales_offboarding_alerts@company.com
• Drive Transfer = docarchive.sales@company.com
• Archive = retention_archive
• OU = /Sales
Example 2
If:
User custom attribute "department = Tech" AND user is suspended
Then:
• Email = tech_offboarding_alerts@company.com
• Drive Transfer = docarchive.tech@company.com
• Archive = retention_archive
• OU = /Tech
3. Macros in Policy Signatures
Macros are also used in policy Signatures configurations.
When selecting any attribute in the Signatures configuration, the selected attribute appears as a macro
inside the input field. During policy execution, Patronum checks whether the macro value exists
for the targeted user and dynamically configures the email based on the value.
4. Executors in Policies
Executors define who will execute or handle a configured task in a policy.
Supported executor macros include:
• {Manager}
• {Admin}
• {lookup}
Behavior:
• {Manager} → Task handled by the targeted user’s manager.
• {Admin} → Task handled by the Patronum administrator.
• {lookup} → Task handled using values resolved from the Policy Lookup module.
Important Note:
Currently, {lookup} executor support is available only for:
• Send Email
• Drive Transfer
• Archive Bucket
• Move To OU
5. Forwarding Address Macros
In the Settings section of policies, forwarding address configuration supports the following macros:
• {Manager}
• {Admin}
• {recoveryEmail}
When the policy runs, Patronum creates the forwarding address dynamically based on:
• The targeted user’s manager
• The domain administrator
• The targeted user’s recovery email
6. Rename User Macros
In:
Policy > Settings > Security > Rename User
The following macros are supported:
• {Manager}
• {First Name}
• {Last Name}
• {Company Name}
These values are dynamically resolved from the targeted user profile during policy execution except Company Name.
{company name} — the value we enter in Patronum comes from the settings.
7. Assign User Macros
In:
Policy > Settings > Security > Assign User
The configuration currently works using:
• {Manager}
The assigned user is resolved based on the targeted user’s manager.
8. Assign Group Macros
In:
Policy > Settings > Security > Assign Group
Supported macros include:
Assign Group Field:
• {email}
Group Owner Field:
• {Manager}
• {Admin}
Behavior:
• {email} → Uses the targeted user email address.
• {Manager} → Uses the targeted user manager.
• {Admin} → Uses the Patronum administrator of the domain.
9. Create User Email Template Macros
When configuring Create User email templates (Welcome and Notification templates),
administrators can configure templates using the following macro-based options:
• {manager}
• {admin}
• {username}
• {recoveryemail}
These macros allow the template behavior to dynamically adapt based on the user information.
10. Create User Form Macros
In the Create User form, while generating user email addresses, the following macros are supported:
• {first initial}
• {lastinitial}
• {firstname}
• {lastname}
These values are dynamically used to generate user email addresses according to organizational standards.
11. Vacation Policy Macros
In the Settings section of policies, Vacation configurations support macros.
When selecting any attribute in the configuration, the selected attribute appears as a macro inside the input field. During policy execution, Patronum checks whether the macro value exists for the targeted user and dynamically configures the vacation setting based on the resolved value.
This allows vacation policies to automatically adapt based on the targeted user’s information and configured attributes.
12. Alias Macros
In the Settings section of policies, Alias configuration supports the following macros:
- {firstName}
- {lastName}
- {userName}
These macros dynamically use the targeted user’s information to generate or configure aliases.
Behavior:
- {firstName} → Uses the targeted user’s first name.
- {lastName} → Uses the targeted user’s last name.
- {userName} → Uses the targeted username.
These macros help organizations standardize alias creation and automate user identity management within policies.
13. Best Practices
- Use {lookup} to centralize multiple policy conditions into a single workflow.
- Use dynamic macros instead of hardcoded values whenever possible.
- Validate user attributes before relying on macros in production workflows.
- Use Policy Lookup to simplify offboarding and organizational routing processes.
- Regularly review lookup conditions to ensure policy accuracy.
14. Conclusion
Macros in Patronum provide powerful dynamic automation capabilities that help organizations
streamline policy execution, reduce administrative overhead, and improve workflow consistency.
The addition of the Policy Lookup module further enhances flexibility by allowing organizations
to centralize and automate conditional policy routing using reusable lookup configurations.
Updated on: 21/05/2026
Thank you!
