--- title: "Usage of the If/Switch Macros with the Advance Alert, Default Subject Field" slug: "usage-of-the-ifswitch-macros-with-the-advance-alert-default-subject-field-1" updated: 2023-02-06T11:59:26Z published: 2023-02-06T11:59:26Z canonical: "docs.catchpoint.com/usage-of-the-ifswitch-macros-with-the-advance-alert-default-subject-field-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.catchpoint.com/llms.txt > Use this file to discover all available pages before exploring further. # Usage of the If/Switch Macros with the Advance Alert, Default Subject Field It is possible to customize the subject line for alert email notification using the `if` or `switch` macros. For example, to set the subject line to “It is a warning!” in the case of a WARNING (notification level), you can set the subject line using the `switch` macro as follows: `${switch ("${NotificationLevel}","Warning","It is a warning!","Critical","Down","Improved","Up","NA")}` Once implemented, when a warning alert is triggered for the test, the notification in the inbox will have the subject line as “It is a warning!”. Note: When using the `if` or `switch` macro with the email subject, they can only be used with the macros in the [Alert Email Macros](https://docs.catchpoint.com/docs/Alert-Email-Macros). Following are screenshots of the subject and alert notification sent based on the above example: ![alert_kb.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360090131212-alert_kb.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A59%3A41Z&se=2026-11-23T01%3A59%3A41Z&sr=b&sp=r&sig=ghBh0KUSCKnWgpq8rgAI24FwJWyg5p5vwwBpmtVJl5c%3D) ![alert useage if.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/alert%20useage%20if%281%29.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A59%3A41Z&se=2026-11-23T01%3A59%3A41Z&sr=b&sp=r&sig=Of%2FezqXDp5N0LKOIry91zUWxQdCVShSwDt81ws5llaE%3D)