ServiceAppointment

Represents an appointment booked through Salesforce Scheduler. This object is available in API version 38.0 and later.

Supported Calls 

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete, update(), upsert()

Special Access Rules 

Salesforce Scheduler must be enabled.

Usage 

Service appointments always have a parent record, which can be an account. Service appointments on accounts represent work being performed for the account.

Fields 

AccountId 

  • Type: reference
  • Properties: Filter, Group, Nillable, Sort
  • Description: (Read only) The account associated with the appointment. This is a relationship field.
  • Relationship Name: Account
  • Relationship Type: Lookup
  • Refers To: Account

ActualDuration 

  • Type: double
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The number of minutes that it took the resource to complete the appointment. When values are first added to the Actual Start and Actual End fields, the Actual Duration is automatically populated to list the difference between the Actual Start and Actual End. If the Actual Start and Actual End fields are subsequently updated, the Actual Duration field doesn’t re-update, but you can manually update it.

ActualEndTime 

  • Type: dateTime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The actual date and time the appointment ended.

ActualStartTime 

  • Type: dateTime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The actual date and time the appointment started.

AdditionalInformation 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Represents additional information about the service appointment,

Address 

  • Type: address
  • Properties: Filter
  • Description: The address where the appointment is taking place.

AppointmentCategoryId 

  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The ID of the appointment category related to the service appointment. For example, for customers who visit the branch without an appointment, the drop in category is applicable. For pre-booked appointments, the scheduled category is applicable. This field is available in API version 58.0 and later. This is a relationship field.
  • Relationship Name: AppointmentCategory
  • Relationship Type: Lookup
  • Refers To: AppointmentCategory

AppointmentInvitationId 

  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The ID of the appointment invitation related to the appointment. This field is available in API version 55.0 and later. This field is a relationship field.
  • Relationship Name: AppointmentInvitation
  • Relationship Type: Lookup
  • Refers To: AppointmentInvitation

AppointmentMode 

  • Type: picklist

  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

  • Description: The mode of the service appointment. This field is available in API version 60.0 and later.

  • Default value: Regular

  • Possible values:

    • Group
    • Regular

AppointmentNumber 

  • Type: string
  • Properties: Autonumber, Defaulted on create, Filter, idLookup, Sort
  • Description: An auto-assigned number that identifies the appointment.

AppointmentType 

  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The type of appointment. Possible values are: call—Phone, company—At a branch, or video—Video call.

ApptBookingInfoUrl 

  • Type: textarea
  • Properties: Create, Nillable, Update
  • Description: The appointment booking URL related to the appointment. This field is available in API version 57.0 and later. For Amazon Chime, this field has an encrypted appointment ID.

ArrivalWindowEndTime 

  • Type: dateTime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The end of the window of time in which the technician is scheduled to arrive at the site. This window is typically larger than the Scheduled Start and End window to allow time for delays and scheduling changes. You can choose to share the Arrival Window Start and End with the customer, but keep the Scheduled Start and End internal-only.

ArrivalWindowStartTime 

  • Type: dateTime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The beginning of the window of time in which the technician is scheduled to arrive at the site. This window is typically larger than the Scheduled Start and End window to allow time for delays and scheduling changes. You can choose to share the Arrival Window Start and End with the customer, but keep the Scheduled Start and End internal-only.

AttendeeCount 

  • Type: int
  • Properties: Filter, Group, Nillable, Sort
  • Description: The number of attendees associated with the service appointment. This field is available in API version 60.0 and later.

AttendeeLimit 

  • Type: int
  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
  • Description: The maximum number of customers allowed to attend the service appointment. This field is considered when the appointment mode is Group. This field is available in API version 60.0 and later.

CancellationReason 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The reason for the service appointment cancellation.

CheckedInTime 

  • Type: dateTime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The date and time when the service appointment status changed to CheckedIn. This field is available in API version 60.0 and later.

City 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The city where the appointment is completed. The maximum length is 40 characters.

Comments 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The comments for the service appointment.

ContactId 

  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The contact associated with the parent record. If needed, you can manually update the service appointment contact. This is a relationship field.
  • Relationship Name: Contact
  • Relationship Type: Lookup
  • Refers To: Contact

Country 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The country where the appointment is completed. The maximum length is 80 characters.

Description 

  • Type: textarea
  • Properties: Create, Nillable, Update
  • Description: The description of the appointment.

DueDate 

  • Type: dateTime
  • Properties: Create, Filter, Sort, Update
  • Description: The date by which the appointment must be completed. Earliest Start Permitted and Due Date typically reflect terms in the customer’s service-level agreement.

