Working with Workforce Scheduling Visits

Create a Visit when a constituent or customer needs field work performed at their location or another external site. Workforce Scheduling actions schedule Visits through their underlying Service Appointments according to the scheduling policy. The scheduling policy combines work rules and service objectives to determine eligible resources and time slots. You can reschedule, cancel, or unschedule a Visit.

Required Editions

Available in: Lightning Experience
Available in: Enterprise and Unlimited Editions

How Workforce Scheduling Schedules Field Visits

Visits represent field work. Scheduling or rescheduling a Visit creates or updates the underlying Service Appointment and parent Work Order. The scheduling engine acts on the underlying records, not on the Visit itself, using object mapping. Workforce Scheduling leverages a unified scheduling flow, and a backend Context Service layer. In the Salesforce platform architecture — specifically within Workforce Scheduling for Agentforce Public Sector — the Context Service is a standard backend service designed to act as an intelligent data abstraction and mapping layer.

  • How scheduling is initiated: A user creates and schedules a Visit record from the scheduling flow (field-classified).
  • The Backend Logic: When a Visit is scheduled, the Context Service automatically creates and maps a corresponding Service Appointment and Work Order in the background. The Context Service acts as a data layer between Salesforce objects and the scheduling flows that power appointment creation and management. When a user schedules a Service Appointment or a Visit, the scheduling flow uses a standard context definition to gather the required data, such as work type, engagement channel, location, and scheduled times, from the relevant Salesforce objects. Standard context definitions simplify this process by providing preconfigured mappings between context attributes and Salesforce object fields. Each mapping is designed for a specific scheduling scenario, so the correct data is collected and passed to the scheduling flow automatically.
  • The Result: Visits are user-facing, while Service Appointments are engine-facing. Every scheduling action the user triggers on the Visit runs against the Service Appointment. The scheduling and optimization engine reads the underlying Service Appointment’s fields to schedule the appointment. The engine blocks out the service resource’s calendar, tracks travel time, and applies the scheduling policy’s work rules. Any changes made to a Service Appointment, such as scheduled time, assigned resource, status, and other scheduling logic, are synced with the Visit. Dispatchers work with the Visit tile on the Operations Console, while the scheduling actions run against the Service Appointment in the background.

Work Orders and Service Appointments without a Visit are used for break-fix, maintenance, and installation work. The scheduling engine treats a visit-linked service appointment and a work-order-only service appointment the same way (the Service Appointment behind a Visit uses the same scheduling policy, work rules, and service objectives as a work-order-only Service Appointment).

Scheduling Actions

The following scheduling actions run against the Service Appointment behind a Visit or Work Order.

Schedule New Appointment or Change Time Slot
The scheduling flow returns graded time slots. Users pick a slot. Workforce Scheduling assigns the resource, schedules the Visit, and updates the Service Appointment’s status.
Find Candidates
Find Candidates returns eligible resources with a graded time slot for each, without assigning. Use Find Candidates (from the console or API) when you want to preview options before scheduling or when you need a list of candidates for downstream logic.
Schedule and Reschedule
Schedule automatically assigns the highest-graded candidate to the Service Appointment. Reschedule automatically moves the Visit and the Service Appointment to a new time or resource, subject to the active scheduling policy.
Global Optimization
Global optimization runs across the Service Appointments for a service territory and a time horizon, and rewrites assignments to raise the schedule’s overall score against the policy’s service objectives. Global optimization acts on the Service Appointments. The linked Visits reflect the new schedule when the run completes.
In-Day Optimization
In-day optimization runs on the current day’s schedule and adjusts assignments to react to changes such as new appointments, delays, or resource absences. In-day optimization uses the same policy as the scheduled run and updates Visits through their underlying Service Appointments.
Resource Schedule Optimization (RSO)
RSO runs on a single resource’s day and rearranges their Service Appointments to reduce travel time or close schedule gaps.

Before you schedule a Visit, confirm that your org has:

  • The Visit’s Work Type defined, with a duration and required skills that match the field work the resource performs.
  • At least one service territory that covers the Visit’s address, with resources assigned to it.
  • A scheduling policy with work rules and service objectives configured for field scheduling.

You can create and schedule a Visit from a Claim or Application Form record. The scheduling flow walks you through selecting a time slot and confirming the Visit. When creating or managing Visits, you work with these key fields:

  • Work Type: Determines the type of work, required skills, duration type, and estimated duration.
  • Earliest Start Permitted: The exact date and time after which a resource can begin work
  • Visit Priority: Determines how the engine ranks the visit for scheduling purposes (Low, Medium, High, or Critical).
  • Due Date: The latest date by which the visit must be completed.
  • Service Territory: The geographic or functional area where the visit occurs.
  • Customer: The customer, constituent, or organization being visited.
  • Address: The physical location of the visit.
Note
Note
  • When you schedule a new appointment, a Visit is created and scheduled as part of the scheduling flow. To create a Visit, a Place field must be populated as this is a mandatory field on Visits. Place is taken from the Service Territory if it doesn’t exist on the Visit and not derived otherwise in the flow.
  • To ensure Visits can be scheduled and that the Place field is populated as part of this flow, admins need to add a Place record on Service Territories (Service Territory Location).
  • When a Visit exists and is scheduled by another service, the place is taken directly from the Visit record.

When you schedule a Visit, you select the scheduling policy that controls how Workforce Scheduling assigns the Visit to a resource.

  • If you create and schedule a Visit from the scheduling flow, the default policy defined in Setup is used. You can select a different policy in the flow.
  • If a Visit is scheduled automatically from the Gantt with the Schedule action, the scheduling policy is based on the Gantt’s selected policy.
  • If a Visit is scheduled automatically via Resource Schedule Optimization, the scheduling policy is based on the Gantt default policy. You can select a different policy in Setup.
  • If scheduling and optimization is done via API, the scheduling policy is an API parameter.

Each scheduling policy combines work rules that determine which resources are eligible with service objectives that rank the best fit. The scheduling engine uses the Visit’s underlying Service Appointment to find time slots, assign a resource, and schedule the Visit.

You can reschedule a Visit to a different time slot, which can reassign it to a different resource based on availability. You can also cancel a Visit that’s no longer needed. When you reschedule, Workforce Scheduling updates the underlying service appointment and pushes the new time, resource, and status back to the Visit. Canceling a Visit removes the appointment from the Operations Console Gantt and the service appointment list, frees the resource’s time and sets the Visit’s status to Canceled.

You can also unschedule a Visit. Unscheduling removes the assigned resource, sets the status to Unscheduled and clears the Scheduled Start and Scheduled End fields on the underlying Service Appointment. The Service Appointment remains in the Service Appointment list.

Use Case for Public Sector: Schedule a Wellness Check

A child welfare caseworker needs a home inspection check for a family in their caseload. The caseworker schedules a new appointment from the Case record, which runs a scheduling flow. In the flow, the caseworker selects the Work Type and completes the time and priority details for the field work. Workforce Scheduling grades candidate slots for the family’s address against the active scheduling policy. After the caseworker selects a time slot and confirms, the flow creates a Visit. The scheduled Visit is shown on the Operations Console Gantt and in the list view, and includes the scheduled start time, address, and status.