Workforce Scheduling Interaction Data Mapping

Review how the standard context definition maps interaction data so Workforce Scheduling can schedule onsite appointments with agency employees in office.

Required Editions

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

About Interaction Mapping

Workforce Scheduling automatically creates a corresponding Service Appointment record whenever a user creates or schedules an Interaction record. While users interact directly with the Interaction record to manage onsite appointments, Workforce Scheduling uses the Service Appointment record to match resources, optimize schedules, and finalize appointments.

When to Use Interactions and Visits

  • Interaction: Use for onsite work where a constituent travels to your office or facility, such as a benefits interview at a Family Services office, a DMV licensing appointment, an orientation session, a case review, a hearing, or a consultation.
  • Visit: Use for field work where a service resource travels to a constituent location.

The standard WorkforceSchedulingContext definition includes InteractionMapping out of the box. This mapping automatically syncs data from Interaction and Interaction Attendee records to the corresponding Service Appointment record, including:

  • Work type and subject
  • Scheduled start and end times
  • Account details
  • Assigned resources and attendees

The standard InteractionMapping can't be edited directly. To map additional fields or modify existing field mappings, clone WorkforceSchedulingContext to create a custom context definition.

For example, when a scheduler books a benefits interview as an interaction record, Workforce Scheduling creates a service appointment record and maintains continuous data synchronization between the two records. The scheduler continues to work with the interaction record, while the scheduling engine uses the Account, Work Type, and Scheduled Start and End times on the Service Appointment record to evaluate availability, find time slots, and assign an interviewer.

Nodes and Objects in the Mapping

WorkforceSchedulingContext comprises three nodes. InteractionMapping pairs each node with an Interaction-side object and a Service Appointment-side object.

Context Definition Node Interaction-side Object Service Appointment-side Object What It Represents
WorkforceSchedule Interaction ServiceAppointment The scheduled onsite appointment, including its timing, work type, and account.
WorkforceScheduleResource InteractionAttendee AssignedResource (to ServiceResource) The resource assigned to the appointment, such as the staff member who meets the constituent.
WorkforceScheduleAttendee InteractionAttendee ServiceAppointmentAttendee The people attending the appointment.

Interaction Field Mappings

These fields on the Interaction object map to Service Appointment through the WorkforceSchedulingContext node.

Interaction field Service Appointment field Sync Direction Description
WorkTypeId WorkTypeId Bidirectional The work type that classifies the appointment.
AccountId AccountId Bidirectional The account the appointment is for.
Name Subject Bidirectional The interaction's name becomes the service appointment's subject.
StartTime SchedStartTime Bidirectional The scheduled start time of the appointment.
EndTime SchedEndTime Bidirectional The scheduled end time of the appointment.
ActualStartTime ActualStartTime Bidirectional When the appointment actually started. The assigned resource or the person managing the interaction sets the value manually.
ActualEndTime ActualEndTime Bidirectional When the appointment actually ended. The assigned resource or the person managing the interaction sets the value manually.
LeadId CustomerReferenceRecordId Unidirectional. from Service Appointment to Interaction. References the customer record associated with the appointment.
Status StatusCategory Unidirectional. Status flows from Service Appointment to Interaction. The service appointment's status category sets the interaction status.

Review these additional considerations when working with Interaction records:

  • Scheduled Start, Scheduled End, Assigned Resource, and Status fields are owned by the engine and are read-only on the interaction. The engine updates these fields automatically when it schedules the work, or when a user runs an action such as Schedule, Cancel Appointment, or Change Status. That's why Status maps in one direction only - from the service appointment to the interaction.
  • These interaction attributes in the context definition don't map to the service appointment: InteractionType, LocationId (derived from ServiceTerritoryLocation), and AssociatedRecordId (AssociatedRecord). The AssociatedRecord value comes from the flow and depends on the launch point. For example, when the flow is launched from a Case record, this attribute contains the Case ID.

Resource Mappings

The WorkforceSchedulingContext node maps assigned resources from the InteractionAttendee object to the AssignedResource and ServiceResource objects.

InteractionAttendee field Service Appointment-side field Sync Direction
Asset ServiceResource.Asset (through AssignedResource) Unidirectional (Service Appointment to Interaction)
User ServiceResource.RelatedRecord (through AssignedResource) Unidirectional (Service Appointment to Interaction)
Event AssignedResource.Event Unidirectional (Service Appointment to Interaction)
AttendeeType Not mapped to Service Appointment. This field's value depends on the context it's read from - it's Internal in AssignedResourceContext and External in the Attendee context. NA

Attendee Mappings

The WorkforceScheduleAttendee node maps attendees from the InteractionAttendee object to the ServiceAppointmentAttendee object.

InteractionAttendee field ServiceAppointmentAttendee field Sync Direction
Contact Attendee Unidirectional (Service Appointment to Interaction)
EmailAddress Email Unidirectional (Service Appointment to Interaction)
AttendeeType Not mapped to Service Appointment. This field's value depends on the context it's read from - it's Internal in AssignedResourceContext and External in the Attendee context. NA