Using Custom Variables
Last updated:
•
5 min read
Custom variables let you create reusable content blocks that can be used across all your signature templates. They’re perfect for disclaimers, promotions, and other shared content.
What Are Custom Variables?
Custom variables are organization-wide values you define that can be inserted into any signature template. Unlike user variables (which pull from Microsoft Entra ID), custom variables have the same value for everyone.
Use cases include:
- Legal disclaimers – Confidentiality notices, compliance text
- Promotional banners – Seasonal campaigns, event announcements
- Social links – Company social media URLs
- Contact information – Support email, general phone numbers
- Dynamic content – Content you want to update in one place
Creating a Custom Variable
- Navigate to Variables in the main menu
- Click Create New Variable
- Enter a Key (the variable name)
- Enter the Value (the content to display)
- Click Save
Naming Rules
Variable keys must follow these rules:
- Use only letters, numbers, and underscores
- No spaces or special characters
- Must start with a letter
- Case-sensitive (
Disclaimer≠disclaimer)
Good examples: disclaimer, promo_2024, supportEmail
Bad examples: my disclaimer, promo-banner, 123start
Using Custom Variables in Templates
Custom variables are automatically prefixed with custom_ to avoid conflicts with system variables.
If you create a variable with key disclaimer, use it in templates as:
{{custom_disclaimer}}
Example: Legal Disclaimer
Create a variable:
- Key:
disclaimer - Value:
This email and any attachments are confidential. If you received this in error, please delete it immediately.
Use in template:
<p style="font-size: 10px; color: #999;">
{{custom_disclaimer}}
</p>
Example: Promotional Banner
Create a variable:
- Key:
promo_banner - Value:
<a href="https://company.com/sale"><img src="https://company.com/images/sale-banner.png" alt="Summer Sale - 20% Off"></a>
Use in template:
<tr>
<td style="padding-top: 16px;">
{{custom_promo_banner}}
</td>
</tr>
HTML in Custom Variables
Custom variable values can contain HTML. This is useful for:
- Images with links
- Styled text blocks
- Complex layouts you want to reuse
Tip: When using HTML in custom variables, test thoroughly. Some email clients may strip certain HTML elements or attributes.
Updating Custom Variables
One of the main benefits of custom variables is easy updates:
- Go to Variables
- Find the variable you want to update
- Click Edit
- Change the value
- Click Save
The new value will appear in all signatures that use this variable, without needing to edit each template individually.
Conditional Custom Variables
You can use conditional blocks with custom variables:
{{#custom_promo_banner}}
<tr>
<td>{{custom_promo_banner}}</td>
</tr>
{{/custom_promo_banner}}
This is useful when you want to enable/disable content. Set the variable value to empty to hide the content, or add a value to show it.
Best Practices
- Use descriptive names –
legal_disclaimeris clearer thantext1 - Document your variables – Keep notes on what each variable is used for
- Test before deploying – Preview signatures after updating variables
- Use for shared content only – User-specific data should come from Microsoft Entra ID
- Keep HTML simple – Complex HTML may not render well in all email clients
Deleting Custom Variables
Before deleting a custom variable:
- Check which templates use it (search for
{{custom_variablename}}) - Remove or replace the variable reference in those templates
- Then delete the variable
If you delete a variable that’s still in use, the raw {{custom_variablename}} text will appear in signatures.
Was this article helpful?