---
schema_version: "1"
id: 67266b55d4c3c696d4f4e46f3587027149c17a2cb7bb13066780ee9425216c94
title: Set the Criteria for Your Workflow Rule
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/workflow_rules_define.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.workflow_rules_define.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: de53b5e03ff3031eb674515f8329627ee0c2203b77959e3762c0955ff94ed839
description: Get started with creating a workflow rule by selecting the object the rule relates to and configuring its criteria.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Set the Criteria for Your Workflow Rule

Get started with creating a workflow rule by selecting the object the rule relates to and configuring its criteria.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience and Salesforce Classic</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d77426e73">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d77426e73 ">To create or change workflow rules and actions:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d77426e73 ">Customize Application</td>

          </tr>
        </tbody>
      </table>

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_important.png)

Important Support and updates for Workflow Rules have ended as of December 31, 2025. This means that support won't be provided for any workflow rules and bugs in the Workflow Rules product won't be fixed. See [Workflow Rules & Process Builder End of Support](https://help.salesforce.com/s/articleView?id=001096524&type=1&language=en_US).

After December 31, 2025, existing workflow rules continue to run, and you can activate, deactivate, and edit them; however we recommend using Flow Builder. To migrate existing workflow rules, plan your [switch to Flow Builder](https://help.salesforce.com/s/articleView?id=platform.flow_migrate_to_flow_learning_map.htm&release=264.0.0&type=5 "Flow Builder combines the capabilities of workflow rules and Process Builder in a single point-and-click tool, making it easier to create a triggered process. If you created triggered processes with workflow rules or Process Builder, use the Migrate to Flow tool to move them to Flow Builder. Start by migrating and testing in a sandbox environment before moving your new flows to production.") and use the [Migrate to Flow](https://help.salesforce.com/s/articleView?id=platform.flow_migrate_to_flow.htm&release=264.0.0&type=5 "Use the Migrate to Flow tool to convert your Process Builder processes and workflow rules into Flow Builder, including scheduled actions. The tool also supports partial migration of processes for most actions.") tool. For new automations, create flows in [Flow Builder](https://help.salesforce.com/s/articleView?id=platform.flow.htm&release=264.0.0&type=5 "Automation reduces repetitive work and helps your team complete tasks faster and more accurately. With Flow Builder, you can build simple or complex automations, forms, and guided experiences with no code. You can add forms to Salesforce pages and Experience sites, and launch flows using buttons, record triggers, or schedules.").

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note

- If you have a workflow action that updates a field on a related object, that target object isn't the one that's associated with the workflow rule.
- To create workflow rules based on new case comments or incoming email messages that automatically update fields on their associated cases, choose Case Comment or Email Message. See [Workflow Considerations](https://help.salesforce.com/s/articleView?id=platform.workflow_rules_considerations.htm&language=en_US) for more information.
- To create a [site usage rule](https://help.salesforce.com/s/articleView?id=platform.sites_workflow.htm&language=en_US), choose one of the following:
    
    - Organization (for monthly page views allowed and monthly page views used fields)
    - Site (for site detail, daily bandwidth and request time, monthly page views allowed, and other fields)
    - User License (for the monthly logins allowed and monthly logins used fields)
    
    The Organization and Site objects are only available if Salesforce Sites is enabled for your organization. The User License object isn't dependent on sites, and is only available if you have Customer Portals or partner portals enabled for your organization.
- This release contains a beta version of the workflow on the User object that is production quality but has [known limitations](https://help.salesforce.com/s/articleView?id=platform.workflow_user_object_limitations.htm&language=en_US).

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:32%">
          <col style="width:68%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d77426e182">
              <samp class="parmname">Evaluate the rule when a record is:</samp>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d77426e188">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Evaluate the rule when a record is:" class="slds-cell-wrap" style="vertical-align:top;" headers="d77426e182 ">
              <samp class="parmname">created</samp>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d77426e188 ">
              <p>Evaluate the rule criteria each time a record is created. If the rule criteria
                is met, run the rule. Ignore all updates to existing records.</p>
              <p style="margin-bottom:0;">With this option,
                the rule never runs more than one time per record.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Evaluate the rule when a record is:" class="slds-cell-wrap" style="vertical-align:top;" headers="d77426e182 ">
              <samp class="parmname">created, and every time it’s edited</samp>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d77426e188 ">
              <p>Evaluate the rule criteria each time a record is created or updated. If the
                rule criteria is met, run the rule.</p>
              <p>With this option, the rule repeatedly runs
                every time a record is edited as long as the record meets the rule
                criteria.</p>
              <p style="margin-bottom:0;">If you select this option, you can't add time-dependent actions to
                the rule.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Evaluate the rule when a record is:" class="slds-cell-wrap" style="vertical-align:top;" headers="d77426e182 ">
              <samp class="parmname">created, and any time it’s edited to subsequently meet
                criteria</samp>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d77426e188 ">
              <p>(Default) Evaluate the rule criteria each time a record is created or
                updated.</p><a name="workflow_rules_define__ul_v52_m2g_5cc"><!-- --></a>
              <ul id="workflow_rules_define__ul_v52_m2g_5cc">
                <li>For a new record, run the rule if the rule criteria is met. </li>
                <li>For an updated record, run the rule only if the record is changed from not
                  meeting the rule criteria to meeting the rule criteria.</li>
              </ul>
              <p>With this option, the rule can run multiple times per record, but it doesn’t
                run when the record edits are unrelated to the rule criteria.</p>
              <p style="margin-bottom:0;">For example,
                suppose that for an opportunity record to meet the rule criteria, the opportunity
                probability must be greater than 50%. If you create an opportunity with a
                probability of 75%, the workflow rule runs. If you edit that opportunity by
                changing the probability to 25%, the edit doesn't cause the rule to run. If you
                then edit that opportunity by changing the probability from 25% to 75%, the edit
                causes the rule to run. With this last edit, the rule runs, because the record is
                changed from not meeting the rule criteria to meeting the rule criteria.</p>
            </td>

          </tr>
        </tbody>
      </table>

1. From Setup, enter Workflow Rules in the Quick Find box, then select **Workflow Rules**.
2. Click **New Rule**.
3. Choose the object to which you want this workflow rule to apply.
4. Click **Next**.
5. Give the rule a name and description.
6. Set the evaluation criteria. For example: <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
          <tbody><tr class="">
            <th style="vertical-align:top;" headers="d77426e304-option" id="d77426e308">Evaluate the rule when a record is created</th>

            <td style="vertical-align:top;" headers="d77426e304-desc d77426e308">Evaluate the rule criteria each time a record is created. If the rule criteria
              is met, run the rule. Ignore all updates to existing records.<p>With this option, the
                rule never runs more than one time per record.</p>
            </td>

          </tr>
          <tr class="">
            <th style="vertical-align:top;" headers="d77426e304-option" id="d77426e319">Evaluate the rule when a record is created, and every time it’s
              edited</th>

            <td style="vertical-align:top;" headers="d77426e304-desc d77426e319">Evaluate the rule criteria each time a record is created or updated. If the rule
              criteria is met, run the rule.<p>With this option, the rule repeatedly runs every time
                a record is edited as long as the record meets the rule criteria.</p>
              <p>If you
                select this option, you can't add time-dependent actions to the rule.</p>
            </td>

          </tr>
          <tr class="">
            <th style="vertical-align:top;" headers="d77426e304-option" id="d77426e332">Evaluate the rule criteria each time a record is created, and any time it’s
              edited to subsequently meet criteria</th>

            <td style="vertical-align:top;" headers="d77426e304-desc d77426e332">
              <p>(Default) Evaluate the rule criteria each time a record is created or
                updated. For a new record, run the rule if the rule criteria is met. For an updated
                record, run the rule only if the record is changed from not meeting the rule
                criteria to meeting the rule criteria.</p>
              <p>With this option, the rule can run
                multiple times per record, but it doesn’t run when the record edits are unrelated to
                the rule criteria.</p>
              <p>For example, suppose that for an opportunity record to meet
                the rule criteria, the opportunity probability must be greater than 50%. If you
                create an opportunity with a probability of 75%, the workflow rule runs. If you edit
                that opportunity by changing the probability to 25%, the edit doesn't cause the rule
                to run. If you then edit that opportunity by changing the probability from 25% to
                75%, the edit causes the rule to run. With this last edit, the rule runs, because
                the record is changed from not meeting the rule criteria to meeting the rule
                criteria.</p>
            </td>

          </tr>
        </tbody></table>
7. Enter your rule criteria. For example:
    - Choose criteria are met and select the filter criteria that a record must meet to trigger the rule. For example, set the filter to “Opportunity: Amount greater than 5000” if you want opportunity records with an amount greater than $5,000 to trigger the rule. If your organization uses multiple languages, enter filter values in your individual language. You can add up to 25 filter criteria, of up to 255 characters each.
8. Enter your rule criteria. For example:
    - Choose criteria are met and select the filter criteria that a record must meet to trigger the rule. For example, set the filter to “Opportunity: Amount greater than 5000” if you want opportunity records with an amount greater than $5,000 to trigger the rule. If your organization uses multiple languages, enter filter values in your individual language. You can add up to 25 filter criteria, of up to 255 characters each.
    - Choose formula evaluates to true and enter a formula that returns a value of “True” or “False.” Salesforce triggers the rule if the formula returns “True.”
9. Click **Save & Next**.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_example.png)

Example Examples of useful workflow formulas include:

- If the number of filled positions equals the number of total positions on a job, update the Job Status field to “Filled.”
- If mileage expenses associated with visiting a customer site are 35 cents per mile and exceed a $1,000 limit, automatically update the Approval Required field to “Required.”
- If a monthly subscription-based opportunity amount is greater than $10,000, create a task for an opportunity owner to follow up 60 days after the opportunity is closed.

The `$Label` variable isn’t supported in workflow rule formulas. Also, some functions aren't available in workflow rule formulas.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_tip.png)

Tip You can use merge fields for directly related objects in workflow rule formulas.

#### See Also

- [Workflow Considerations](https://help.salesforce.com/s/articleView?id=platform.workflow_rules_considerations.htm&release=264.0.0&type=5 "Learn the intricacies of workflow rules and workflow actions before you begin working with them.")