---
schema_version: "1"
id: b9c1894611ff48eb53d8fddcc58f95a80f9a928e54f994ec68dd70ea7d880fb8
title: Set Up Regulatory Compliance and Automated Violations
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/wfs_df_data_capture_regulatory_compliance_setup.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.wfs_df_data_capture_regulatory_compliance_setup.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8aff2ae501ce3d2685d3a69d8f270424f4ff06f6a01556f399d1bef149a0202b
description: Create the regulatory codes your inspections check against, define the compliance statuses that represent a failure, and associate codes with questions. Inspections then generate Regulatory Code Violation records automatically.
products:
  - Public Sector
  - Service Cloud
release: "264"
---
# Set Up Regulatory Compliance and Automated Violations

Create the regulatory codes your inspections check against, define the compliance statuses that represent a failure, and associate codes with questions. Inspections then generate Regulatory Code Violation records automatically.

### 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> and <strong>Unlimited</strong> Editions</td></tr></tbody></table>

<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 orgs where Field Service and Discovery Framework are enabled.</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="d5254e86">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d5254e86 ">To create regulatory codes and define compliance statuses:</td>

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

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

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

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

[Set up Data Capture](https://help.salesforce.com/s/articleView?id=service.wfs_df_data_capture_setup_discovery_framework.htm&release=264.0.0&type=5 "Build Data Capture forms from Discovery Framework assessment questions in Flow Builder. Set up the framework, create assessment questions, build forms, and prime records for offline use."). Confirm that the regulatory code and violation objects are available in your org.

1. Create the regulatory codes that your inspections check against.
    
    Give each code a name, subject, description, and type, specify its effective dates, and select a regulatory authority. See [Create Regulatory Code Records](https://help.salesforce.com/s/articleView?id=ind.psc_create_a_regulatory_code.htm&type=5&language=en_US).
2. Define the compliance statuses, and mark the ones that represent a failure as violating.
    1. From Setup, open **Object Manager**, and select **Inspection Assessment Indicator**.
    2. Select **Fields**, and then open the **Assessment Question Status** field.
    3. In Assessment Question Status Picklist Values, add or remove the statuses that your inspections use.
    4. Edit a status, and then select **Violation** to mark it as violating.
3. When you build the form, associate each question with the regulatory code it checks against. See [Build Forms with Question Sets](https://help.salesforce.com/s/articleView?id=service.wfs_df_data_capture_build_forms.htm&release=264.0.0&type=5 "Create forms with the Data Capture Flow process type in Flow Builder. Add assessment questions, organize them into sets and categories, set properties and conditional logic, and preview questions without leaving Flow Builder.").
4. Prime the regulatory codes and reference data for offline use with Briefcase Builder.
    
    Test sync and search performance for your data volume before rollout. See [Briefcase Builder](https://help.salesforce.com/s/articleView?id=xcloud.briefcase_builder_overview.htm&type=5&language=en_US).
5. Give mobile workers access to the regulatory code and violation objects in their Data Capture permission set. See [Assign Data Capture Permissions to Mobile Workers](https://help.salesforce.com/s/articleView?id=service.wfs_data_capture_assign_permissions.htm&release=264.0.0&type=5 "Give mobile workers access to Data Capture flows in the Field Service mobile app. Create a permission set that adds the Data Capture permissions, and then assign it to your mobile workers.").
6. Test an inspection in the Field Service mobile app.
    
    Complete the form, set a violating compliance status on a question, and submit. Confirm that Salesforce creates a Regulatory Code Violation record for each question that has a violating status.