> ## Documentation Index
> Fetch the complete documentation index at: https://docs.germainux.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Rule for Advanced Automation

> Rules provide an advanced way to customize GermainUX Automation using custom logic.

Components
[`Engine`](https://docs.germainux.com/main/germain-ux-engine)

Availability
2014.1 or later

> **[Before You Begin](#before-you-begin)**
>
> Define the rule goal

> **[Validate the Rule](#validate-the-rule)**
>
> Catch syntax errors early

> **[Test the Rule](#test-the-rule)**
>
> Verify before production release

> **[Security](#security)**
>
> Limit rule permissions

## Creating and Configuring Rules for GermainUX Automation

## Overview

Rules provide an advanced way to customize GermainUX **Automation** using custom logic.

A Rule can analyze and transform data, detect conditions, generate insights or events, trigger automated actions, process action results, and determine what should happen next.

This page explains how to create, configure, test, and deploy a Rule.

## Before You Begin

Before creating a Rule, determine what you want it to accomplish.

For example:

### Automation

* Determine when an action should occur
* Apply custom decision logic
* Trigger an automated action
* Execute a command or script
* Analyze the result of an action
* Determine the next action or escalation

![Create a Rule for Advanced Automation: Automation](https://mintcdn.com/germain-ux/npHkPTFCfiH3hzwe/images/main/create-a-rule-for-advanced-automation/Picture2.png?fit=max\&auto=format\&n=npHkPTFCfiH3hzwe\&q=85\&s=e506a26a948100ea5ccb98497dfa8f52)

## Create a Rule

Go to:

**Germain Workspace > Left Menu > Settings > Analytics > Rules**

Click **+** to create a Rule.

Or start the rule creation from the **Wizard page:**

![Create a Rule for Advanced Automation: Create a Rule](https://mintcdn.com/germain-ux/npHkPTFCfiH3hzwe/images/main/create-a-rule-for-advanced-automation/image-20260825-145917.png?fit=max\&auto=format\&n=npHkPTFCfiH3hzwe\&q=85\&s=e19da54a672fb9cb6ebd5b7f9064d6b9)

Configure the Rule properties and add the custom logic required for your use case.

![Create a Rule for Advanced Automation: Create a Rule, image 2](https://mintcdn.com/germain-ux/npHkPTFCfiH3hzwe/images/main/create-a-rule-for-advanced-automation/image-20260825-150055.png?fit=max\&auto=format\&n=npHkPTFCfiH3hzwe\&q=85\&s=8baad269a64c44578105a8212bcc5096)

## Configure the Rule

### Name

Enter a unique and descriptive name that identifies the purpose of the Rule.

For example:

| Example Name | Code Sample |
| - | - |
| Detect Repeated Checkout Error | `Detect Repeated Checkout Error` |
| Categorize Salesforce Errors | `Categorize Salesforce Errors` |
| Analyze Slow Transactions | `Analyze Slow Transactions` |
| Trigger Remediation for Service Failure | `Trigger Remediation for Service Failure`  |

![Create a Rule for Advanced Automation: Name](https://mintcdn.com/germain-ux/npHkPTFCfiH3hzwe/images/main/create-a-rule-for-advanced-automation/image-20201023-155011.png?fit=max\&auto=format\&n=npHkPTFCfiH3hzwe\&q=85\&s=4feb757621b9e1f88bf9b7e1ae4449dd)

### Rule Logic

Add the logic that GermainUX should execute.

Rules can evaluate monitored data and context to determine:

* What data should be analyzed
* Which conditions should be detected
* How data should be categorized or transformed
* Whether an event or insight should be generated
* Whether an automated action should be triggered
* How the result of an action should be processed
* What should happen next

Rules support custom expressions and logic using **MVEL**.

## Validate the Rule

After configuring or modifying the Rule, click **Validate**.

Validation helps identify syntax and configuration issues before the Rule is used.

Resolve any reported issues and validate again until the Rule is valid.

Then save the configuration.

![Create a Rule for Advanced Automation: Validate the Rule](https://mintcdn.com/germain-ux/npHkPTFCfiH3hzwe/images/main/create-a-rule-for-advanced-automation/image-20260825-150204.png?fit=max\&auto=format\&n=npHkPTFCfiH3hzwe\&q=85\&s=6cf73256a59fd9c9e29921a9d7ddfb59)

## Assign the Rule

After the Rule has been created and validated, assign it to the GermainUX configuration or component where the custom logic should execute.

Depending on the use case, the Rule may be associated with:

* Monitoring configuration
* Analytics
* Data processing
* An automated action
* A technology-specific component

Select the Rule in the applicable configuration and save your changes.

A restart of the applicable GermainUX Engine may be required for some configuration changes to take effect.

## Test the Rule

Test custom Rules in a **non-production environment** before enabling them in production.

Verify that:

* The Rule receives the expected data
* Conditions are detected correctly
* Data is analyzed or transformed as expected
* Generated events or insights are correct
* Automated actions occur only under the intended conditions
* Action results are processed correctly
* Unexpected data does not trigger unintended behavior

For Automation Rules, also verify permissions, credentials, execution limits, and failure handling.

## Monitor the Rule

After deploying the Rule, verify its behavior using the applicable GermainUX analytics, events, logs, dashboards, or automation results.

Confirm that the Rule:

* Executes when expected.
* Produces the expected analytical result or action.
* Does not generate unnecessary events or actions.
* Handles unexpected conditions appropriately.
* Continues to behave as expected as monitored applications and data change.

## Modify a Rule

To modify an existing Rule:

**1. Go to Germain Workspace > Settings > Analytics > Rules**

**2. Select the Rule**

**3. Modify the configuration or logic**

**4. Click Validate**

**5. Resolve any validation issues**

**6. Save the Rule**

**7. Test the updated behavior before broad production use**

Changes to Rules used in production should follow your organization's testing and change-management procedures.

## Security

Rules can perform powerful analytical and automation operations.

When configuring Rules:

* Use the minimum permissions required.
* Secure credentials and sensitive information.
* Validate external inputs before using them in commands or actions.
* Limit the scope of automated actions.
* Avoid including sensitive information directly in Rule logic.
* Test potentially impactful actions in a non-production environment.
* Follow your organization's security, privacy, approval, and change-management requirements.

## Related Documentation

* [Rules — Advanced Analytics](https://docs.germainux.com/main/rules-advanced-automated-analytics.md)
* [Rules — Advanced Automation](https://docs.germainux.com/main/rules.md)
* [Analytics](https://docs.germainux.com/main/analytics.md)
* [Automation](https://docs.germainux.com/main/automation.md)
* [Automated Actions](https://docs.germainux.com/main/automated-actions.md)

## Get Help

> **[Contact GermainUX Support](https://docs.germainux.com/main/support.md)**
>
> The Germain Team can help you set this up.

> **Can't find what you need?**
>
> Search all GermainUX docs with **Ctrl + K**, or use the feedback buttons at the bottom of this page to tell us what is missing.

The content of this document is proprietary to GERMAIN SOFTWARE.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.