To customize alert content with an event rule, open Transform and compose alert output, extract the event values you need, and compose the alert fields from those values. Choose the attributes that should appear in the generated alert and configure field ordering so operators see the information needed to investigate.
Plan the alert fields before changing the rule
Start with one event source and a representative event. Decide what an operator needs to recognize the affected resource, understand the condition, and choose the next investigation step. Write down the intended alert text and supporting attributes before opening the designer. This makes it easier to distinguish a missing input value from an incorrect composition.
Transform creates a field from event information. Its name and value can appear in Additional Information or Alert Tags, while the extracted expression appears under Expressions in Event Input. Compose determines the text placed in a selected output field. Use extraction when an incoming string contains several pieces of information; use composition when existing fields already contain the values you need.
Compare the resulting alert with its source event when checking the result. Judge the transformation by the generated alert, not by the source event alone. For the surrounding processing model, see ServiceNow event rules.
Customize alert content with an event rule
The role required to create or edit an event rule and configure its alert content is evt_mgmt_admin. Navigate to All > Event Management > Rules > Event Rules. Open the intended rule, or select New to create one. Ensure Active is selected and use a meaningful name that identifies the event family and the intended output.
- Inspect Source and Event Filter so the rule applies to the intended incoming events.
- Review Order against other rules that could match those events.
- Open Transform and compose alert output.
- Select an event field in Event Input to inspect its value in the left work area.
- Define the extracted expressions and compose the required output fields.
- Select the manual attributes you want included, then select Save or Update.
Deactivating a rule does not stop its alerts by itself. Event Management finds and applies another matching rule, and an alert is still created unless an applicable Ignore configuration prevents it.
An existing rule can display a banner saying it cannot be viewed in the event rule designer. Select Save and Upgrade when that banner appears and you intend to convert the rule for editing. Plan to review the converted configuration before making further changes.
The fields in the left work area represent fields in the generated alert. Treat that area as the output design you are building. Keep the main text readable and place supporting identifiers in separate attributes when operators need to inspect them independently. This is a design recommendation: choose the arrangement around the investigation your team actually performs.
Check the interface on your instance and release before applying the sequence. In Brazil, Ignore automation and Enrich automation in Service Operations Workspace are the updated way to filter out irrelevant alerts and standardize alert data. If the work belongs in that interface, review configuring alerts in Service Operations Workspace before introducing a separate rule.
Extract values with Transform
For a straightforward selection, click the input field and choose standard edit mode. Highlight the text with the pencil cursor, then select a field name or enter an expression name. The selected value and its expression use matching highlight colors, helping you verify what each extraction contains. Select Done to add the result to Expressions.
The available names include existing event fields, additional information fields, and previously defined alert tags. Tag names carry the t_ prefix. Transform field names cannot contain a single quote. Choose names that identify the value rather than the sample text, so another administrator can understand the rule when a different event arrives.
Standard edit mode supports undo. It is unavailable when Accessibility enabled is selected in System Settings. Account for that difference when planning how the administrator will select text; do not assume the missing mode means the event value is unavailable.
Use regex edit mode when a structured string needs parsing. Select the input field, choose regex edit mode, and highlight the text to capture. Replace the highlighted text with (.*), then complete the pattern so it matches the entire input. For example, ^([^_]+)_ fails on vhxy2stlgwc_8888_hec03v012979 because the rest of the input is unmatched, while ^([^_]+)_.* matches. In Expressions, use Select or Add Field to choose or name the result, then select Done. Keep captured variables in their original sequence even when you omit some values from the output.
The regex uses Java Matcher with whole-input matching. A pattern that recognizes just a leading fragment can fail because the remaining input is unmatched. Test the complete input, including trailing text and line breaks. Pattern.DOTALL is enabled, lookahead is supported, and lookbehind is unsupported. Regex mode has no undo, so record the working expression before replacing it.
Additional Info names must be distinct from predefined field variable names. A naming collision can leave a saved regex missing or unavailable when reopened through Expressions. Include a reopen check in your review rather than judging the expression solely by its initial appearance.
Compose readable text and choose visible attributes
Click the output field that should receive the text. You can drag a field from Event Info into it, type a reference using the form ${fieldname}, or combine references with literal text. Spaces and separators help distinguish adjacent values. Confirm that the reference uses the actual input name rather than a label invented for the example.
For a hypothetical resource alert, plan a short sentence containing the resource and condition, with a separate attribute for a detailed identifier. Avoid repeating a long raw message in several output fields. Compare two sample events with different values: the wording should remain understandable without depending on the exact length of the original sample.
Select the Manual attributes check box to specify fields that must appear in the generated alert. Enter the attribute in the left column; in the right column, drag a value from the Add or Expression fields, or type a value. Attributes appear in Additional Information, while attributes prefixed with t_ appear in Alert Tags. Previously defined t_ attributes are available through a drop-down list.
Field selection and ordering have separate configuration points. The exclusion list em_event_rule_black_list controls fields offered in Event Input. Adding an existing rule field to that list moves it into Manual Attributes rather than removing it from the rule. The em_event_rule_order configuration controls event form field order. Do not treat hiding an input choice as proof that its existing alert output has disappeared.
Do not change Classification in the event table manually, through a script, or through an event rule. Build the desired presentation through the supported transformation, composition, and attribute settings instead.
For help planning this work, see ServiceNow implementation.
Verify output against the rules that actually run
Prepare a small review set: one normal event, one with a missing optional value, and one with punctuation or a longer message. Write the expected output for each before testing. Compare the selected fields, composed wording, extracted values, and attribute placement. Record unexpected blank values separately from fields that were deliberately excluded.
Review the rule sequence when the output differs from your expectation. Rules run in ascending Order when Apply additional matching rules is selected. Global rules run before rules belonging to the assignment group associated with the event source instance. A correct expression in a rule that does not apply will not produce the intended result.
Rules without an action are skipped. When a rule has no ignore, threshold, or binding configuration, specify match or composed fields so it performs processing. A descriptive rule name alone does not configure an action.
Apply additional matching rules also makes the Thresholds tab inactive. Keep decisions about readable alert content separate from decisions about when recurring events should generate an alert. If alert volume is the problem, use event rule suppression thresholds to plan that behavior.
After saving, reopen the rule and inspect Expressions and manual attributes. Then review the generated alert as an operator would: can the resource be recognized, can the condition be understood, and are supporting values in the expected section? Use the operator triage workflow to assess whether the chosen information supports the next action.
Event Additional info and Event Raw info are not updated automatically after a rule is created, so refresh the rule when the sample no longer matches the source.