Write a script for an automation message variable
Write JavaScript code input for variables that are added in the message of an insight rule.
Before you begin
This task must be performed in the classic environment.
Create an insight rule. For more information, see Create an insight rule.
Role required: sn_ac.automation_technical_user or sn_ac.automation_admin
About this task
When an insight rule is processed, it generates an insight. Insights appear on the Insights widget in the Executions dashboard of Automation Center Workspace.
An insight trigger activates the associated insight rule to run.
An insight rule doesn’t run unless it’s mapped to an insight trigger.
Procedure
Navigate to All > Automation Center > Administration > Insight Rules.
Open an insight rule that you want to write JavaScript code for the associated message variable.
On the Automation Message Variables tab, select a variable.
On the form, fill in the fields.
| Field | Description |
|---|---|
| Name | Name of the automation message variable.This field is auto-generated. |
| Field | Qualifier for message variable.Values in this list appear depending on the entry that is selected in the Applies to field while you’re creating an insight rule. This field appears only when the Applies to field is selected and when the Threshold type field is empty, while you’re creating an insight rule. For more information, see Insight rule form. |
| Application | Name of the associated application.This field is auto-generated. |
| Automation insight rule | Name of the associated insight rule.This field is auto-generated. |
| Advanced | Advanced script.This field is auto-generated. |
| Script | Text field that accepts JavaScript code input and provides controls, such as syntax checking and formatting.For example, to return a value, enter This field doesn’t appear when the Applies to field is selected and when the Threshold type field is empty, while you’re creating an insight rule. For more information, see Insight rule form. |
- Select Update.
Parent Topic:Creating insights