Apply a Signature based on Department

You can assign specific email signatures to users based on their department in Azure Active Directory (Azure AD) or Active Directory (AD). To do this, create a custom rule in Crossware.

This method works as a workaround for applying signatures to Dynamic Distribution Groups in Crossware.


Create a Rule

  1. Sign in to the Crossware Portal and navigate to the Rules section.

  2. Select New Rule and enter a name (for example, DepartmentSelection).

We have the rule DepartmentSelection loaded in the signature database

  1. Click the CUSTOM tab and Add one of the following C# scripts, depending on your scenario.

Example: One Department

This script applies the signature only when the sender belongs to the Finance department.

C#
string strDepartment;
strDepartment = "(!Department!)";

if (strDepartment == "Finance") {
 return true;
}
return false;

Example: Multiple Departments

This script applies the signature when the sender’s department matches any department in the list.

C#
List <string> departmentsList=new List <string>();
departmentsList.Add("finance");
departmentsList.Add("management");
departmentsList.Add("marketing");
string userDepartment = "(!Department!)";
string strData;
strData = "(!Department!)";
foreach(string dep in departmentsList) {
  if (String.Equals(userDepartment,dep,StringComparison.OrdinalIgnoreCase)) {
    return true; 
  }
}
return false;
image-20260305-223539.png


Set Signature Priority

  1. Go to Order of Selection.

  2. Make sure the rule-linked signature is placed above default signatures so it’s evaluated first.


Test the Setup

  1. Send a test email from a user in the specified department.

  2. Verify that the correct signature is applied based on the rule.


Crossware automatically applies the signature assigned for specific department in your organisation.

Last updated: