<?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>Terminal</label>
    <protected>false</protected>
    <values>
        <field>b3s__JSON__c</field>
        <value xsi:type="xsd:string"><![CDATA[
{
    "timezonePreference": "user",
    "shiftStartedMessage": "You started your shift",
    "shiftEndedMessage": "You ended your shift",
    "backgroundSyncFrequency": 35,
    "managerPages": [
		{"label": "Home", "value": "Dashboard"}
	],
    "statQueries": ["countOnSite", "scheduledToday", "completedToday"],
	"clockInOutButtonLabel": "Clock In / Out!",
    "identifiedClearTimeoutMs": 1200,
	"clockAppConfig":{
        "hideThemeSwitch":true,
        "hideCurrentUser":false,
        "hideMenus":true
    },
    "autoScanInBackground": true,
    "qrLogin": true,
    "nfcLogin": true,
    "reverseQr": true,
    "reverseQrUrl": "https://<your-site-domain>/<path>/b3p__Portal#MobileApp",
    "clockLoginQr": true,
    "notMeButtonLabel": "Not Me!",
    "shiftStartedMessage": "You started your shift",
    "shiftEndedMessage": "You ended your shift",
    "userInstructions": "To log in, tap on the circular button in the middle of the screen. You will see a pop-up. Search for your name in that pop-up. You will then be propted to enter your candidate PIN or use the device's camera to scan your face. Once authenticated, you can tap on the 'Start' button to clock in. To clock out, follow the same steps. You can also hold the QR code from your Clock app up to the terminal's camera to log in straight away.",
    "schedulables": {
        "countOnSite": {
            "objectType": "b3s__Shift__c",
            "selectionClause": [
                "b3s__Work_Site__c =:contextId AND b3s__Contact__c != null AND DAY_ONLY(b3s__Actual_Start_Time__c) >= YESTERDAY AND b3s__Actual_End_Time__c = null"
            ],
            "header": "On Site",
            "footer": "people"
        },
        "scheduledToday": {
            "objectType": "b3s__Shift__c",
            "selectionClause": [
                "b3s__Work_Site__c =:contextId AND b3s__Contact__c != null AND b3s__Actual_Start_Time__c = null AND DAY_ONLY(b3s__Scheduled_Start_Time__c) = TODAY"
            ],
            "header": "Scheduled Shifts",
            "footer": "today"
        },
        "completedToday": {
            "objectType": "b3s__Shift__c",
            "selectionClause": [
                "b3s__Work_Site__c =:contextId AND b3s__Contact__c != null AND b3s__Actual_Start_Time__c != null AND b3s__Actual_End_Time__c != null AND DAY_ONLY(b3s__Actual_End_Time__c) = TODAY"
            ],
            "header": "Completed Shifts",
            "footer": "today"
        },
        "site": {
            "objectType": "b3s__Site__c",
            "selectionClause": [
                "b3s__Location__Latitude__s != null"
            ],
            "nameFieldPath": "Name",
            "coordinatesPath": "b3s__Location__c",
            "terminalTagFieldPath": "b3s__Terminal_Tag__c",
            "optionName": "Name"
        },
        "manager": {
            "objectType": "Contact",
            "selectionClause": [
                "b3s__Terminal_Manager_Pin__c != null"
            ],
            "nameFieldPath": "Name",
            "emailFieldPath": "Email",
            "biometricKeyFieldName": "b3s__Biometric_Key__c",
            "pinFieldPath": "b3s__Terminal_Manager_Pin__c",
            "optionName": "Name"
        },
        "contact": {
            "objectType": "Contact",
            "selectionClause": [
                "(b3s__Biometrics_Enrolled__c = true OR b3s__Worker_Pin__c != '' OR b3s__NFC_Tag_Id__c != null OR b3s__External_QR_Tag__c != null)",
                "b3s__Terminal_Tag__c != null AND Id IN (SELECT b3s__Contact__c FROM b3s__Shift__c WHERE b3s__Work_Site__c = :contextId AND DAY_ONLY(b3s__Scheduled_Start_Time__c) >= YESTERDAY AND DAY_ONLY(b3s__Scheduled_Start_Time__c) <= TOMORROW)"
            ],
            "nameFieldPath": "Name",
            "emailFieldPath": "Email",
            "biometricKeyFieldName": "b3s__Biometric_Key__c",
            "pinFieldPath": "b3s__Worker_Pin__c",
            "terminalTagFieldPath": "b3s__Terminal_Tag__c",
            "nfcTagFieldPath": "b3s__NFC_Tag_Id__c",
            "externalQrTagFieldPath": "b3s__External_QR_Tag__c",
            "optionName": "Name"
        },
		"unregisteredContacts": {
            "objectType": "Contact",
            "selectionClause": [
                "b3s__Biometrics_Enrolled__c = false AND b3s__Worker_Pin__c = ''"
            ],
            "nameFieldPath": "Name",
            "emailFieldPath": "Email",
            "biometricKeyFieldName": "b3s__Biometric_Key__c",
            "pinFieldPath": "b3s__Worker_Pin__c",
            "optionName": "Name"
        }
    }
}
]]></value>
    </values>
    <values>
        <field>b3s__Type__c</field>
        <value xsi:type="xsd:string">Terminal</value>
    </values>
</CustomMetadata>
