---
schema_version: "1"
id: ff177cf9d3ae3712cdcfd653c1d1bc1bb5490d91b0c67ed40f840cbf06807197
title: Configure Safety Cloud Triggers
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/safety_cloud_configure_triggers.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.safety_cloud_configure_triggers.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d5507122fccb3dc941705932c2593c704e54fb7b27257fd7c59f067165e8baa0
description: The Safety Cloud package comes with its own list of functionality managed by a trigger framework. You can extend the Safety Cloud triggers with additional functionality, as described here.
products:
  - Salesforce Platform
release: "264"
---
# Configure Safety Cloud Triggers

The Safety Cloud package comes with its own list of functionality managed by a trigger framework. You can extend the Safety Cloud triggers with additional functionality, as described here.

### 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: <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 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="d2647e60">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d2647e60 ">To modify trigger settings:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d2647e60 ">Modify All Data</td>

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

Safety Cloud trigger functionality exists in a custom metadata type called Trigger Settings. These custom metadata records point to units of custom Apex logic.

All Safety Cloud trigger settings are enabled by default except for the Send Marketing Cloud Emails setting. When you’re ready to send communications to event attendees, you can pair this setting with the Marketing Cloud Engagement email setup.

We don’t advise turning off any of the other trigger settings unless there’s a specific reason.

To access and modify Safety Cloud triggers, and to create your own triggers, complete these steps.

1. Access and work with Safety Cloud triggers.
    1. From Setup, in the Quick Find box, enter Custom Metadata Types, and then select **Trigger Setting**.
    2. Next to the custom field that you want to edit and update, click **Edit** .
    3. Save your changes.
2. Activate a Trigger Setting.
    
    1. Access the trigger setting that you want to activate.
    2. Set the **Active** checkbox to True.
    3. Save your changes.
    
    To block users from changing the status of a Health Verification record, you must activate the Block Status Change trigger.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-vaccine_cloud-264-0-0-production-enus/efba81cf-4df2-478b-9074-4524c9b354ed/images/icon_note.png)
    
    Note The Block Status Change is set to Active by default.
3. **Optional:** Create your own Trigger Module Class.
    
    1. To create your own Trigger Module Class and deploy a new Trigger Setting, create a class that inherits the Safety Cloud TriggerModule interface.
    2. After you create the class, create a trigger setting record with the name of your class, and then set it to Active.
    3. You can use Table-Driven Trigger Management (TDTM) to create and deploy a new Trigger for Safety Cloud.
    
    For information about TDTM, see [Table-Driven Trigger Management (TDTM) Overview](https://powerofus.force.com/s/article/NPSP-TDTM-Overview).
    
    Implementation example for creating the class:
    
    ```
    
    public with sharing class MyTriggerClass implements safetycloud.TriggerModule {
      
     public void run(List<Health_Verification__c> healthVerifications, Map<Id, Health_Verification__c> oldHealthVerificationsById) {
         if (Trigger.isBefore && Trigger.isUpdate) {
             runCustomLogic(healthVerifications, oldHealthVerificationsById);
         }
     }
     private void runCustomLogic(List<safetycloud__Health_Verification__c> healthVerifications, Map<Id, safetycloud__Health_Verification__c> oldHealthVerificationsById) {
         //TODO: custom logic
     }
    }
    ```
    
    Accompanying Trigger Setting example:
    
    ```
    
    <?xml version="1.0" encoding="UTF-8"?>
    <CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <label>My Custom Trigger</label>
      <protected>false</protected>
      <values>
          <field>Active__c</field>
          <value xsi:type="xsd:boolean">false</value>
      </values>
      <values>
          <field>Class__c</field>
          <value xsi:type="xsd:string">MyTriggerClass</value>
      </values>
      <values>
          <field>Order__c</field>
          <value xsi:type="xsd:double">1.0</value>
      </values>
    </CustomMetadata>
    ```

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-vaccine_cloud-264-0-0-production-enus/efba81cf-4df2-478b-9074-4524c9b354ed/images/icon_example.png)

Example

Additional Key Trigger Settings

**Person Accounts:** Each person account has its own external Id. All Health Verifications are linked to a person account.

**Set QR Code Logic:**This setting sets the QR Code checkbox and date logic. You can disable this trigger setting and create your own QR code logic to suit your needs.