---
title: CONTRACT Butler – Using Clause Rules
description: Clause Rules allow you to automatically select the correct clause from your Clause Library during agreement creation. Instead of maintaining multiple agreement templates, you can use a single template and let Contract Butler determine which clause should be inserted based…
url: "https://pdfbutler.com/academy/contract-butler-academy/contract-butler/contract-butler-using-clause-rules/"
updated: "2026-07-30"
category: CONTRACT BUTLER
---

# CONTRACT Butler – Using Clause Rules

Clause Rules allow you to automatically select the correct clause from your Clause Library during agreement creation. Instead of maintaining multiple agreement templates, you can use a single template and let Contract Butler determine which clause should be inserted based on Salesforce record data.

Rules are evaluated **from top to bottom**. The **first matching rule** is applied. If none of the conditions match, the **default result** is used.

---

#### Example Scenario

In this example, an agreement template contains a placeholder for **Payment Terms and Invoice Settlement**.

During agreement creation, Contract Butler automatically replaces this placeholder with the appropriate clause from the Clause Library based on Opportunity and Account data.

The Clause Library contains three versions of the payment terms clause:

**Standard Payment Terms and Invoice Settlement -**Used for regular opportunities![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.51.11-300x80.png)

**Replacement Payment Terms and Invoice Settlement -** Used for existing customers upgrading their services![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.51.57-300x67.png)

**Enterprise Payment Terms and Invoice Settlement -**Used for large enterprise opportunities![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.52.11-300x57.png)

A Clause Rule determines which version should be inserted into the agreement.

---

#### Prerequisites

Before creating a Clause Rule, make sure you have:

- A Contract Butler Agreement Template.
- Clause Library records for every clause variation.

For this example, the rule uses:

**Opportunity fields**

- Type
- Amount

**Related Account fields**

- Industry
- Annual Revenue

---

#### Setting Up

 

##### **Prepare the Agreement Template**

1. Open your Agreement Template.
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.49.31-300x86.png)
2. Locate the placeholder clause that should be selected dynamically.
3. Instead of assigning a fixed Clause Library record, this placeholder will later be linked to a Clause Rule.

##### **Create a Clause Rule**

1. Navigate to the **Clause Rules** tab.
2. Click **New**.
3. Enter a meaningful name.
    *Example: **Payment Terms and Invoice Settlement***
4. For the **Source Object**, select: **Opportunity***Since agreements are created from Opportunity records, the rule will evaluate Opportunity fields and related records.*
5. Save the record.
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.53.01-300x234.png)

##### **Configure Clause Rule Options**

1. Before defining any conditions, create the available Clause Rule Options.
    *Each option links a Clause Library record to an option code.*
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.46.50-300x140.png)
2. Create one option for each possible result.
    **STANDARD** for Standard Payment Terms and Invoice Settlement**![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.54.21-300x185.png)
    REPLACEMENT** for Replacement Payment Terms and Invoice Settlement
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.54.54-300x183.png)**ENTERPRISE** for Enterprise Payment Terms and Invoice Settlement
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.55.10-300x186.png)

**Important:**
Every Option Code must be unique within the Clause Rule.

The Option Code is what the rule returns when a condition is matched.

##### Build the Rule Conditions

1. Click to create the first condition.
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.56.27-300x108.png)
2. Select Opporrunity Type for field.
3. Inform "Equals" as the operator.
4. Update Value to Existing Customer Upgrade
5. Set the result to **Replacement***Whenever the Opportunity Type is Existing Customer Upgrade, Contract Butler inserts the Replacement Payment Terms clause.
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.57.23-300x130.png)*
6. Create another top-level rule.
7. Select Opporrunity Amount for field.
8. Inform "Greater Than" as the operator.
9. Set the Value to 100,00
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.59.35-300x117.png)
10. Create a nested group where **any** of the following conditions can be true:
     **- Field:** Account Industry, **Operator:** Equals, **Value:** Banking**- Field:** Account Annual Revenue, **Operator:** Greater Than, **Value:** 10,000,000
     ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.00.06-300x115.png)*![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.00.48-300x183.png)*
11. Set the result to: **Enterprise***If the Opportunity meets these requirements, the Enterprise Payment Terms clause will be used.![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.01.14-300x153.png)*
12. Set the **Default Result** to: **Standard***If none of the configured rules match, Contract Butler automatically inserts the Standard Payment Terms clause.![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.01.48-300x183.png)*

##### Validate the Rule

Before saving, click **Validate**.
 ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.02.13-300x176.png)

Contract Butler checks the configuration for:

- Missing values
- Invalid conditions
- Configuration errors

If validation succeeds, save the Clause Rule.

##### Activate the Clause Rule

1. Enable the **Active** checkbox.
    Only **Active** Clause Rules can be assigned to Agreement Templates and evaluated during agreement generation.![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.02.59-300x115.png)

##### Assign the Rule to an Agreement Template

1. Return to your Agreement Template.
2. Select the clause placeholder that should be dynamic.
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-13.50.20-1-300x148.png)
3. Instead of selecting a fixed Clause Library record, assign the newly created **Clause Rule**.![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.04.11-300x117.png)
4. From this point forward, Contract Butler will automatically determine which clause to insert.

##### Result of the Configuration

1. Open an Opportunity.
2. Create a new Agreement using the Agreement Template.
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.04.57-300x201.png)
3. During agreement creation, Contract Butler will processes the conditions from top to bottom, uses the first matching result and inserts the corresponding Clause Library record into the Agreement.
    ![](https://pdfbutler.com/wp-content/uploads/2026/07/Screenshot-2026-07-30-at-14.05.18-300x148.png)

---

By using Clause Rules, you can maintain a single Agreement Template while dynamically selecting the correct clause based on Salesforce data. This simplifies template maintenance, reduces manual work, and ensures that the appropriate contractual language is automatically included for each business scenario.
