Use CASE Statements in Xink Email Signatures

Short answer:
Use a CASE...WHEN...THEN...ELSE statement to display different content in an email signature based on the value of a field. This allows you to manage multiple scenarios within a single signature template.


The CASE...WHEN...THEN...ELSE statement allows you to display different content in an email signature depending on the value of a field.

This is useful when you want a single signature template to display different content for different users, such as departments, office locations, languages, or job roles.

Instead of creating multiple signature templates, you can build dynamic logic directly into the template.

When to use a CASE statement

Use a CASE statement when content should change based on the value of a field, not just whether the field is empty.

Typical examples include:

  • Showing different phone numbers for different offices
  • Displaying region-specific legal disclaimers
  • Adding different marketing banners per department
  • Changing language based on office location

CASE statement syntax

Use the following syntax:

{$$CASE(Field)$$WHEN(Value1)$$THEN(Content for value1)$$WHEN(Value2)$$THEN(Content for value2)$$ELSE(Default content)$$}

How it works:

  • CASE(Field) → Checks the value of the field
  • WHEN(Value) → Defines a matching condition
  • THEN → Displays content when matched
  • ELSE → Displays fallback content if no match is found

Example 1 — Static phone numbers per office

Display a specific phone number based on the office location.

{$$CASE(Office)$$WHEN(New York)$$THEN(+1 212 555 1234)$$WHEN(London)$$THEN(+44 20 7123 4567)$$WHEN(Copenhagen)$$THEN(+45 33 12 45 67)$$ELSE(+1 800 555 0000)$$}

Result:

  • London users see the London number
  • New York users see the New York number
  • Others see the default number

Example 2 — Dynamic mobile numbers per office

Add country codes dynamically based on office location.

{$$CASE(Office)$$WHEN(New York)$$THEN(+1 ((Mobile)))$$WHEN(London)$$THEN(+44 ((Mobile)))$$WHEN(Copenhagen)$$THEN(+45 ((Mobile)))$$ELSE(((Phone)))$$}

Result:

  • Location-specific mobile numbers are shown
  • Fallback shows the default phone number

Example 3 — Marketing banners per department

{$$CASE(Department)$$WHEN(Sales)$$THEN(UPLOAD SALES BANNER)$$WHEN(Marketing)$$THEN(UPLOAD MARKETING BANNER)$$ELSE(UPLOAD DEFAULT BANNER)$$}

Result:

  • Sales users see campaign banners
  • Marketing users see marketing banners
  • Others see a default banner

Example 4 — Regional legal disclaimers

{$$CASE(Country)$$WHEN(Germany)$$THEN(German disclaimer)$$WHEN(France)$$THEN(French disclaimer)$$WHEN(UK)$$THEN(UK disclaimer)$$ELSE(Global disclaimer)$$}

Each user automatically receives the correct legal disclaimer.

How to implement a CASE statement

  1. Go to Signatures
  2. Open your template
  3. Insert the CASE statement
  4. Replace field names and values
  5. Click Preview
  6. Test with different users

Tips for building CASE statements

  • Match WHEN() values exactly with your data source
  • Always include an ELSE condition
  • Test thoroughly using Preview

CASE vs IFNULL vs NULL

  • NULL → hides empty fields
  • IFNULL → shows fallback if empty
  • CASE → changes content based on value

Combining these gives you full control over dynamic signature content.

Related guides

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
Quick 1-on-1 Demo | Ⓒ 2026 Xink