---
schema_version: "1"
id: e791b0a48e8a3cffb4025a3d962decfccd595167170418dc4e855c113938a996
title: Automate Hold Placement on Students
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sfdo/264-0-0/ec_automate_hold_placement.md
canonical_url: https://help.salesforce.com/s/articleView?id=sfdo.ec_automate_hold_placement.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4cf066fe77e8a797db2c8687b39780c8723c1d61d6d14ce61e2f4506ff9802c7
description: Build an automation flow by using invocable actions. Run the flow to run expression sets that evaluate students for hold violations and assign holds to a group of students.
products:
  - Education
release: "264"
---
# Automate Hold Placement on Students

Build an automation flow by using invocable actions. Run the flow to run expression sets that evaluate students for hold violations and assign holds to a group of students.

### 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>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with Education Cloud license and Education Cloud Advanced Academic Operations for Experience Cloud add-on</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="d140109e71">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">To use expression sets and invocable actions:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">Education Cloud Full Access</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">To edit objects:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">Education Cloud Advanced Academic Operations Admin Access</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">To create context definitions:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">Context Service Admin</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">To create, update, and delete expression sets:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">Rules Engine Designer</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">To run expression sets in Business Rules Engine:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">Rules Engine Runtime</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d140109e71 ">To configure flows:</td>

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

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

1. [Create a context definition](https://help.salesforce.com/s/articleView?id=ind.context_service_create_context_definitions.htm&type=5&language=en_US) for your policy rule.
    
    Define a node with attributes. The node requires the IsHoldApplicable attribute. Select **OUTPUT** as the attribute’s type and select **BOOLEAN** as the data type.
2. [Add a context mapping](https://help.salesforce.com/s/articleView?id=ind.context_service_add_context_mapping.htm&type=5&language=en_US) for the node that you defined.
    
    Map the node to the Contact sObject. Make sure that you also map the isHoldApplicable attribute to a corresponding boolean field on the Contact sObject.
3. Create a policy rule.
    1. From the App Launcher, find and select **Policy Rules**.
    2. Click **New Policy Rule**.
    3. Enter a name.
        
        The API name populates automatically.
    4. Select **Student Information System** as the usage type.
    5. Select **Default** as the usage subtype.
    6. Select the context definition that you created as the context definition.
    7. Save your changes.
        
        This policy rule automatically creates a policy rule version.
4. Create an expression set that executes your policy rule.
    1. From the policy rule record that you created, go to the Details tab, and then select the automatically created policy rule version.
    2. In Policy Rule Builder, [create an expression set](https://help.salesforce.com/s/articleView?id=ind.build_your_expression_set.htm&type=5&language=en_US).
5. Create a compliance control record.
    1. From the App Launcher, find and select **Compliance Controls**.
    2. Click **New**.
    3. Enter a name and an API name.
    4. Save your changes.
        
        Every compliance control that you create automatically creates a corresponding compliance control version.
    5. In the New Compliance Control Version window, select **Expression Set** as the rule processor, and then select the policy rule that you defined earlier.
    6. Select **Default** as the status.
    7. Save your changes.
6. Map a regulation clause version record to this compliance control version record.
    
    This mapping connects the regulation clause version record to an expression set that’s stored in the compliance control version record.
    
    1. From the compliance control version record page, go to the Related tab.
    2. In the Regulation Clause Compliance Control Versions section, click **New**.
    3. Select the regulation clause version that you want to map to.
    4. Save your changes.
7. [Build a flow](https://help.salesforce.com/s/articleView?id=platform.flow_build.htm&type=5&language=en_US) that suits your needs by using these invocable actions.
    
    We recommend that you create one flow to evaluate and assign each hold definition.
    
    - Get Related Policy Rules: This action gets expression sets from all regulation clause version records that are related to a regulatory code record. It generates expression set IDs.
    - Run Expression Set with Context Definition: This action runs an expression set against each student ID. It generates context IDs that indicate whether a hold applies to a student.
    - Assign Hold on Student: This action creates and places a hold on a student’s account based on the hold definition, reasons, and the context IDs that the Run Expression Set with Context Definition action generates. If a regulatory code violation is currently placed on a student’s account, this action doesn’t place the same hold twice.
    - Get Restrictions Assigned To Person Account: This action checks a student's account and lists all regulatory code violations that are placed on the account.

Review the flow run results in the regulatory code violation records or in a student’s case records.

SEE ALSO:

- [Best Practices for Executing Expression Set Rules on Large Datasets by using Salesforce Flow](https://help.salesforce.com/s/articleView?id=ind.bre_run_expression_set_rules_on_large_datasets_by_using_salesforce_flow.htm&type=5&language=en_US).