<?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>Vendor Portal</label>
    <protected>false</protected>
    <values>
        <field>b3s__JSON__c</field>
        <value xsi:type="xsd:string"><![CDATA[
{
    "timezonePreference":"client",
    "firstDay":0,
    "is24Hour":true,
    "badges":[
        {
            "name":"invites",
            "type":"count",
            "objectType":"b3s__Vendor_Invite__c",
            "selectionClause":["b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND b3s__Status__c = 'New' AND (b3s__Shift__r.b3s__Scheduled_End_Time__c >= TODAY OR b3s__Booking_Request__r.b3s__End__c >= TODAY)"]
        },
        {
            "name":"requests",
            "type":"count",
            "objectType":"b3s__Worker_Proposal__c",
            "selectionClause":["b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Requests__c) AND b3s__Status__c = 'Requested'"]
        },
        {
            "name": "extensions",
            "type": "count",
            "objectType": "b3s__Booking_Extension__c",
            "selectionClause": [
                "b3s__Status__c = 'Pending' AND b3s__Awaiting__c = 'Vendor' AND b3s__Working_Pattern__c IN (SELECT b3s__Converted_Working_Pattern__c FROM b3s__Worker_Proposal__c WHERE b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Review_Extensions__c))"
            ]
        }
    ],
    "dashboardTitle":"Vendor overview",
    "dashboardSubtitle":"Opportunities, worker delivery and earnings across your vendor accounts",
    "dashboard":[
        {
            "name": "openShifts",
            "type": "count",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Shift__c != null AND b3s__Shift__r.b3s__Absolute_End_Time__c >= :contextStart AND b3s__Shift__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale')",
            "header": "Open Shift Opportunities",
            "footer": "Actionable shift invitations; counts invitations, not vacancies",
            "section": "Opportunity overview"
        },
        {
            "name": "openBookings",
            "type": "count",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Booking_Request__c != null AND b3s__Booking_Request__r.b3s__End__c >= TODAY AND b3s__Booking_Request__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale')",
            "header": "Open Booking Opportunities",
            "footer": "Actionable booking invitations; counts invitations, not vacancies",
            "section": "Opportunity overview"
        },
        {
            "name": "pending",
            "type": "count",
            "objectType": "b3s__Worker_Proposal__c",
            "selectionClause": "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Proposals__c) AND b3s__Status__c IN ('Proposed','Client Review')",
            "header": "Proposals Awaiting Approval",
            "footer": "Proposed or in client review \u00b7 all time",
            "section": "Opportunity overview"
        },
        {
            "name": "direct",
            "type": "count",
            "objectType": "b3s__Worker_Proposal__c",
            "selectionClause": "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Requests__c) AND b3s__Status__c = 'Requested'",
            "header": "Direct Worker Requests",
            "footer": "Requested proposals awaiting your response \u00b7 all time",
            "section": "Opportunity overview"
        },
        {
            "name": "urgent",
            "type": "count",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Shift__c != null AND b3s__Shift__r.b3s__Absolute_End_Time__c >= :contextStart AND b3s__Shift__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale') AND b3s__Shift__r.b3s__Absolute_Start_Time__c >= :contextStart AND b3s__Shift__r.b3s__Absolute_Start_Time__c <= :contextStart+1d",
            "header": "Urgent Shift Opportunities",
            "footer": "Actionable invitations starting within 24 hours",
            "section": "Opportunity overview"
        },
        {
            "name": "unanswered",
            "type": "count",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "((b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Shift__c != null AND b3s__Shift__r.b3s__Absolute_End_Time__c >= :contextStart AND b3s__Shift__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale')) OR (b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Booking_Request__c != null AND b3s__Booking_Request__r.b3s__End__c >= TODAY AND b3s__Booking_Request__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale'))) AND b3s__Responded_Timestamp__c = null",
            "header": "Invitations Awaiting Response",
            "footer": "Actionable opportunities with no response recorded",
            "section": "Opportunity overview"
        },
        {
            "name": "byClientShift",
            "type": "bar",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Shift__c != null AND b3s__Shift__r.b3s__Absolute_End_Time__c >= :contextStart AND b3s__Shift__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale')",
            "header": "Open Shift Opportunities by Client",
            "footer": "Top 50 stamped client account names; older unstamped requests are Unassigned",
            "section": "Opportunity breakdown",
            "groupBy": "b3s__Shift__r.b3s__Account__r.Name"
        },
        {
            "name": "byClientBooking",
            "type": "bar",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Booking_Request__c != null AND b3s__Booking_Request__r.b3s__End__c >= TODAY AND b3s__Booking_Request__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale')",
            "header": "Open Booking Opportunities by Client",
            "footer": "Top 50 stamped client account names; older unstamped requests are Unassigned",
            "section": "Opportunity breakdown",
            "groupBy": "b3s__Booking_Request__r.b3s__Account__r.Name"
        },
        {
            "name": "opportunitySite",
            "type": "bar",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Shift__c != null AND b3s__Shift__r.b3s__Absolute_End_Time__c >= :contextStart AND b3s__Shift__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale')",
            "header": "Open Shift Opportunities by Site",
            "footer": "Actionable shift invitations \u00b7 top 50",
            "section": "Opportunity breakdown",
            "groupBy": "b3s__Shift__r.b3s__Work_Site__r.Name"
        },
        {
            "name": "opportunityJob",
            "type": "bar",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Shift__c != null AND b3s__Shift__r.b3s__Absolute_End_Time__c >= :contextStart AND b3s__Shift__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale')",
            "header": "Open Shift Opportunities by Job",
            "footer": "Actionable shift invitations \u00b7 top 50",
            "section": "Opportunity breakdown",
            "groupBy": "b3s__Shift__r.b3s__Work_Job__r.Name"
        },
        {
            "name": "success",
            "type": "progress",
            "objectType": "b3s__Worker_Proposal__c",
            "selectionClause": "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Proposals__c) AND CreatedDate = THIS_MONTH AND b3s__Status__c IN ('Approved','Converted','Rejected','Not Selected') AND b3s__Status__c IN ('Approved','Converted')",
            "header": "Proposal Success Rate",
            "footer": "Approved or converted / decided proposals created this month; pending, withdrawn and canceled excluded",
            "section": "Proposal performance",
            "targetClause": "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Proposals__c) AND CreatedDate = THIS_MONTH AND b3s__Status__c IN ('Approved','Converted','Rejected','Not Selected')"
        },
        {
            "name": "won",
            "type": "count",
            "objectType": "b3s__Worker_Proposal__c",
            "selectionClause": "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Proposals__c) AND CreatedDate = THIS_MONTH AND b3s__Status__c IN ('Approved','Converted')",
            "header": "Successful Proposals",
            "footer": "Created this month and currently approved or converted",
            "section": "Proposal performance"
        },
        {
            "name": "proposalStatus",
            "type": "pie",
            "objectType": "b3s__Worker_Proposal__c",
            "selectionClause": "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Proposals__c) AND CreatedDate = THIS_MONTH",
            "header": "Proposals by Status",
            "footer": "Proposals created this month",
            "section": "Proposal performance",
            "groupBy": "b3s__Status__c"
        },
        {
            "name": "response",
            "type": "progress",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND CreatedDate = THIS_MONTH AND b3s__Responded_Timestamp__c != null",
            "header": "Invitation Response Rate",
            "footer": "Responded / available-tier invitations created this month, including closed invitations",
            "section": "Proposal performance",
            "targetClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND CreatedDate = THIS_MONTH"
        },
        {
            "name": "inviteStatus",
            "type": "bar",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND CreatedDate = THIS_MONTH",
            "header": "Invitations by Status",
            "footer": "Available-tier invitations created this month",
            "section": "Proposal performance",
            "groupBy": "b3s__Status__c"
        },
        {
            "name": "aging",
            "type": "count",
            "objectType": "b3s__Worker_Proposal__c",
            "selectionClause": "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Proposals__c) AND b3s__Status__c IN ('Proposed','Client Review') AND CreatedDate < :contextStart-7d",
            "header": "Proposals Waiting Over 7 Days",
            "footer": "Age since creation, not time in the current review status",
            "section": "Needs attention"
        },
        {
            "name": "expiring",
            "type": "table",
            "objectType": "b3s__Vendor_Invite__c",
            "selectionClause": "((b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Shift__c != null AND b3s__Shift__r.b3s__Absolute_End_Time__c >= :contextStart AND b3s__Shift__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale')) OR (b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Invites__c) AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :contextStart) AND (b3s__Expires__c = null OR b3s__Expires__c >= :contextStart) AND b3s__Status__c IN ('New','Seen','Accepted','Queried') AND b3s__Booking_Request__c != null AND b3s__Booking_Request__r.b3s__End__c >= TODAY AND b3s__Booking_Request__r.b3s__VMS_Stage__c IN ('New','Broadcasting','Proposals','Stale'))) AND b3s__Expires__c <= :contextStart+7d",
            "header": "Invitations Expiring Soon",
            "footer": "Actionable invitations expiring within seven days \u00b7 first 10",
            "section": "Needs attention",
            "fields": [
                "Name",
                "b3s__Status__c",
                "b3s__Shift__r.Name",
                "b3s__Booking_Request__r.Name",
                "b3s__Expires__c"
            ],
            "columnLabels": [
                "Invitation",
                "Status",
                "Shift",
                "Booking",
                "Expires"
            ],
            "orderBy": "b3s__Expires__c",
            "limit": 10
        },
        {
            "name": "requestList",
            "type": "table",
            "objectType": "b3s__Worker_Proposal__c",
            "selectionClause": "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Requests__c) AND b3s__Status__c = 'Requested'",
            "header": "Worker Requests to Respond To",
            "footer": "Oldest 10 requested proposals",
            "section": "Needs attention",
            "fields": [
                "b3s__Contact__r.Name",
                "b3s__Vendor_Invite__r.Name",
                "CreatedDate"
            ],
            "columnLabels": [
                "Worker",
                "Invitation",
                "Requested"
            ],
            "orderBy": "CreatedDate",
            "limit": 10
        },
        {
            "name": "credentials",
            "type": "table",
            "objectType": "b3s__Ticket__c",
            "selectionClause": "b3s__Contact__r.AccountId IN :accountIds(b3s__Tab_Workers__c) AND b3s__Valid_Until__c >= TODAY AND b3s__Valid_Until__c <= NEXT_N_DAYS:30",
            "header": "Credentials Expiring Soon",
            "footer": "Next 30 days \u00b7 first 10 credential records; does not assess placement compliance",
            "section": "Needs attention",
            "fields": [
                "b3s__Contact__r.Name",
                "b3s__Ticket_Type__r.Name",
                "b3s__Valid_Until__c",
                "b3s__Approval_Status__c"
            ],
            "columnLabels": [
                "Worker",
                "Credential",
                "Valid until",
                "Approval"
            ],
            "orderBy": "b3s__Valid_Until__c",
            "limit": 10
        },
        {
            "name": "workers",
            "type": "count",
            "objectType": "Contact",
            "selectionClause": "AccountId IN :accountIds(b3s__Tab_Workers__c) AND b3s__VMS_Role__c NOT IN ('Client','Vendor')",
            "header": "My Workers",
            "footer": "Roster contacts, excluding client and vendor portal administrators",
            "section": "Workforce and delivery"
        },
        {
            "name": "workerStatus",
            "type": "pie",
            "objectType": "Contact",
            "selectionClause": "AccountId IN :accountIds(b3s__Tab_Workers__c) AND b3s__VMS_Role__c NOT IN ('Client','Vendor')",
            "header": "Workers by Status",
            "footer": "Current roster status",
            "section": "Workforce and delivery",
            "groupBy": "b3s__Worker_Status__c"
        },
        {
            "name": "shares",
            "type": "bar",
            "objectType": "b3s__Shared_Worker__c",
            "selectionClause": "b3s__Contact__r.AccountId IN :accountIds(b3s__Tab_Workers__c) AND b3s__Status__c = 'Active'",
            "header": "Active Worker Shares by Client",
            "footer": "Share records, not distinct workers \u00b7 top 50 clients",
            "section": "Workforce and delivery",
            "groupBy": "b3s__Client_Account__r.Name"
        },
        {
            "name": "shifts",
            "type": "count",
            "objectType": "b3s__Shift__c",
            "selectionClause": "b3s__Supplier_Account__c IN :accountIds(b3s__Tab_Schedule__c) AND b3s__Scheduled_Start_Time__c >= :contextStart AND b3s__Scheduled_Start_Time__c <= :contextStart+7d",
            "header": "Upcoming Scheduled Shifts",
            "footer": "Assigned roster shifts starting within seven days; includes non-VMS assignments",
            "section": "Workforce and delivery"
        },
        {
            "name": "scheduledSite",
            "type": "bar",
            "objectType": "b3s__Shift__c",
            "selectionClause": "b3s__Supplier_Account__c IN :accountIds(b3s__Tab_Schedule__c) AND b3s__Scheduled_Start_Time__c = THIS_WEEK",
            "header": "Scheduled Shifts by Site",
            "footer": "Assigned roster shifts starting this week \u00b7 top 50",
            "section": "Workforce and delivery",
            "groupBy": "b3s__Work_Site__r.Name"
        },
        {
            "name": "scheduledJob",
            "type": "bar",
            "objectType": "b3s__Shift__c",
            "selectionClause": "b3s__Supplier_Account__c IN :accountIds(b3s__Tab_Schedule__c) AND b3s__Scheduled_Start_Time__c = THIS_WEEK",
            "header": "Scheduled Shifts by Job",
            "footer": "Assigned roster shifts starting this week \u00b7 top 50",
            "section": "Workforce and delivery",
            "groupBy": "b3s__Work_Job__r.Name"
        },
        {
            "name": "scheduledStatus",
            "type": "bar",
            "objectType": "b3s__Shift__c",
            "selectionClause": "b3s__Supplier_Account__c IN :accountIds(b3s__Tab_Schedule__c) AND b3s__Scheduled_Start_Time__c = THIS_WEEK",
            "header": "Scheduled Shifts by Status",
            "footer": "Assigned roster shifts starting this week \u00b7 top 50",
            "section": "Workforce and delivery",
            "groupBy": "b3s__Status__c"
        },
        {
            "name": "upcoming",
            "type": "table",
            "objectType": "b3s__Working_Pattern__c",
            "selectionClause": "b3s__Contact__r.AccountId IN :accountIds(b3s__Tab_Schedule__c) AND b3s__Start__c >= TODAY AND b3s__Start__c <= NEXT_N_DAYS:30",
            "header": "Upcoming Placements",
            "footer": "Next 30 days \u00b7 first 10 by start date",
            "section": "Placements",
            "fields": [
                "b3s__Contact__r.Name",
                "b3s__Job__r.Name",
                "b3s__Site__r.Name",
                "b3s__Start__c",
                "b3s__End__c"
            ],
            "columnLabels": [
                "Worker",
                "Job",
                "Site",
                "Start",
                "End"
            ],
            "orderBy": "b3s__Start__c",
            "limit": 10
        },
        {
            "name": "ending",
            "type": "table",
            "objectType": "b3s__Working_Pattern__c",
            "selectionClause": "b3s__Contact__r.AccountId IN :accountIds(b3s__Tab_Schedule__c) AND b3s__End__c >= TODAY AND b3s__End__c <= NEXT_N_DAYS:14",
            "header": "Placements Ending Soon",
            "footer": "Next 14 days \u00b7 first 10 by end date",
            "section": "Placements",
            "fields": [
                "b3s__Contact__r.Name",
                "b3s__Job__r.Name",
                "b3s__Site__r.Name",
                "b3s__Start__c",
                "b3s__End__c"
            ],
            "columnLabels": [
                "Worker",
                "Job",
                "Site",
                "Start",
                "End"
            ],
            "orderBy": "b3s__End__c",
            "limit": 10
        },
        {
            "name": "pay",
            "type": "bar",
            "objectType": "b3s__Pay_Bill_Staging__c",
            "selectionClause": "b3s__Type__c = 'Supplier' AND b3s__Payee_Account__c IN :accountIds(b3s__Tab_Revenue__c) AND b3s__Shift__r.b3s__Scheduled_Start_Time__c = THIS_MONTH",
            "header": "Recorded Supplier Pay by Currency",
            "footer": "Supplier lines for shifts starting this month, including signed corrections; not a forecast or payment balance",
            "section": "Earnings and self-bills",
            "groupBy": "b3s__Currency__c",
            "aggregateField": "b3s__Total__c",
            "format": "decimal"
        },
        {
            "name": "billNet",
            "type": "bar",
            "objectType": "b3s__Invoice__c",
            "selectionClause": "b3s__Account__c IN :accountIds(b3s__Tab_Invoices__c) AND b3s__Kind__c = 'Self-Bill' AND b3s__Status__c = 'Issued' AND b3s__Issue_Date__c = THIS_MONTH",
            "header": "Self-Billed Net by Currency",
            "footer": "Issued this month \u00b7 signed credits included; no currency conversion",
            "section": "Earnings and self-bills",
            "groupBy": "b3s__Currency__c",
            "aggregateField": "b3s__Net__c",
            "format": "decimal"
        },
        {
            "name": "billGross",
            "type": "bar",
            "objectType": "b3s__Invoice__c",
            "selectionClause": "b3s__Account__c IN :accountIds(b3s__Tab_Invoices__c) AND b3s__Kind__c = 'Self-Bill' AND b3s__Status__c = 'Issued' AND b3s__Issue_Date__c = THIS_MONTH",
            "header": "Self-Billed Gross by Currency",
            "footer": "Issued this month \u00b7 signed credits included; no currency conversion",
            "section": "Earnings and self-bills",
            "groupBy": "b3s__Currency__c",
            "aggregateField": "b3s__Gross__c",
            "format": "decimal"
        },
        {
            "name": "invoices",
            "type": "table",
            "objectType": "b3s__Invoice__c",
            "selectionClause": "b3s__Account__c IN :accountIds(b3s__Tab_Invoices__c) AND b3s__Kind__c = 'Self-Bill' AND b3s__Status__c = 'Issued'",
            "header": "Recent Self-Billed Invoices",
            "footer": "Latest 10 issued self-bills; due dates do not imply unpaid balances",
            "section": "Earnings and self-bills",
            "fields": [
                "b3s__Invoice_Number__c",
                "b3s__Issue_Date__c",
                "b3s__Due_Date__c",
                "b3s__Currency__c",
                "b3s__Net__c",
                "b3s__Gross__c"
            ],
            "columnLabels": [
                "Invoice",
                "Issued",
                "Due",
                "Currency",
                "Net",
                "Gross"
            ],
            "orderBy": "b3s__Issue_Date__c",
            "orderDescending": true,
            "limit": 10
        }
    ],
    "lists":{
        "invites": {
            "pageSize": 12,
            "sources": [
                {
                    "name": "shiftInvite",
                    "type": "invite",
                    "clauseField": "requestSelectionClause",
                    "clause": "b3s__Shift__c != null",
                    "sort": {
                        "priority": "b3s__Vendor_Action_Priority__c",
                        "start": "b3s__Shift__r.b3s__Scheduled_Start_Time__c",
                        "end": "b3s__Shift__r.b3s__Scheduled_End_Time__c"
                    },
                    "searchFieldPaths": [
                        "Name",
                        "b3s__Shift__r.b3s__Work_Job__r.Name",
                        "b3s__Shift__r.b3s__Work_Site__r.Name"
                    ]
                },
                {
                    "name": "bookingInvite",
                    "type": "invite",
                    "clauseField": "requestSelectionClause",
                    "clause": "b3s__Booking_Request__c != null",
                    "sort": {
                        "priority": "b3s__Vendor_Action_Priority__c",
                        "start": "b3s__Booking_Request__r.b3s__Start__c",
                        "end": "b3s__Booking_Request__r.b3s__End__c"
                    },
                    "searchFieldPaths": [
                        "Name",
                        "b3s__Booking_Request__r.b3s__Job__r.Name",
                        "b3s__Booking_Request__r.b3s__Site__r.Name"
                    ]
                }
            ],
            "scopes": [
                {
                    "name": "open",
                    "sort": [
                        {
                            "key": "priority"
                        },
                        {
                            "key": "start"
                        }
                    ],
                    "clauses": {
                        "shiftInvite": "b3s__Shift__r.b3s__Scheduled_End_Time__c >= :now AND b3s__Shift__r.b3s__VMS_Stage__c != 'Canceled' AND b3s__Status__c != 'Canceled' AND b3s__Shift__r.b3s__VMS_Stage__c != 'Complete' AND b3s__Status__c NOT IN ('Rejected','Released','Expired') AND (b3s__Status__c NOT IN ('New','Seen','Queried') OR b3s__Expires__c = null OR b3s__Expires__c >= :now)",
                        "bookingInvite": "(b3s__Booking_Request__r.b3s__End__c = null OR b3s__Booking_Request__r.b3s__End__c >= TODAY) AND b3s__Booking_Request__r.b3s__VMS_Stage__c != 'Canceled' AND b3s__Status__c != 'Canceled' AND b3s__Booking_Request__r.b3s__VMS_Stage__c != 'Complete' AND b3s__Status__c NOT IN ('Rejected','Released','Expired') AND (b3s__Status__c NOT IN ('New','Seen','Queried') OR b3s__Expires__c = null OR b3s__Expires__c >= :now)"
                    }
                },
                {
                    "name": "won",
                    "sort": [
                        {
                            "key": "priority"
                        },
                        {
                            "key": "start"
                        }
                    ],
                    "clauses": {
                        "shiftInvite": "b3s__Shift__r.b3s__Scheduled_End_Time__c >= :now AND b3s__Shift__r.b3s__VMS_Stage__c != 'Canceled' AND b3s__Status__c != 'Canceled' AND (b3s__Shift__r.b3s__VMS_Stage__c = 'Complete' OR b3s__Status__c IN ('Rejected','Released','Expired') OR (b3s__Status__c IN ('New','Seen','Queried') AND b3s__Expires__c < :now)) AND Id IN (SELECT b3s__Vendor_Invite__c FROM b3s__Worker_Proposal__c WHERE b3s__Status__c IN ('Approved','Converted'))",
                        "bookingInvite": "(b3s__Booking_Request__r.b3s__End__c = null OR b3s__Booking_Request__r.b3s__End__c >= TODAY) AND b3s__Booking_Request__r.b3s__VMS_Stage__c != 'Canceled' AND b3s__Status__c != 'Canceled' AND (b3s__Booking_Request__r.b3s__VMS_Stage__c = 'Complete' OR b3s__Status__c IN ('Rejected','Released','Expired') OR (b3s__Status__c IN ('New','Seen','Queried') AND b3s__Expires__c < :now)) AND Id IN (SELECT b3s__Vendor_Invite__c FROM b3s__Worker_Proposal__c WHERE b3s__Status__c IN ('Approved','Converted'))"
                    }
                },
                {
                    "name": "lost",
                    "sort": [
                        {
                            "key": "priority"
                        },
                        {
                            "key": "start"
                        }
                    ],
                    "clauses": {
                        "shiftInvite": "b3s__Shift__r.b3s__Scheduled_End_Time__c >= :now AND b3s__Shift__r.b3s__VMS_Stage__c != 'Canceled' AND b3s__Status__c != 'Canceled' AND (b3s__Shift__r.b3s__VMS_Stage__c = 'Complete' OR b3s__Status__c IN ('Rejected','Released','Expired') OR (b3s__Status__c IN ('New','Seen','Queried') AND b3s__Expires__c < :now)) AND Id NOT IN (SELECT b3s__Vendor_Invite__c FROM b3s__Worker_Proposal__c WHERE b3s__Status__c IN ('Approved','Converted'))",
                        "bookingInvite": "(b3s__Booking_Request__r.b3s__End__c = null OR b3s__Booking_Request__r.b3s__End__c >= TODAY) AND b3s__Booking_Request__r.b3s__VMS_Stage__c != 'Canceled' AND b3s__Status__c != 'Canceled' AND (b3s__Booking_Request__r.b3s__VMS_Stage__c = 'Complete' OR b3s__Status__c IN ('Rejected','Released','Expired') OR (b3s__Status__c IN ('New','Seen','Queried') AND b3s__Expires__c < :now)) AND Id NOT IN (SELECT b3s__Vendor_Invite__c FROM b3s__Worker_Proposal__c WHERE b3s__Status__c IN ('Approved','Converted'))"
                    }
                },
                {
                    "name": "canceled",
                    "sort": [
                        {
                            "key": "priority"
                        },
                        {
                            "key": "start"
                        }
                    ],
                    "clauses": {
                        "shiftInvite": "b3s__Shift__r.b3s__Scheduled_End_Time__c >= :now AND (b3s__Shift__r.b3s__VMS_Stage__c = 'Canceled' OR b3s__Status__c = 'Canceled')",
                        "bookingInvite": "(b3s__Booking_Request__r.b3s__End__c = null OR b3s__Booking_Request__r.b3s__End__c >= TODAY) AND (b3s__Booking_Request__r.b3s__VMS_Stage__c = 'Canceled' OR b3s__Status__c = 'Canceled')"
                    }
                },
                {
                    "name": "all",
                    "sort": [
                        {
                            "key": "priority"
                        },
                        {
                            "key": "start"
                        }
                    ],
                    "clauses": {
                        "shiftInvite": "b3s__Shift__r.b3s__Scheduled_End_Time__c >= :now",
                        "bookingInvite": "(b3s__Booking_Request__r.b3s__End__c = null OR b3s__Booking_Request__r.b3s__End__c >= TODAY)"
                    }
                },
                {
                    "name": "past",
                    "period": true,
                    "sort": [
                        {
                            "key": "end",
                            "descending": true
                        }
                    ],
                    "clauses": {
                        "shiftInvite": "b3s__Shift__r.b3s__Scheduled_End_Time__c < :now AND b3s__Shift__r.b3s__Scheduled_End_Time__c >= :contextStart AND b3s__Shift__r.b3s__Scheduled_End_Time__c <= :contextEnd",
                        "bookingInvite": "b3s__Booking_Request__r.b3s__End__c < TODAY AND b3s__Booking_Request__r.b3s__End__c >= :contextStartDate AND b3s__Booking_Request__r.b3s__End__c <= :contextEndDate"
                    }
                }
            ],
            "related": [
                {
                    "loader": "proposals",
                    "keys": [
                        {
                            "field": "b3s__Vendor_Invite__c"
                        }
                    ]
                },
                {
                    "loader": "requirements",
                    "keys": [
                        {
                            "field": "b3s__Shift__c",
                            "path": "b3s__Shift__c"
                        },
                        {
                            "field": "b3s__Booking_Request__c",
                            "path": "b3s__Booking_Request__c"
                        }
                    ]
                }
            ]
        }
    },
    "schedulables":{
        "message":{
            "objectType":"b3s__VMS_Message__c",
            "accountFieldPaths":["b3s__Vendor_Invite__r.b3s__Vendor_Account__c"],
            "inviteFieldPath":"b3s__Vendor_Invite__c",
            "bodyFieldPath":"b3s__Body__c",
            "authorContactFieldPath":"b3s__Author_Contact__c",
            "authorNameFieldPath":"b3s__Author_Contact__r.Name",
            "authorRoleFieldPath":"b3s__Author_Role__c",
            "canEdit":false,
            "canDelete":false
        },
        "client":{
            "objectType":"b3s__VMS_Sharing_Group_Assignment__c",
            "accountFieldPath":"b3s__Account__c",
            "accountNameFieldPath":"b3s__Account__r.Name",
            "roleFieldPath":"b3s__Role__c",
            "sharingGroupFieldPath":"b3s__Sharing_Group__c",
            "canEdit":false,
            "canDelete":false
        },
        "sharedWorker":{
            "objectType":"b3s__Shared_Worker__c",
            "accountFieldPaths":["b3s__Contact__r.AccountId"],
            "contactFieldPath":"b3s__Contact__c",
            "workerNameFieldPath":"b3s__Contact__r.Name",
            "vendorAccountFieldPath":"b3s__Contact__r.AccountId",
            "vendorAccountNameFieldPath":"b3s__Contact__r.Account.Name",
            "clientAccountFieldPath":"b3s__Client_Account__c",
            "clientAccountNameFieldPath":"b3s__Client_Account__r.Name",
            "statusFieldPath":"b3s__Status__c",
            "canEdit":false,
            "canDelete":false
        },
        "requirement":{
            "objectType":"b3s__Certificate_Requirement__c",
            "shiftFieldPath":"b3s__Shift__c",
            "bookingRequestFieldPath":"b3s__Booking_Request__c",
            "ticketTypeFieldPath":"b3s__Ticket_Type__c",
            "ticketTypeNameFieldPath":"b3s__Ticket_Type__r.Name"
        },
        "invite":{
            "objectType":"b3s__Vendor_Invite__c",
            "requestSelectionClause":["b3s__Vendor_Account__c IN :accountIds AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :now)"],
            "nameFieldPath":"Name",
            "shiftStatusFieldPath":"b3s__Shift__r.b3s__Status__c",
            "bookingRequiredStaffFieldPath":"b3s__Booking_Request__r.b3s__Required_Staff__c",
            "bookingPatternTypeNameFieldPath":"b3s__Booking_Request__r.b3s__Working_Pattern_Type__r.Name",
            "accountFieldPaths":["b3s__Vendor_Account__c"],
            "statusFieldPath":"b3s__Status__c",
            "shiftFieldPath":"b3s__Shift__c",
            "bookingRequestFieldPath":"b3s__Booking_Request__c",
            "shiftStageFieldPath":"b3s__Shift__r.b3s__VMS_Stage__c",
            "bookingStageFieldPath":"b3s__Booking_Request__r.b3s__VMS_Stage__c",
            "shiftEndFieldPath":"b3s__Shift__r.b3s__Scheduled_End_Time__c",
            "bookingStartFieldPath":"b3s__Booking_Request__r.b3s__Start__c",
            "bookingEndFieldPath":"b3s__Booking_Request__r.b3s__End__c",
            "vendorAccountFieldPath":"b3s__Vendor_Account__c",
            "vendorNameFieldPath":"b3s__Vendor_Account__r.Name",
            "tierFieldPath":"b3s__Tier__c",
            "availableFromFieldPath":"b3s__Available_From__c",
            "expiresFieldPath":"b3s__Expires__c",
            "seenTimestampFieldPath":"b3s__Seen_Timestamp__c",
            "respondedTimestampFieldPath":"b3s__Responded_Timestamp__c",
            "responseCommentsFieldPath":"b3s__Response_Comments__c",
            "title":[
                {
                    "label":"Status",
                    "fieldPath":"b3s__Status__c",
                    "hideIfNull":false
                },
                {
                    "label":"Shift Times",
                    "fieldPath":"b3s__Shift__r.b3s__Scheduled_Start_Time__c:b3s__Shift__r.b3s__Scheduled_End_Time__c",
                    "formatter":"startEndWithDate",
                    "siteTimezoneFieldPath":"b3s__Shift__r.b3s__Work_Site__r.b3s__Timezone__c",
                    "hideIfNull":true
                },
                {
                    "label":"Job",
                    "fieldPath":"b3s__Shift__r.b3s__Work_Job__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Site",
                    "fieldPath":"b3s__Shift__r.b3s__Work_Site__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Required Staff",
                    "fieldPath":"b3s__Shift__r.b3s__Required_Staff__c",
                    "hideIfNull":true
                },
                {
                    "label":"Rate Basis",
                    "fieldPath":"b3s__Shift__r.b3s__Rate_Basis__c",
                    "hideIfNull":true
                },
                {
                    "label":"Booking Dates",
                    "fieldPath":"b3s__Booking_Request__r.b3s__Start__c:b3s__Booking_Request__r.b3s__End__c",
                    "formatter":"startEndDate",
                    "hideIfNull":true
                },
                {
                    "label":"Booking Job",
                    "fieldPath":"b3s__Booking_Request__r.b3s__Job__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Booking Site",
                    "fieldPath":"b3s__Booking_Request__r.b3s__Site__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Rate Basis",
                    "fieldPath":"b3s__Booking_Request__r.b3s__Rate_Basis__c",
                    "hideIfNull":true
                },
                {
                    "label":"Expires",
                    "fieldPath":"b3s__Expires__c",
                    "formatter":"dateTime",
                    "hideIfNull":true
                },
                {
                    "label":"Client Comments",
                    "fieldPath":"b3s__Booking_Request__r.b3s__Client_Comments__c",
                    "hideIfNull":true
                },
                {
                    "label":"Response Comments",
                    "fieldPath":"b3s__Response_Comments__c",
                    "hideIfNull":true
                }
            ],
            "canEdit":false,
            "canDelete":false,
            "recordFormFields":[
                {
                    "field":"b3s__Response_Comments__c",
                    "labelOverride":"Comments",
                    "type":"field-text-area",
                    "required":true,
                    "disabled":false,
                    "columns":"col-span-2"
                }
            ]
        },
        "proposal":{
            "objectType":"b3s__Worker_Proposal__c",
            "accountFieldPaths":["b3s__Vendor_Invite__r.b3s__Vendor_Account__c"],
            "statusFieldPath":"b3s__Status__c",
            "contactFieldPath":"b3s__Contact__c",
            "workerNameFieldPath":"b3s__Contact__r.Name",
            "vendorInviteFieldPath":"b3s__Vendor_Invite__c",
            "inviteShiftFieldPath":"b3s__Vendor_Invite__r.b3s__Shift__c",
            "inviteBookingRequestFieldPath":"b3s__Vendor_Invite__r.b3s__Booking_Request__c",
            "ticketIdsFieldPath":"b3s__Ticket_Ids__c",
            "commentsFieldPath":"b3s__Comments__c",
            "requestedByFieldPath":"b3s__Requested_By__c",
            "requestedByContactNameFieldPath":"b3s__Requested_By_Contact__r.Name",
            "title":[
                {
                    "label":"Worker",
                    "fieldPath":"b3s__Contact__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Status",
                    "fieldPath":"b3s__Status__c",
                    "hideIfNull":false
                },
                {
                    "label":"Comments",
                    "fieldPath":"b3s__Comments__c",
                    "hideIfNull":true
                }
            ],
            "canEdit":{
                "condition":{
                    "allOrSome":"all",
                    "selectors":[
                        {
                            "field":"b3s__Status__c",
                            "operator":"equals",
                            "value":"Proposed"
                        }
                    ]
                }
            },
            "canDelete":false,
            "recordFormFields":[
                {
                    "field":"b3s__Contact__c",
                    "labelOverride":"Worker",
                    "type":"field-select",
                    "required":true,
                    "disabled":false,
                    "loader":"workers",
                    "optionLabelField":"Name",
                    "optionsInPopout":true,
                    "columns":"col-span-2"
                },
                {
                    "field":"b3s__Comments__c",
                    "type":"field-text-area",
                    "required":false,
                    "disabled":false,
                    "columns":"col-span-2"
                }
            ]
        },
        "ticket":{
            "objectType":"b3s__Ticket__c",
            "accountFieldPaths":["b3s__Contact__r.AccountId"],
            "contactFieldPath":"b3s__Contact__c",
            "ticketTypeFieldPath":"b3s__Ticket_Type__c",
            "ticketTypeNameFieldPath":"b3s__Ticket_Type__r.Name",
            "approvalNotRequiredFieldPath":"b3s__Ticket_Type__r.b3s__Approval_Not_Required__c",
            "validFromFieldPath":"b3s__Valid_From__c",
            "validUntilFieldPath":"b3s__Valid_Until__c",
            "onboardingFormFields":[
                {
                    "field": "b3s__Valid_From__c",
                    "type": "field-date-input",
                    "showIf": {
                        "condition": {
                            "allOrSome": "all",
                            "selectors": [
                                {
                                    "field": "b3s__Ticket_Type__c",
                                    "fieldLoader": "ticketTypes",
                                    "fieldLoaderField": "b3s__Requires_Start_Date__c",
                                    "operator": "equals",
                                    "value": true
                                }
                            ]
                        }
                    },
                    "required": true,
                    "disabled": false,
                    "columns": "col-span-1"
                },
                {
                    "field": "b3s__Valid_Until__c",
                    "type": "field-date-input",
                    "showIf": {
                        "condition": {
                            "allOrSome": "all",
                            "selectors": [
                                {
                                    "field": "b3s__Ticket_Type__c",
                                    "fieldLoader": "ticketTypes",
                                    "fieldLoaderField": "b3s__Requires_Valid_Until__c",
                                    "operator": "equals",
                                    "value": true
                                }
                            ]
                        }
                    },
                    "required": true,
                    "disabled": false,
                    "columns": "col-span-1"
                },
                {
                    "field": "b3s__Credential_Number__c",
                    "type": "field-text",
                    "showIf": {
                        "condition": {
                            "allOrSome": "all",
                            "selectors": [
                                {
                                    "field": "b3s__Ticket_Type__c",
                                    "fieldLoader": "ticketTypes",
                                    "fieldLoaderField": "b3s__Requires_Credential_Number__c",
                                    "operator": "equals",
                                    "value": true
                                }
                            ]
                        }
                    },
                    "required": true,
                    "disabled": false,
                    "columns": "col-span-1"
                },
                {
                    "field": "",
                    "labelOverride": "Evidence",
                    "type": "field-file-upload",
                    "props": {
                        "placeholder": "Upload file",
                        "maxFileSize": 6000000,
                        "multiple": true
                    },
                    "showIf": {
                        "condition": {
                            "allOrSome": "all",
                            "selectors": [
                                {
                                    "field": "b3s__Ticket_Type__c",
                                    "fieldLoader": "ticketTypes",
                                    "fieldLoaderField": "b3s__Requires_Evidence__c",
                                    "operator": "equals",
                                    "value": true
                                }
                            ]
                        }
                    },
                    "required": true,
                    "disabled": false,
                    "columns": "col-span-1"
                }
            ],
            "approvalStatusFieldPath":"b3s__Approval_Status__c",
            "title":[
                {
                    "label":"Worker",
                    "fieldPath":"b3s__Contact__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Credential",
                    "fieldPath":"b3s__Ticket_Type__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Valid From",
                    "fieldPath":"b3s__Valid_From__c",
                    "formatter":"date",
                    "hideIfNull":true
                },
                {
                    "label":"Valid Until",
                    "fieldPath":"b3s__Valid_Until__c",
                    "formatter":"date",
                    "hideIfNull":true
                },
                {
                    "label":"Credential Number",
                    "fieldPath":"b3s__Credential_Number__c",
                    "hideIfNull":true
                },
                {
                    "label":"Approval Status",
                    "fieldPath":"b3s__Approval_Status__c",
                    "hideIfNull":true
                }
            ],
            "canEdit":{
                "condition":{
                    "allOrSome":"some",
                    "selectors":[
                        {
                            "field":"b3s__Approval_Status__c",
                            "operator":"isnull",
                            "value":true
                        },
                        {
                            "field":"b3s__Approval_Status__c",
                            "operator":"equals",
                            "value":"Queried"
                        },
                        {
                            "field":"b3s__Approval_Status__c",
                            "operator":"equals",
                            "value":"Rejected"
                        }
                    ]
                }
            },
            "canDelete":false,
            "recordFormFields":[
                {
                    "field":"b3s__Contact__c",
                    "labelOverride":"Worker",
                    "type":"field-select",
                    "required":true,
                    "disabled":false,
                    "loader":"workers",
                    "optionLabelField":"Name",
                    "optionsInPopout":true,
                    "columns":"col-span-2"
                },
                {
                    "field":"b3s__Ticket_Type__c",
                    "labelOverride":"Credential Type",
                    "type":"field-select",
                    "required":true,
                    "disabled":false,
                    "loader":"ticketTypes",
                    "optionLabelField":"Name",
                    "optionsInPopout":true,
                    "columns":"col-span-2"
                },
                {
                    "field":"b3s__Valid_From__c",
                    "type":"field-date-input",
                    "required":{"condition": {"allOrSome": "all", "selectors": [{"field": "b3s__Ticket_Type__c", "fieldLoader": "ticketTypes", "fieldLoaderField": "b3s__Requires_Start_Date__c", "operator": "equals", "value": true}]}},
                    "disabled":false,
                    "columns":"col-span-2"
                },
                {
                    "field":"b3s__Valid_Until__c",
                    "type":"field-date-input",
                    "required":{"condition": {"allOrSome": "all", "selectors": [{"field": "b3s__Ticket_Type__c", "fieldLoader": "ticketTypes", "fieldLoaderField": "b3s__Requires_Valid_Until__c", "operator": "equals", "value": true}]}},
                    "disabled":false,
                    "columns":"col-span-2"
                },
                {
                    "field":"b3s__Credential_Number__c",
                    "type":"field-text",
                    "required":{"condition": {"allOrSome": "all", "selectors": [{"field": "b3s__Ticket_Type__c", "fieldLoader": "ticketTypes", "fieldLoaderField": "b3s__Requires_Credential_Number__c", "operator": "equals", "value": true}]}},
                    "disabled":false,
                    "columns":"col-span-2"
                },
                {
                    "label":"Evidence",
                    "columns":"col-span-2",
                    "translationKey":"record_files",
                    "type":"record-files-manager",
                    "canDelete":true,
                    "canCreate":true,
                    "required":{"condition": {"allOrSome": "all", "selectors": [{"field": "b3s__Ticket_Type__c", "fieldLoader": "ticketTypes", "fieldLoaderField": "b3s__Requires_Evidence__c", "operator": "equals", "value": true}]}}
                }
            ]
        },
        "worker":{
            "objectType":"Contact",
            "photoRequired":false,
            "accountFieldPaths":["AccountId"],
            "nameFieldPath":"Name",
            "title":[
                {
                    "label":"Name",
                    "fieldPath":"Name",
                    "hideIfNull":false
                },
                {
                    "label":"Email",
                    "fieldPath":"Email",
                    "hideIfNull":true
                },
                {
                    "label":"Phone",
                    "fieldPath":"Phone",
                    "hideIfNull":true
                },
                {
                    "label":"Engagement Type",
                    "fieldPath":"b3s__Engagement_Type__c",
                    "hideIfNull":false
                },
                {
                    "label":"Status",
                    "fieldPath":"b3s__Worker_Status__c",
                    "hideIfNull":true
                }
            ],
            "canEdit":true,
            "canDelete":false,
            "recordFormFields":[
                {
                    "field":"FirstName",
                    "type":"field-text",
                    "required":false,
                    "disabled":false,
                    "columns":"col-span-2"
                },
                {
                    "field":"LastName",
                    "type":"field-text",
                    "required":true,
                    "disabled":false,
                    "columns":"col-span-2"
                },
                {
                    "field":"Email",
                    "type":"field-text",
                    "required":false,
                    "disabled":false,
                    "columns":"col-span-2"
                },
                {
                    "field":"Phone",
                    "type":"field-text",
                    "required":false,
                    "disabled":false,
                    "columns":"col-span-2"
                },
                {
                    "field":"b3s__Engagement_Type__c",
                    "type":"field-select",
                    "required":true,
                    "disabled":false,
                    "columns":"col-span-2",
                    "options": [
                        {
                            "label": "PAYE",
                            "value": "PAYE"
                        },
                        {
                            "label": "Umbrella",
                            "value": "Umbrella"
                        }
                    ]
                },
                {
                    "field":"b3s__VMS_Role__c",
                    "type":"field-select",
                    "hidden":true,
                    "default":"Worker"
                }
            ]
        },
        "user":{
            "objectType":"Contact",
            "loaderName":"users",
            "accountFieldPaths":["AccountId","Account.ParentId"],
            "accountSelectFieldPath":"AccountId",
            "accountNameFieldPath":"Account.Name",
            "nameFieldPath":"Name",
            "emailFieldPath":"Email",
            "profileFieldPath":"$userProfileId",
            "disabledFieldPath":"b3p__Disabled_Portal_User__c",
            "canEdit":false,
            "canDelete":false,
            "recordFormFields":[
                {
                    "field":"FirstName",
                    "type":"field-text",
                    "required":true,
                    "columns":"col-span-2"
                },
                {
                    "field":"LastName",
                    "type":"field-text",
                    "required":true,
                    "columns":"col-span-2"
                },
                {
                    "field":"Email",
                    "type":"field-text",
                    "required":true,
                    "columns":"col-span-2"
                },
                {
                    "field":"AccountId",
                    "type":"field-select",
                    "label":"Account",
                    "required":true,
                    "columns":"col-span-2"
                },
                {
                    "field":"$userProfileId",
                    "type":"field-select",
                    "label":"User Profile",
                    "required":true,
                    "columns":"col-span-2"
                },
                {
                    "field":"b3s__VMS_Role__c",
                    "type":"field-select",
                    "hidden":true,
                    "default":"Vendor"
                }
            ]
        },
        "onboardingTemplate":{
            "objectType":"b3s__Onboarding_Template__c",
            "nameFieldPath":"Name",
            "descriptionFieldPath":"b3s__Description__c",
            "activeFieldPath":"b3s__Active__c",
            "canEdit":false,
            "canDelete":false
        },
        "workerOnboarding":{
            "objectType":"b3s__Worker_Onboarding__c",
            "accountFieldPaths":["b3s__Contact__r.AccountId"],
            "contactFieldPath":"b3s__Contact__c",
            "templateFieldPath":"b3s__Onboarding_Template__c",
            "templateNameFieldPath":"b3s__Onboarding_Template__r.Name",
            "canEdit":false,
            "canDelete":false
        },
        "shift":{
            "objectType":"b3s__Shift__c",
            "accountFieldPaths":["b3s__Supplier_Account__c"],
            "rateBasis":{"field":"b3s__Rate_Basis__c"},
            "shiftBulkViewTitle":[
                {
                    "label":"Rate Basis",
                    "fieldPath":"b3s__Rate_Basis__c",
                    "hideIfNull":true
                }
            ],
            "startFieldPath":"b3s__Scheduled_Start_Time__c",
            "endFieldPath":"b3s__Scheduled_End_Time__c",
            "siteTimezoneFieldPath":"b3s__Work_Site__r.b3s__Timezone__c",
            "absoluteStartFieldPath":"b3s__Absolute_Start_Time__c",
            "absoluteEndFieldPath":"b3s__Absolute_End_Time__c",
            "statusFieldPath":"b3s__Status__c",
            "totalHoursFieldPath":"b3s__Absolute_Length__c",
            "selectionClause":[
                "b3s__Supplier_Account__c IN :accountIds(b3s__Tab_Schedule__c)"
            ],
            "filters":[
                {
                    "label":"Worker",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Contact__r.Name",
                        "valueField":"b3s__Contact__c"
                    }
                },
                {
                    "label":"Job",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Work_Job__r.Name",
                        "valueField":"b3s__Work_Job__c"
                    }
                },
                {
                    "label":"Site",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Work_Site__r.Name",
                        "valueField":"b3s__Work_Site__c"
                    }
                }
            ],
            "title":[
                {
                    "label":"Scheduled Times",
                    "fieldPath":"b3s__Scheduled_Start_Time__c:b3s__Scheduled_End_Time__c",
                    "formatter":"startEndWithDate",
                    "siteTimezoneFieldPath":"b3s__Work_Site__r.b3s__Timezone__c",
                    "hideIfNull":false
                },
                {
                    "label":"Worker",
                    "fieldPath":"b3s__Contact__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Job",
                    "fieldPath":"b3s__Work_Job__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Site",
                    "fieldPath":"b3s__Work_Site__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Status",
                    "fieldPath":"b3s__Status__c",
                    "hideIfNull":true
                }
            ],
            "consolidation":{
                "groupBy":[
                    { "fieldPath":"b3s__Contact__c", "labelFieldPath":"b3s__Contact__r.Name" }
                ],
                "totalFieldPath":"b3s__Absolute_Length__c",
                "totalLabel":"Hours",
                "title":[
                    { "label":"Scheduled Times", "fieldPath":"b3s__Scheduled_Start_Time__c:b3s__Scheduled_End_Time__c", "formatter":"startEndWithDate", "siteTimezoneFieldPath":"b3s__Work_Site__r.b3s__Timezone__c", "hideIfNull":true },
                    { "label":"Job", "fieldPath":"b3s__Work_Job__r.Name", "hideIfNull":true },
                    { "label":"Site", "fieldPath":"b3s__Work_Site__r.Name", "hideIfNull":true },
                    { "label":"Status", "fieldPath":"b3s__Status__c", "hideIfNull":true }
                ]
            },
            "canEdit":false,
            "canDelete":false
        },
        "placement":{
            "objectType":"b3s__Working_Pattern__c",
            "accountFieldPaths":["b3s__Contact__r.AccountId"],
            "startFieldPath":"b3s__Start__c",
            "endFieldPath":"b3s__End__c",
            "isFieldPathDateType":true,
            "selectionClause":[
                "Id IN (SELECT b3s__Converted_Working_Pattern__c FROM b3s__Worker_Proposal__c WHERE b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Tab_Schedule__c))"
            ],
            "filters":[
                {
                    "label":"Worker",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Contact__r.Name",
                        "valueField":"b3s__Contact__c"
                    }
                },
                {
                    "label":"Job",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Job__r.Name",
                        "valueField":"b3s__Job__c"
                    }
                },
                {
                    "label":"Site",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Site__r.Name",
                        "valueField":"b3s__Site__c"
                    }
                }
            ],
            "title":[
                {
                    "label":"Worker",
                    "fieldPath":"b3s__Contact__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Job",
                    "fieldPath":"b3s__Job__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Site",
                    "fieldPath":"b3s__Site__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Dates",
                    "fieldPath":"b3s__Start__c:b3s__End__c",
                    "formatter":"startEndDate",
                    "hideIfNull":true
                },
                {
                    "label":"Pattern",
                    "fieldPath":"b3s__Working_Pattern_Type__r.Name",
                    "hideIfNull":true
                }
            ],
            "consolidation":{
                "groupBy":[
                    { "fieldPath":"b3s__Contact__c", "labelFieldPath":"b3s__Contact__r.Name" }
                ],
                "title":[
                    { "label":"Job", "fieldPath":"b3s__Job__r.Name", "hideIfNull":true },
                    { "label":"Site", "fieldPath":"b3s__Site__r.Name", "hideIfNull":true },
                    { "label":"Dates", "fieldPath":"b3s__Start__c:b3s__End__c", "formatter":"startEndDate", "hideIfNull":true },
                    { "label":"Pattern", "fieldPath":"b3s__Working_Pattern_Type__r.Name", "hideIfNull":true }
                ]
            },
            "canEdit":false,
            "canDelete":false
        },
        "revenue":{
            "objectType":"b3s__Pay_Bill_Staging__c",
            "accountFieldPaths":["b3s__Payee_Account__c"],
            "startFieldPath":"b3s__Shift__r.b3s__Scheduled_Start_Time__c",
            "endFieldPath":"b3s__Shift__r.b3s__Scheduled_End_Time__c",
            "dateFilterMode":"overlap",
            "quantityFieldPath":"b3s__Quantity__c",
            "unitFieldPath":"b3s__Unit__c",
            "totalFieldPath":"b3s__Total__c",
            "selectionClause":[
                "b3s__Type__c = 'Supplier' AND b3s__Payee_Account__c IN :accountIds(b3s__Tab_Revenue__c)"
            ],
            "filters":[
                {
                    "label":"Worker",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Shift__r.b3s__Contact__r.Name",
                        "valueField":"b3s__Shift__r.b3s__Contact__c"
                    }
                },
                {
                    "label":"Job",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Shift__r.b3s__Work_Job__r.Name",
                        "valueField":"b3s__Shift__r.b3s__Work_Job__c"
                    }
                },
                {
                    "label":"Site",
                    "type":"reference",
                    "value":{
                        "labelField":"b3s__Shift__r.b3s__Work_Site__r.Name",
                        "valueField":"b3s__Shift__r.b3s__Work_Site__c"
                    }
                }
            ],
            "title":[
                {
                    "label":"Shift",
                    "fieldPath":"b3s__Shift__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Worker",
                    "fieldPath":"b3s__Payee_Contact__r.Name",
                    "hideIfNull":true
                },
                {
                    "label":"Pay Code",
                    "fieldPath":"b3s__Pay_Code__c",
                    "hideIfNull":true
                },
                {
                    "label":"Applied Rule",
                    "fieldPath":"b3s__Applied_Rule__c",
                    "hideIfNull":true
                },
                {
                    "label":"Times",
                    "fieldPath":"b3s__Start_Time__c:b3s__End_Time__c",
                    "formatter":"startEndWithDate",
                    "siteTimezoneFieldPath":"b3s__Shift__r.b3s__Work_Site__r.b3s__Timezone__c",
                    "hideIfNull":true
                },
                {
                    "label":"Quantity",
                    "fieldPath":"b3s__Quantity__c",
                    "hideIfNull":true
                },
                {
                    "label":"Unit",
                    "fieldPath":"b3s__Unit__c",
                    "hideIfNull":true
                },
                {
                    "label":"Rate",
                    "fieldPath":"b3s__Rate__c",
                    "hideIfNull":true
                },
                {
                    "label":"Total",
                    "fieldPath":"b3s__Total__c",
                    "hideIfNull":false
                },
                {
                    "label":"Status",
                    "fieldPath":"b3s__Status__c",
                    "hideIfNull":true
                }
            ],
            "canEdit":false,
            "canDelete":false
        },
        "invoice":{
            "objectType":"b3s__Invoice__c",
            "loaderName":"invoices",
            "numberFieldPath":"b3s__Invoice_Number__c",
            "documentTypeFieldPath":"b3s__Document_Type__c",
            "categoryFieldPath":"b3s__Category__c",
            "statusFieldPath":"b3s__Status__c",
            "creditedNumberFieldPath":"b3s__Credited_Invoice__r.b3s__Invoice_Number__c",
            "clientNameFieldPath":"b3s__Client_Account__r.Name",
            "issueDateFieldPath":"b3s__Issue_Date__c",
            "dueDateFieldPath":"b3s__Due_Date__c",
            "periodStartFieldPath":"b3s__Period_Start__c",
            "periodEndFieldPath":"b3s__Period_End__c",
            "netFieldPath":"b3s__Net__c",
            "taxFieldPath":"b3s__Tax__c",
            "grossFieldPath":"b3s__Gross__c",
            "currencyFieldPath":"b3s__Currency__c",
            "pdfFieldPath":"b3s__Pdf_Document_Id__c",
            "backingSheetFieldPath":"b3s__Backing_Sheet_Document_Id__c",
            "canEdit":false,
            "canDelete":false
        },
        "invoiceLine":{
            "objectType":"b3s__Invoice_Line__c",
            "loaderName":"invoiceLines",
            "invoiceFieldPath":"b3s__Invoice__c",
            "sortFieldPath":"b3s__Sort_Order__c",
            "detailFieldPath":"b3s__Detail__c",
            "quantityFieldPath":"b3s__Quantity__c",
            "unitFieldPath":"b3s__Unit__c",
            "rateFieldPath":"b3s__Rate__c",
            "netFieldPath":"b3s__Net__c",
            "taxRateFieldPath":"b3s__Tax_Rate__c",
            "taxFieldPath":"b3s__Tax__c",
            "grossFieldPath":"b3s__Gross__c",
            "canEdit":false,
            "canDelete":false
        },
        "timesheetPlacement":{
            "objectType": "b3s__Working_Pattern__c",
            "accountFieldPaths": [
                "b3s__Contact__r.AccountId"
            ],
            "startFieldPath": "b3s__Start__c",
            "endFieldPath": "b3s__End__c",
            "isFieldPathDateType": true,
            "dateFilterMode": "overlap",
            "includeOpenEnded": true,
            "contactFieldPath": "b3s__Contact__c",
            "contactNameFieldPath": "b3s__Contact__r.Name",
            "selectionClause": [
                "b3s__Contact__c != null AND Id IN (SELECT b3s__Converted_Working_Pattern__c FROM b3s__Worker_Proposal__c WHERE b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Submit_Timesheets__c))"
            ],
            "canEdit": false,
            "canDelete": false
        },
        "extension":{
            "objectType": "b3s__Booking_Extension__c",
            "loaderName": "extensions",
            "placementFieldPath": "b3s__Working_Pattern__c",
            "workerNameFieldPath": "b3s__Working_Pattern__r.b3s__Contact__r.Name",
            "statusFieldPath": "b3s__Status__c",
            "awaitingFieldPath": "b3s__Awaiting__c",
            "requestedByRoleFieldPath": "b3s__Requested_By_Role__c",
            "requestedByContactFieldPath": "b3s__Requested_By_Contact__c",
            "extensionStartFieldPath": "b3s__Extension_Start__c",
            "newEndFieldPath": "b3s__New_End__c",
            "commentsFieldPath": "b3s__Comments__c",
            "title": [
                {
                    "label": "Job",
                    "fieldPath": "b3s__Job__r.Name",
                    "hideIfNull": true
                },
                {
                    "label": "Site",
                    "fieldPath": "b3s__Site__r.Name",
                    "hideIfNull": true
                },
                {
                    "label": "Client",
                    "fieldPath": "b3s__Working_Pattern__r.b3s__Job__r.b3s__Account__r.Name",
                    "hideIfNull": true
                },
                {
                    "label": "Previous End",
                    "fieldPath": "b3s__Previous_End__c",
                    "formatter": "date",
                    "hideIfNull": true
                },
                {
                    "label": "Extension",
                    "fieldPath": "b3s__Extension_Start__c:b3s__New_End__c",
                    "formatter": "startEndDate",
                    "hideIfNull": true
                },
                {
                    "label": "Rate Group",
                    "fieldPath": "b3s__Rate_Group__r.Name",
                    "hideIfNull": true
                },
                {
                    "label": "PO Number",
                    "fieldPath": "b3s__PO_Number__c",
                    "hideIfNull": true
                },
                {
                    "label": "Requested By",
                    "fieldPath": "b3s__Requested_By_Role__c",
                    "hideIfNull": true
                },
                {
                    "label": "Requester",
                    "fieldPath": "b3s__Requested_By_Contact__r.Name",
                    "hideIfNull": true
                },
                {
                    "label": "Approval Chain",
                    "fieldPath": "b3s__Approval_Chain__c",
                    "hideIfNull": true
                },
                {
                    "label": "Comments",
                    "fieldPath": "b3s__Comments__c",
                    "hideIfNull": true
                },
                {
                    "label": "Responses",
                    "fieldPath": "b3s__Response_Comments__c",
                    "hideIfNull": true
                }
            ],
            "canEdit": false,
            "canDelete": false
        }
    }
}
        ]]></value>
    </values>
    <values>
        <field>b3s__Loaders__c</field>
        <value xsi:type="xsd:string"><![CDATA[
[
    {
        "name": "clients",
        "objectName": "b3s__VMS_Sharing_Group_Assignment__c",
        "apexFilter": "b3s.VmsWorkerSharePoolFilter",
        "filterRecordsBy": ["b3s__Role__c IN ('Client', 'Master Vendor')"],
        "groupRecordsBy": "b3s__Account__c",
        "fieldToLoad": [
            "b3s__Account__c",
            "b3s__Account__r.Name",
            "b3s__Tier__c",
            "b3s__Role__c",
            "b3s__Sharing_Group__c",
            "b3s__Sharing_Group__r.Name"
        ]
    },
    {
        "name": "vendorVmsGroups",
        "objectName": "b3s__VMS_Sharing_Group_Assignment__c",
        "filterRecordsBy": ["b3s__Account__c IN :accountIds AND b3s__Role__c IN ('Vendor', 'Master Vendor')"],
        "groupRecordsBy": "Id",
        "fieldToLoad": ["b3s__Account__c", "b3s__Role__c", "b3s__Sharing_Group__c"]
    },
    {
        "name": "invites",
        "objectName": "b3s__Vendor_Invite__c",
        "filterRecordsBy": [
            "b3s__Vendor_Account__c IN :accountIds AND (b3s__Shift__r.b3s__Scheduled_End_Time__c >= LAST_N_DAYS:90 OR b3s__Booking_Request__r.b3s__End__c >= LAST_N_DAYS:90)"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "b3s__Status__c",
            "b3s__Expires__c",
            "b3s__Tier__c",
            "b3s__Available_From__c",
            "b3s__Seen_Timestamp__c",
            "b3s__Responded_Timestamp__c",
            "b3s__Response_Comments__c",
            "b3s__Shift__c",
            "b3s__Shift__r.b3s__Scheduled_Start_Time__c",
            "b3s__Shift__r.b3s__Scheduled_End_Time__c",
            "b3s__Shift__r.b3s__Required_Staff__c",
            "b3s__Shift__r.b3s__Rate_Basis__c",
            "b3s__Shift__r.b3s__Status__c",
            "b3s__Shift__r.b3s__VMS_Stage__c",
            "b3s__Shift__r.b3s__Work_Job__r.Name",
            "b3s__Shift__r.b3s__Work_Site__r.Name",
            "b3s__Shift__r.b3s__Work_Site__r.b3s__Timezone__c",
            "b3s__Booking_Request__c",
            "b3s__Booking_Request__r.b3s__Start__c",
            "b3s__Booking_Request__r.b3s__End__c",
            "b3s__Booking_Request__r.b3s__Required_Staff__c",
            "b3s__Booking_Request__r.b3s__Rate_Basis__c",
            "b3s__Booking_Request__r.b3s__Job__r.Name",
            "b3s__Booking_Request__r.b3s__Site__r.Name",
            "b3s__Booking_Request__r.b3s__Working_Pattern_Type__r.Name",
            "b3s__Booking_Request__r.b3s__Client_Comments__c",
            "b3s__Booking_Request__r.b3s__VMS_Stage__c",
            "b3s__Vendor_Account__c"
        ]
    },
    {
        "name": "messages",
        "objectName": "b3s__VMS_Message__c",
        "filterRecordsBy": [
            "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "b3s__Vendor_Invite__c",
            "b3s__Body__c",
            "b3s__Author_Contact__c",
            "b3s__Author_Contact__r.Name",
            "b3s__Author_Role__c",
            "CreatedDate",
            "b3s__Vendor_Invite__r.b3s__Vendor_Account__c"
        ]
    },
    {
        "name": "onboardingTemplates",
        "objectName": "b3s__Onboarding_Template__c",
        "filterRecordsBy": [
            "Id IN (SELECT b3s__Onboarding_Template__c FROM b3s__Onboarding_Template_Assignment__c WHERE b3s__Account__c IN :accountIds(b3s__Onboard_Workers__c)) AND b3s__Active__c = true"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "b3s__Description__c",
            "b3s__Active__c"
        ]
    },
    {
        "name": "proposals",
        "objectName": "b3s__Worker_Proposal__c",
        "filterRecordsBy": [
            "b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "b3s__Status__c",
            "b3s__Comments__c",
            "b3s__Requested_By__c",
            "b3s__Requested_By_Contact__r.Name",
            "b3s__Ticket_Ids__c",
            "b3s__Contact__c",
            "b3s__Contact__r.Name",
            "b3s__Vendor_Invite__c",
            "b3s__Vendor_Invite__r.Name",
            "b3s__Vendor_Invite__r.b3s__Status__c",
            "b3s__Vendor_Invite__r.b3s__Shift__c",
            "b3s__Vendor_Invite__r.b3s__Booking_Request__c",
            "b3s__Vendor_Invite__r.b3s__Shift__r.b3s__Scheduled_Start_Time__c",
            "b3s__Vendor_Invite__r.b3s__Shift__r.b3s__Work_Job__r.Name",
            "b3s__Vendor_Invite__r.b3s__Shift__r.b3s__Work_Site__r.Name",
            "b3s__Vendor_Invite__r.b3s__Booking_Request__r.b3s__Job__r.Name",
            "b3s__Vendor_Invite__r.b3s__Booking_Request__r.b3s__Site__r.Name",
            "b3s__Converted_Shift__c",
            "b3s__Converted_Working_Pattern__c",
            "b3s__Vendor_Invite__r.b3s__Vendor_Account__c"
        ]
    },
    {
        "name": "requirements",
        "objectName": "b3s__Certificate_Requirement__c",
        "filterRecordsBy": [
            "b3s__Shift__c IN (SELECT b3s__Shift__c FROM b3s__Vendor_Invite__c WHERE b3s__Vendor_Account__c IN :accountIds)",
            "b3s__Booking_Request__c IN (SELECT b3s__Booking_Request__c FROM b3s__Vendor_Invite__c WHERE b3s__Vendor_Account__c IN :accountIds)"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "b3s__Ticket_Type__c",
            "b3s__Ticket_Type__r.Name",
            "b3s__Priority__c",
            "b3s__Shift__c",
            "b3s__Booking_Request__c",
            "b3s__Is_Auto_Derived__c"
        ]
    },
    {
        "name": "sharedWorkers",
        "objectName": "b3s__Shared_Worker__c",
        "filterRecordsBy": [
            "b3s__Contact__r.AccountId IN :accountIds(b3s__Tab_Workers__c)"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "b3s__Contact__c",
            "b3s__Contact__r.Name",
            "b3s__Contact__r.AccountId",
            "b3s__Contact__r.Account.Name",
            "b3s__Client_Account__c",
            "b3s__Client_Account__r.Name",
            "b3s__Status__c"
        ]
    },
    {
        "name": "ticketTypes",
        "objectName": "b3s__Ticket_Type__c",
        "filterRecordsBy": [
            "Id != null"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "b3s__Requires_Start_Date__c",
            "b3s__Requires_Valid_Until__c",
            "b3s__Requires_Credential_Number__c",
            "b3s__Requires_Evidence__c",
            "b3s__Approval_Not_Required__c"
        ]
    },
    {
        "name": "tickets",
        "objectName": "b3s__Ticket__c",
        "filterRecordsBy": [
            "b3s__Contact__r.AccountId IN :accountIds"
        ],
        "groupRecordsBy": "b3s__Contact__c",
        "fieldToLoad": [
            "Name",
            "b3s__Contact__c",
            "b3s__Contact__r.Name",
            "b3s__Ticket_Type__c",
            "b3s__Ticket_Type__r.Name",
            "b3s__Ticket_Type__r.b3s__Approval_Not_Required__c",
            "b3s__Valid_From__c",
            "b3s__Valid_Until__c",
            "b3s__Credential_Number__c",
            "b3s__Approval_Status__c",
            "b3s__Reviewed_Timestamp__c",
            "b3s__Contact__r.AccountId"
        ]
    },
    {
        "name": "users",
        "objectName": "Contact",
        "filterRecordsBy": [
            "(AccountId IN :accountIds(b3s__Tab_Settings__c) OR Account.ParentId IN :accountIds(b3s__Tab_Settings__c)) AND b3s__VMS_Role__c = 'Vendor'"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "FirstName",
            "LastName",
            "Email",
            "AccountId",
            "Account.Name",
            "Account.ParentId",
            "b3p__Disabled_Portal_User__c"
        ]
    },
    {
        "name": "workers",
        "objectName": "Contact",
        "filterRecordsBy": [
            "AccountId IN :accountIds AND b3s__VMS_Role__c NOT IN ('Client', 'Vendor')"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "FirstName",
            "LastName",
            "Email",
            "Phone",
            "b3s__Worker_Status__c",
            "AccountId"
        ]
    },
    {
        "name": "workerOnboardings",
        "objectName": "b3s__Worker_Onboarding__c",
        "filterRecordsBy": [
            "b3s__Contact__r.AccountId IN :accountIds"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "b3s__Contact__c",
            "b3s__Onboarding_Template__c",
            "b3s__Onboarding_Template__r.Name",
            "b3s__Contact__r.AccountId"
        ]
    },
    {
        "name": "invoices",
        "objectName": "b3s__Invoice__c",
        "filterRecordsBy": [
            "b3s__Account__c IN :accountIds(b3s__Tab_Invoices__c) AND b3s__Kind__c = 'Self-Bill' AND b3s__Status__c IN ('Issued', 'Reverted')"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "b3s__Invoice_Number__c",
            "b3s__Kind__c",
            "b3s__Document_Type__c",
            "b3s__Category__c",
            "b3s__Status__c",
            "b3s__Credited_Invoice__r.b3s__Invoice_Number__c",
            "b3s__Client_Account__r.Name",
            "b3s__Issue_Date__c",
            "b3s__Due_Date__c",
            "b3s__Period_Start__c",
            "b3s__Period_End__c",
            "b3s__Net__c",
            "b3s__Tax__c",
            "b3s__Gross__c",
            "b3s__Currency__c",
            "b3s__Pdf_Document_Id__c",
            "b3s__Backing_Sheet_Document_Id__c"
        ]
    },
    {
        "name": "invoiceLines",
        "objectName": "b3s__Invoice_Line__c",
        "filterRecordsBy": [
            "b3s__Invoice__c = :contextId AND b3s__Invoice__r.b3s__Account__c IN :accountIds(b3s__Tab_Invoices__c) AND b3s__Invoice__r.b3s__Kind__c = 'Self-Bill' AND b3s__Invoice__r.b3s__Status__c IN ('Issued', 'Reverted')"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "b3s__Invoice__c",
            "b3s__Sort_Order__c",
            "b3s__Detail__c",
            "b3s__Quantity__c",
            "b3s__Unit__c",
            "b3s__Rate__c",
            "b3s__Net__c",
            "b3s__Tax_Rate__c",
            "b3s__Tax__c",
            "b3s__Gross__c"
        ]
    },
    {
        "name": "extensions",
        "objectName": "b3s__Booking_Extension__c",
        "filterRecordsBy": [
            "b3s__Working_Pattern__c IN (SELECT b3s__Converted_Working_Pattern__c FROM b3s__Worker_Proposal__c WHERE b3s__Vendor_Invite__r.b3s__Vendor_Account__c IN :accountIds(b3s__Review_Extensions__c)) AND CreatedDate = LAST_N_DAYS:365"
        ],
        "groupRecordsBy": "Id",
        "fieldToLoad": [
            "Name",
            "CreatedDate",
            "b3s__Status__c",
            "b3s__Awaiting__c",
            "b3s__Approval_Chain__c",
            "b3s__Previous_End__c",
            "b3s__Extension_Start__c",
            "b3s__New_End__c",
            "b3s__Comments__c",
            "b3s__Response_Comments__c",
            "b3s__Requested_By_Role__c",
            "b3s__Requested_By_Account__r.Name",
            "b3s__Requested_By_Contact__c",
            "b3s__Requested_By_Contact__r.Name",
            "b3s__Reviewed_By_Role__c",
            "b3s__Reviewed_Timestamp__c",
            "b3s__PO_Number__c",
            "b3s__Rate_Group__r.Name",
            "b3s__Job__r.Name",
            "b3s__Site__r.Name",
            "b3s__Working_Pattern__c",
            "b3s__Working_Pattern__r.Name",
            "b3s__Working_Pattern__r.b3s__Contact__r.Name",
            "b3s__Working_Pattern__r.b3s__Job__r.Name",
            "b3s__Working_Pattern__r.b3s__Site__r.Name",
            "b3s__Working_Pattern__r.b3s__Start__c",
            "b3s__Working_Pattern__r.b3s__End__c",
            "b3s__Working_Pattern__r.b3s__Job__r.b3s__Account__r.Name"
        ]
    }
]
]]></value>
    </values>
    <values>
        <field>b3s__Type__c</field>
        <value xsi:type="xsd:string">Vendor Portal</value>
    </values>
</CustomMetadata>
