---
schema_version: "1"
id: e1a38cfa1211668fca6ef18cc5d69b2a96c09696f292548103e3a5f05f8df122
title: QR Code Generation
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/safety_cloud_qr_code_gen.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.safety_cloud_qr_code_gen.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2866658f4ea04893e891ff0df81bc3bb6c1a1ea060b14fb683091a16e7e84773
description: Safety Cloud generates QR codes when criteria on the Occasion Access Setting match data on an individual’s Health Verification record for the same Occasion.
products:
  - Salesforce Platform
release: "264"
---
# QR Code Generation

Safety Cloud generates QR codes when criteria on the Occasion Access Setting match data on an individual’s Health Verification record for the same Occasion.

### 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>

Occasion Access Setting records consist of Verification and Access values that you define when you create the Occasion Access Setting.

Safety Cloud generates multi-factor access credentials when a user meets the defined health and safety protocols. The rules and regulations that stipulate the criteria for generating these credentials (including the rule that specifies for how long the credential remains in effect) are set by a Salesforce admin for Safety Cloud to ensure compliance with the health and safety protocol of your occurrence (for example, event/office/location).

When a Health Verification record is created with verification and access data that matches the Occasion Access Setting, Safety Cloud generates the QR code for the Health Verification record. The QR code contains:

- Access Start Time
- Access End Time
- Health Verification Salesforce ID
- Occasion Salesforce ID

Use any QR code reader to scan values and determine access for an individual to an event.

## QR Code Verification Values

These fields on the QR Code Generation record are the verification values that Safety Cloud uses to generate QR codes for Health Verification records.

Health Verification Method

This picklist value determines the Verification Method that a Health Verification must have for Safety Cloud to generate a QR code.

The values available in this picklist mirror the values available on the Health Verification form and record.

If you select Proof of vaccination as the Health Verification method, only Health Verifications with the Proof of vaccination method pass this rule.

Health Verification Status

This picklist value determines the Verification Status that a Health Verification record must have for Safety Cloud to generate a QR code.

The values in this picklist mirror the values specified in the Health Verification Status field on the Health Verification form and record.

If you select Verified as the Health Verification Status, only Health Verifications with the Verified status pass this rule.

Verification Datetime Range Start

This datetime field represents the start date and time range for comparison against the field referenced in the Verification Datetime Field.

Verification Datetime Range End

This datetime field represents the end date and time range for comparison against the field referenced in the Verification Datetime Field.

Verification Datetime Field

This text field must contain the API name of a Date or Datetime field on the Health Verification object. For example, CreatedDate or safetycloud\_\_TestDateTime\_\_c.

The value of the CreatedDate or safetycloud\_\_TestDateTime\_\_c field on the Health Verification record gets compared against the Verification Datetime Start/End Range on the QR Code Generation record. If the date and time falls within the start and end range, the Health Verification passes this rule. For example, if you specify a CreatedDate in the Verification Datetime Field, QR Codes are generated only for Health Verifications where the CreatedDate occurs between Verification start and end range.

## Access Criteria and QR Code Access Values

When Verification Method, Verification Status, and Date or Datetime fields on a Health Verification record match the values on the QR Code Generation record, Safety Cloud generates a QR Code.

The QR Code includes the specified access start and end times.

Access Start Datetime

This field shows the start date and time when the QR code is valid.

Access End Datetime

This field shows the end date and time when the QR code is valid.

Access Offset

Number of minutes access is given when the Health Verification meets the verification criteria.

