---
schema_version: "1"
id: 0d4a64babb3357c11f9d58b3c10e71aefc9d80b9215ab35c0ce820758c111d4c
title: Create a Flow That Applies a Scoping Rule
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/security_scoping_rule_flow.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.security_scoping_rule_flow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 837532422898bc39ac882161ab5d068cc54d9e6beef4b00ddef25331f8462b23
description: You can create a scoping rule and then create a flow that users can run to update their user record. Users can filter records by scope to see only the records they need to focus on.
products:
  - Security
  - Salesforce Platform
release: "264"
---
# Create a Flow That Applies a Scoping Rule

You can create a scoping rule and then create a flow that users can run to update their user record. Users can filter records by scope to see only the records they need to focus on.

### 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</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <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="d9861e69">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d9861e69 ">To create and manage scoping rules:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d9861e69 ">Manage Sharing</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d9861e69 ">To view scoping rules:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d9861e69 ">View Setup &amp; Configuration AND View Restriction and Scoping Rules</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d9861e69 ">To open, edit, or create a flow in Flow Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d9861e69 ">Manage Flow</td>

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

This example scoping rule filters records according to their division. You can modify the scoping rule and the flow’s configuration to fulfill your business needs.

1. [Create a scoping rule](https://help.salesforce.com/s/articleView?id=platform.security_scoping_rule_create.htm&release=264.0.0&type=5 "Determine which records your users see by default. When a scoping rule is applied to a user, the data that the user sees in list views and reports is filtered by the criteria you set.") that scopes the records by division, matching the record’s division to the current user’s division.
2. [Create a flow](https://help.salesforce.com/s/articleView?id=platform.flow_build.htm&type=5&language=en_US) in Flow Builder.
    1. Use a Screen Flow.
    2. Create a Choice resource for each division.
    3. Use a Screen element to let users select a division.
    4. Use an Update Records element to update the division on the current user’s record.
3. Activate your flow.
4. [Distribute your flow](https://help.salesforce.com/s/articleView?id=platform.flow_distribute.htm&type=5&language=en_US) to users who need to run it.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-access-264-0-0-production-enus/a92be132-3cbc-412a-9262-130636120c14/images/icon_example.png)

Example

Add a flow to a utility bar so users can run the flow. In App Manager, find the Lightning or Connected app where the flow needs to appear. Add the flow to a utility bar that users can click, causing a different scope to apply. In the flow detailed here, users click the utility bar to update the division on their user record. If a different scope applies, it’s applied when the user runs the flow.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-access-264-0-0-production-enus/a92be132-3cbc-412a-9262-130636120c14/images/icon_tip.png)

Tip Make sure that users who want to run your flow have the Run Flows permission.

After updating their division, users select the filter option **Filter by Scope** to update their list view or report filter and focus on a different set of records.

#### See Also

- [_Salesforce Help_: Flow Builder](https://help.salesforce.com/s/articleView?id=platform.flow_builder.htm&type=5&language=en_US)
- [_Salesforce Help_: Add a Flow to a Utility Bar](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_internal_utilitybar.htm&type=5&language=en_US)