# Conditions and actions in business rules

> Business rules contain two sets of data, conditions and actions, that are combined to create if and then statements. 

Source: https://help.kustomer.com/en_us/conditions-and-actions-in-business-rules-B1PFiShj8

Last updated: 2026-06-15T13:44:02.826Z

Business rules contain two sets of data, conditions and actions, that are combined to create `if` and `then` statements. Once you set a trigger, you have to define the conditions the rule must meet to perform the action.

### In this article:

*   [Business rule conditions](#Conditions)
*   [Action types](#Actions)
    *   [Update Data](#Update)
    *   [Predict Data](#Predict)
    *   [Send Message](#Send)
    *   [Queue Updates](#Queue)

### Business rules conditions

There are two types of conditions – _all_ conditions and _any_ conditions. Conditions set under _Match **all** of the following_ must all be true for a rule to run. Conditions set under _Match **any** of the following_ will run if a conversation update matches at least one of the conditions specified.

You can create filter criteria using both Match All and Match Any conditions. If you create conditions using both, **all** of the criteria set in Match All must be true, and **any** criteria in Match Any can be true.

Like searches and other parts of the Kustomer platform, you can define criteria at the company, message, conversation, and customer levels. You can also mix and match criteria across each object when creating a business rule.

![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/eacdb101e740e2e1947e78c0a3ea7b11.png)

For more information on available operators, see [Understanding filter operators](https://help.kustomer.com/filter-operators-Sy8cQR5mU).

#### **Tips for working with text-matching conditions**

When using operators like ****Contains**** or ****Contains Any Of**** in your business rule conditions, keep the following in mind:

*   ****Substring matching:**** The Contains operator checks whether the criteria string appears anywhere in the field value. For example, if your condition is __Message Body Contains "change address"__, the rule matches the exact string "change address" — not the words "change" and "address" separately. The match is ****not case-sensitive****.
*   ****Hyperlinks and URLs are included:**** Message body conditions evaluate the full content of the message, including any hyperlink URLs embedded in the HTML. For example, if your condition is __Message Body Contains Any Of "ooo"__, a message containing a URL like `https://example.com/book-your-room` would not match, but a URL like `https://example.com/foooo-bar` would match because "ooo" appears in the URL string. Similarly, a rule matching the keyword "UGC" could fire on a message with a hyperlink such as `https://example.com/products/UGC-collection`. To reduce false positives from URLs, consider adding a space before and after terms in your ****Contains Any Of**** list (for example, " ooo " instead of "ooo"). This helps ensure the term is matched as a standalone word.
*   ****Wildcards are not supported:**** Operators like Contains do not support wildcard characters (such as `*`). To filter by email domain, use the ****Contains**** operator with the domain string (for example, __Message Sender Contains "@example.com"__) rather than a wildcard pattern like `*@example.com`

#### **Example: Apply a business rule to both emails and web forms**

To create a business rule that triggers for conversations from both the email and web form channels:

1.  In the ****Conditions**** section, select ****Match any of the following****.
2.  Add the first condition: ****Conversation > Channel > Is Equal To > Email****.
3.  Add the second condition: ****Conversation > Channel > Is Equal To > Web Form****.

This rule triggers when a conversation arrives through either channel.

You can add multiple actions in the ****Set Actions**** section within a single rule. For example:

*   ****Send Message**** — Send an auto-reply to acknowledge the customer's message.
*   ****Update Data**** — Set ****Conversation > Assigned Team > Replace With > \[Your Team\]**** to assign the conversation to a specific team.

Both actions execute each time the rule triggers.

### Action types

When a new or updated conversation finds a business rule with matching criteria, choose **Select Action Type** to specify whether you want to change object data, predict data using classification models, send a message, or update a queue.

![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/9580724fe575a74fc2c2150b62465189.png)

**Note:** If your trigger is set to **All Updates**, the only option available will be _Update Data_.

#### Update Data

You can create criteria for the conversation, customer, or company object. For example, on a conversation, you can update attributes, such as User & Team Assignment, Subject, Priority, Skill, Tags, Language, and any custom attributes you've created.

**Note:** Updating tags for the company object will only be visible via the API.

#### Predict Data

You can create a business rule that applies one of your classification models to incoming emails so that you can start automating tasks. For more information, see [Use classification models with routing](https://help.kustomer.com/en_us/classification-model-in-a-business-rule-B12i6Iu_v). This action is only available if your trigger is set to **First Inbound Conversation**.

The Predict Data options in the drop-down menu depend on your specific active predictions and may differ from the image.

![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/a66fbf4023262b17db7a894a0311f816.png)

#### Send Message

You can also send an email, SMS, or note when a conversation update occurs. This action is not available if your trigger is set to **All Updates**.

![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/a9e1985455a6e58f4b5b2d0e8e0b40d7.png)

To send an email, enter the following information:

*   **Email Template**  
    The template the message will use. For more information, see [Customize email templates](https://help.kustomer.com/customize-email-templates-in-kustomer-r1DrjNITb).  
      
    
*   **From**  
    The email address sending the reply.  
      
    
*   **To**  
    The addresses that receive the reply. The auto-response will always be sent to the original sender's email address. Use the **Reply to all** checkboxes to customize whether replies are also sent to the _To_ and _CC_ recipients.  
      
    
*   **Message Body** The subject line of the message. You can add shortcuts, snippets, and dynamic text to your message, as well as @ mention specific users and teams.  
      
    
*   To send an SMS, select the phone number where the message will be sent.

You can use the editor to format the text of the message body, and include attachments, shortcuts, and snippets.

**Note:** Dynamic text like {{conversation.lastMessageIn.preview}} that isn’t a standard or custom attribute in the platform’s UI isn’t supported in business rule message sends. Attempting to use one in a message will result in an empty value.

#### Queue Updates

You can use business rules to update your queues. The _Queue Updates_ action is only available when your trigger is set to **Assigned, First Inbound Interaction, Inbound Interaction, Team Assigned,** or **Unassigned**.

![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/a2288e779043b22b44e45d3d5dbda4d9.jpg)

The following options are available:

*   **Unset Queue & Unassign User**  
    Re-runs conversations through your queue rules, ensuring that your business rules are applied to previously queued conversations.
    
    **Note:** Unsetting a queue removes the user currently assigned to a conversation.
    
      
    
*   **Set Queue & Unassign User**   
    Re-queues a conversation when an attribute changes. For example, you can move chat conversations to a new queue when the conversation priority has changed.

#### **Satisfaction surveys and auto-responses**

If your organization has satisfaction surveys configured to send when a conversation is marked Done, be aware that a business rule auto-response that also marks the conversation as Done may trigger the survey to be sent alongside the auto-response.

To prevent this, you have two options:

*   ****Separate the actions:**** Keep the auto-response and the status change in separate rules. Use the auto-response rule to send the message only, and configure a separate rule or workflow to mark the conversation as Done after a delay or different trigger.
*   ****Adjust your survey settings:**** In your satisfaction survey configuration, add exclusion criteria to prevent the survey from being sent on conversations closed by a specific business rule or tag.

#### **How team assignment affects queues**

When a business rule assigns a conversation to a team, the conversation is placed into the team's ****default queue**** unless a separate queue rule or business rule explicitly sets a different queue.

The order of operations is:

1.  ****Workflows**** run first and may set initial attributes.
2.  ****Business rules**** run next, including team assignment and queue updates.
3.  ****Queue rules**** run last, evaluating the conversation's current state to determine final queue placement.

If a conversation is assigned to a team by a business rule but ends up in an unexpected queue, check your queue rules to see if a queue rule is overriding the assignment. You can also use a business rule with the ****Set Queue & Unassign User**** action to explicitly place the conversation in a specific queue after team assignment.

#### **Filter conversations by customer email domain**

To create a business rule that fires only for customers with a specific email domain (for example, @gmail.com):

1.  In the business rule conditions, select ****Customer Email****.
2.  Set the operator to ****Contains****.
3.  Enter the domain value (for example, `@gmail.com`).

****Note:**** The ****Ends With**** operator is not available in business rules. Use ****Contains**** with the full domain string (including the `@` symbol) to match email domains.