![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 You can only specify one access type for an Occasion Access Setting, either an Access Start/End time or Access Offset.

## QR Code Generation Examples

Example 1: The first column in the table shows the fields that you can set on the QR Code Generation Custom Metadata Object. The field settings are the criteria for generating a QR code.

The second column shows the Health Verification record values that match the defined criteria.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Code Generation Criteria to Health Verification Fields and Values">
        <caption>Code Generation Criteria to Health Verification Fields and Values</caption>
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d10762e227">Criteria for QR Code Generation</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d10762e230">Health Verification Record Fields and Values</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Criteria for QR Code Generation" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e227 ">Health Verification Method = Proof of vaccination</td>

            <td data-label="Health Verification Record Fields and Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e230 ">safetycloud__HealthVerificationMethod__c = ‘Proof of
              vaccination’</td>

          </tr>
          <tr class="">
            <td data-label="Criteria for QR Code Generation" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e227 ">Health Verification Status = Verified</td>

            <td data-label="Health Verification Record Fields and Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e230 ">safetycloud__HealthVerificationStatus__c = ‘Verified’ </td>

          </tr>
          <tr class="">
            <td data-label="Criteria for QR Code Generation" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e227 ">
              <p>Verification Datetime Range Start = 2/10/2022</p>
              <p style="margin-bottom:0;">The start date of
                the Datetime Range used for comparison against the Verification
                Datetime field for Health Verifications.</p>
            </td>

            <td data-label="Health Verification Record Fields and Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e230 ">User defined in the record.</td>

          </tr>
          <tr class="">
            <td data-label="Criteria for QR Code Generation" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e227 ">
              <p>Verification Datetime Range End = 3/1/2022</p>
              <p style="margin-bottom:0;">The end date of the
                Datetime Range used for comparison against the Verification
                Datetime Field for Health Verifications.</p>
            </td>

            <td data-label="Health Verification Record Fields and Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e230 ">User defined in the record.</td>

          </tr>
          <tr class="">
            <td data-label="Criteria for QR Code Generation" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e227 ">
              <p>Verification Datetime Field</p>
              <p>API Name of a Date or Datetime
                field on a Health Verification, for example
                “CreatedDate”</p>
              <p style="margin-bottom:0;">The date value from this field gets compared
                against the values in the Verification Datetime Start Range and
                Verification Datetime End Range fields. If the date falls within
                the dates specified in those fields, and if the other criteria
                on the Custom Metadata Object match the verification record, the
                QR code is generated.</p>
            </td>

            <td data-label="Health Verification Record Fields and Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e230 ">safetycloud__HealthVerificationDocumentDate__c =
              ‘4/18/2021’</td>

          </tr>
          <tr class="">
            <td data-label="Criteria for QR Code Generation" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e227 ">Access Start Datetime = 2/17/2022, 12:00 PM</td>

            <td data-label="Health Verification Record Fields and Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e230 ">safetycloud__AccessStartTime__c=2/17/2022, 12:00 PM </td>

          </tr>
          <tr class="">
            <td data-label="Criteria for QR Code Generation" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e227 ">Access End Datetime = 2/18/2022, 12:50 PM</td>

            <td data-label="Health Verification Record Fields and Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d10762e230 ">safetycloud__AccessEndTime__c=2/18/2022, 12:00 PM</td>

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

When the defined criteria and Health Verification fields match, Safety Cloud generates a QR code.

QR Code Generation record settings in column 1.

![Screenshot of the Access Settings page with fields filed in](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-vaccine_cloud-264-0-0-production-enus/efba81cf-4df2-478b-9074-4524c9b354ed/vaccine_cloud/images/safety_cloud_qr_code_access_setting.png)

Here’s an example of a Health Verification record that meets the defined criteria.

![Screenshot showing fields on the Health Verification record that match the QR Code Generation criteria](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-vaccine_cloud-264-0-0-production-enus/efba81cf-4df2-478b-9074-4524c9b354ed/vaccine_cloud/images/safety_cloud_hv_qr_code_match.png)

Example 2: The table shows the defined criteria for QR Code Generation. The rule states that a QR Code is generated when a Health Verification record shows a Health Verification Status of Verified and a Health Verification Method of negative COVID-19 test on February 15 to get access for February 17.

Code Generation Criteria to Health Verification Fields and Values  
| Criteria for QR Code Generation | Health Verification Record Fields and Values |
| --- | --- |
| Occurrence Id = 123 | safetycloud\_\_OccurrenceId\_\_c = ‘123 |
| Health Verification Method = Negative COVID-19 test | safetycloud\_\_HealthVerificationMethod\_\_c = ‘Negative COVID-19 test’ |
| Health Verification Status = Verified | safetycloud\_\_HealthVerificationStatus\_\_c = ‘Verified |
| Access End Datetime = 2/16/2022, 11:50 PM | safetycloud\_\_TestDateTime\_\_c is between February 15 at 12:00 AM And February 15 at 11:59 PM |

Here’s an example of a Health Verification record that meets the defined criteria.

![Screenshot showing Health Verification record fields matching the QR code generation criteria](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-vaccine_cloud-264-0-0-production-enus/efba81cf-4df2-478b-9074-4524c9b354ed/vaccine_cloud/images/safety_cloud_hv_rec_ex2.png)

#### See Also

- [Custom Triggers](https://help.salesforce.com/s/articleView?id=service.safety_cloud_custom_fields.htm&release=264.0.0&type=5 "Safety Cloud includes the custom triggers listed and described here.")
- [Email Templates and Notifications](https://help.salesforce.com/s/articleView?id=service.safety_cloud_email_notifications.htm&release=264.0.0&type=5 "Safety Cloud supports sending emails to Slack and using email templates to optimize communications.")
- [Configure Safety Cloud to Generate QR Codes Automatically](https://help.salesforce.com/s/articleView?id=service.safety_cloud_configure_qr_code_gen.htm&release=264.0.0&type=5 "You can configure Safety Cloud to generate QR codes automatically for Health Verification records that meet a defined criteria.")
- [Safety Cloud Integrations](https://help.salesforce.com/s/articleView?id=service.safety_cloud_integrations.htm&release=264.0.0&type=5 "You can integrate Safety Cloud with other systems to help manage various aspects of your event, such as event attendance, testing, and communications. System integrations are optional. You can generate a Health Verification without any integrations.")
- [Person Accounts](https://help.salesforce.com/s/articleView?id=service.vaccine_packages_hv_person_accounts.htm&release=264.0.0&type=5 "If your org has the Person Account enabled, when a user submits a health verification, PersonAccount and visitor are created.")