---
schema_version: "1"
id: 2bfa954510409228d3a02e5ee4136d2aad19bdcb45dd630461a9079e64a0b3d3
title: "Work Rule Type: Match Time Rule"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/pfs_optimization_theory_work_rules_match_time.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.pfs_optimization_theory_work_rules_match_time.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: bace39acb8ba898156f1e53db871eda560401e3950d463c2467a142117de2f37
description: Match Time Rule is a Field Service Apex work rule type that limits the scheduling time frame based on an appointment’s date and time properties. For example, the Due Date work rule ensures that the appointment’s scheduled end is before its due date.
products:
  - Field Service
release: "264"
---
# Work Rule Type: Match Time Rule

Match Time Rule is a Field Service Apex work rule type that limits the scheduling time frame based on an appointment’s date and time properties. For example, the Due Date work rule ensures that the appointment’s scheduled end is before its due date.

### 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: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">The Agentforce Field Service and Operations core features, managed package, and mobile app are available in <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions.</td></tr></tbody></table>

![Package icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/support_field_service/images/fs_package.png) _This is a Field Service managed package feature._

Work rules of this type contain the following settings.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <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="d58496e84">Field Name</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d58496e87">Description</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Field Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d58496e84 ">Service Schedule Time Property</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d58496e87 ">Indicates whether the rule controls the service appointment’s
            scheduled start time or scheduled end time. Custom date/time fields
            aren’t supported.</td>

        </tr>
        <tr class="">
          <td data-label="Field Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d58496e84 ">Service Time Operator</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d58496e87 ">The required relationship between the Service Schedule Time Property
            and the Service Time Property. For example, if you select
            <strong class="uicontrol">Equal</strong>, a service appointment’s Service
            Schedule Time Property value must equal the appointment’s Service Time
            Property value.
          </td>

        </tr>
        <tr class="">
          <td data-label="Field Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d58496e84 ">Service Time Property</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d58496e87 ">
            <p>The service appointment field that defines the work rule requirement.
              There are four options.</p>
            <ul>
              <li><strong class="uicontrol">EarliestStartTime</strong> and
                <strong class="uicontrol">DueDate</strong> together represent the total
                time frame during which an appointment must start and
                complete.
              </li>
              <li>The <strong class="uicontrol">ArrivalWindowStart</strong> and
                <strong class="uicontrol">EndTime</strong> together represent the
                arrival window time frame promised to the customer.
              </li>
            </ul>
            <div class="slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium">
              <div class="slds-media slds-media_responsive">
                <div class="slds-media__figure"><span class="slds-icon_container slds-icon_container_circle slds-icon-note-note"><img style="margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/images/icon_note.png" alt="Note"></span></div>
                <div class="slds-media__body" style="padding-top:.5rem;padding-bottom:.5rem;"><span class="slds-text-title_caps">Note</span> Match Time work rules with custom date/time
                  fields are fully supported for schedule optimization only when
                  you’re using Enhanced Scheduling and Optimization. When you aren’t
                  using Enhanced Scheduling and Optimization, custom date/time fields
                  are supported only for platform scheduling actions, for example,
                  Appointment Booking and Get Candidates, but not for optimization
                  services.</div>
              </div>
            </div>
          </td>

        </tr>
        <tr class="">
          <td data-label="Field Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d58496e84 ">Pass Empty Values</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d58496e87 ">If you select this option and any of the Service Time Property values
            are empty, the Match Time rule is ignored.</td>

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

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/images/icon_note.png)

Note You can't create a Match Time rule with the Service Schedule Time Property set to SchedStartTime, the Service Time Operator set to Before, or Equal to, and the Service Time Property set to ArrivalWindowStartTime, ArrivalWindowEndTime, or any custom time field.

Field Service includes four standard Match Time Rule work rules.

- Earliest Start Permitted:​ Ensures that a service appointment’s Scheduled Start is equal to or later than the Earliest Start Permitted. This work rule is included in every standard scheduling policy.
- Due Date​: Ensures a service appointment’s Scheduled End is equal to or earlier than the Due Date. This work rule is included in every standard scheduling policy.
- Scheduled Start​: Ensures that a service appointment’s Scheduled Start is equal to or later than the Arrival Window Start.
- Scheduled End​: Ensures that a service appointment’s Scheduled Start is equal to or earlier than the Arrival Window End.

An appointment’s Scheduled Start is based on the travel time recorded for previous appointments. The Scheduled End is calculated by adding the Duration to the Scheduled Start.

![Time windows for work rules](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/support_field_service/images/fsl_optimization_scheduling_times.png)

Work rules that impose time constraints limit your optimization flexibility. When you create Match Time Rule work rules, consider the commitments that you’ve made to customers and your goals regarding wait time.

Create work rules from the Work Rules tab. To view or add work rule fields open the **Object Manager** in Setup and select the **Work Rule** custom object. Add work rules to a scheduling policy from the **Customize Scheduling Policies** page in Guided Setup or from the Scheduling Policy Work Rules related list on a scheduling policy.

#### See Also

- [Service Appointment Fields for Field Service](https://help.salesforce.com/s/articleView?id=service.fs_appointment_fields.htm&release=264.0.0&type=5 "Service appointments have the following fields. Some fields may not be visible or editable depending on your page layout and field-level security settings.")
- [Create and Manage Field Service Work Rules](https://help.salesforce.com/s/articleView?id=service.pfs_optimization_theory_work_rules.htm&release=264.0.0&type=5 "Work rules refine the list of candidates for a service appointment by rejecting service resources that violate any rule. Add work rules to any Field Service scheduling policy to guide schedule optimization.")