Duration 

  • Type: double
  • Properties: Create, Nillable, Filter, Sort, Update
  • Description: The estimated length of the appointment. The duration is in minutes or hours based on the value selected in the Duration Type field.

DurationType 

  • Type: picklist

  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

  • Description: The unit of duration.

  • Default value: Hours

  • Possible values:

    • Hours
    • Minutes

EarliestStartTime 

  • Type: dateTime
  • Properties: Create, Filter, Sort, Update
  • Description: The date after which the appointment must be completed. Earliest Start Permitted and Due Date typically reflect terms in the customer’s service-level agreement.

Email 

  • Type: email
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The email address.

EngagementChannelTypeId 

  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The engagement channel type that’s associated with the service appointment. This field is available in API version 56.0 and later. This field is a relationship field.
  • Relationship Name: EngagementChannelType
  • Relationship Type: Lookup
  • Refers To: EngagementChannelType

GroupAppointmentAccessType 

  • Type: picklist

  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

  • Description: The users who can access the group service appointment.

    Available in API version 61.0 and later.

  • Default value: AddedUsers

  • Possible values:

    • AddedAndExperienceSiteAndInvitedUsers—Added, Experience Site, and Invited Users
    • AddedAndExperienceSiteUsers—Added and Experience Site Users
    • AddedUsers—Added Users

IsAnonymousBooking 

  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Description: Indicates whether a service resource was automatically assigned to the appointment (true) or not (false). This field is available in API version 49.0 and later.
  • Default value: false

LastReferencedDate 

  • Type: dateTime
  • Properties: Filter, Nillable, Sort
  • Description: The date when the service appointment was last modified. Its label in the user interface is LastModifiedDate.

LastViewedDate 

  • Type: dateTime
  • Properties: Filter, Nillable, Sort
  • Description: The date when the service appointment was last viewed.

OwnerId 

  • Type: reference
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Description: The owner of the service appointment. This is a polymorphic relationship field.
  • Relationship Name: Owner
  • Relationship Type: Lookup
  • Refers To: Group, User

ParentRecordId 

  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort
  • Description: The parent record associated with the appointment. The parent record can’t be updated after the service appointment is created. This is a polymorphic relationship field.
  • Relationship Name: ParentRecord
  • Relationship Type: Lookup
  • Refers To: Account, Case, Lead, Opportunity

ParentRecordType 

  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Description: (Read only) The type of parent record: Account.

Phone 

  • Type: phone
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The phone number.

PostalCode 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The postal code where the appointment is completed. The maximum length is 20 characters.

SchedEndTime 

  • Type: dateTime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The time at which the appointment is scheduled to end. ScheduledEnd – ScheduledStart = EstimatedDuration.

SchedStartTime 

  • Type: dateTime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The time at which the appointment is scheduled to start.

ServiceTerritoryId 

  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The service territory associated with the appointment. This is a relationship field.
  • Relationship Name: ServiceTerritory
  • Relationship Type: Lookup
  • Refers To: ServiceTerritory

State 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The state where the service appointment is completed. The maximum length is 80 characters.

Status 

  • Type: picklist

  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Sort, Update

  • Description: The status of the appointment. The picklist includes the following values, which can be customized: The values of the Status picklist appear in the org’s default language.

    • None—Default value.
    • CheckedIn—Checked In
    • Scheduled—Appointment has been assigned to a service resource.
    • Dispatched—Assigned service resource has been notified about their assignment.
    • In Progress—Work has begun.
    • Completed—Work is complete.
    • Cannot Complete—Work couldn’t be completed.
    • Canceled—Work is canceled, typically before any work began

StatusCategory 

  • Type: picklist
  • Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
  • Description: The category that each Status value falls into. The StatusCategory field’s values are identical to the default Status values except CheckedIn. Use the CheckedIn value for drop-in customers. If you create custom Status values, you must indicate which category it belongs to. For example, if you create a Customer Absent value, you can decide that it belongs in the Cannot Complete category. To learn which processes reference StatusCategory, see How are Status Categories Used?

Street 

  • Type: textarea
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The street number and name where the service appointment is completed.

Subject 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: A short phrase describing the appointment.

WorkTypeId 

  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The work type associated with the service appointment. This is a relationship field.
  • Relationship Name: WorkType
  • Relationship Type: Lookup
  • Refers To: WorkType

Associated Objects 

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

ServiceAppointmentChangeEvent (API version 48.0): Change events are available for the object.

ServiceAppointmentFeed: Feed tracking is available for the object.

ServiceAppointmentHistory: History is available for tracked fields of the object.

ServiceAppointmentOwnerSharingRule: Sharing rules are available for the object.

ServiceAppointmentShare: Sharing is available for the object.