ServiceAppointment

Represents an appointment to complete work for a customer in Field Service, Lightning Scheduler,Intelligent Appointment Management, and Virtual Care.

Introduced in API version 38.0.

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

  • Field Service must be enabled.
  • Type: reference

  • Properties: Filter, Group, Nillable, Sort

  • Description:

    (Read only) The account associated with the appointment. If the parent record is a work order or work order line item, this field’s value is inherited from the parent. Otherwise, it remains blank.

    This is a relationship field.

  • Relationship name: Account

  • Relationship type: relationship

  • Refers to: Account

  • Type: double
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The number of minutes that it took the resource to complete the appointment after arriving at the address. 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.
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The actual date and time the appointment ended.
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The actual date and time the appointment started.
  • Type: address
  • Properties: Filter
  • Description: The address where the appointment is taking place. The address is inherited from the parent record if the parent record is a work order or work order line item.
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 65.0

  • Relationship name: AgxFlowDefinition

  • Relationship type: relationship

  • Refers to: FlowOrchestration

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 58.0

  • Relationship name: AppointmentCategory

  • Relationship type: relationship

  • Refers to: AppointmentCategory

  • Type: double
  • Properties: Create, Filter, Nillable, Sort, Update
  • Introduced: API version 65.0
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 55.0

  • Relationship name: AppointmentInvitation

  • Relationship type: relationship

  • Refers to: AppointmentInvitation

  • Type: picklist
  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
  • Introduced: API version 60.0
  • Type: string
  • Properties: Autonumber, Defaulted on create, Filter, idLookup, Sort
  • Description: An auto-assigned number that identifies the appointment.
  • Type: textarea
  • Properties: Create, Nillable, Update
  • Introduced: API version 52.0
  • 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 may choose to share the Arrival Window Start and End with the customer, but keep the Scheduled Start and End internal-only.
  • 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 may choose to share the Arrival Window Start and End with the customer, but keep the Scheduled Start and End internal-only.
  • Type: int
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 60.0
  • Type: int

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

  • Introduced: API version 60.0

  • Default value: 0

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 53.0

  • Description:

    Reference to the bundle policy associated with this service appointment.

    This is a relationship field.

  • Relationship name: BundlePolicy

  • Relationship type: relationship

  • Refers to: ApptBundlePolicy

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 44.0
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Introduced: API version 60.0
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The city where the appointment is completed. Maximum length is 40 characters.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 44.0
  • 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: relationship

  • Refers to: Contact

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The country where the work order is completed. Maximum length is 80 characters.
  • Type: string
  • Properties: Create, Nillable, Update
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 68.0

  • Relationship name: CustomerReferenceRecord

  • Relationship type: polymorphic

  • Refers to: FtestMain, Lead

  • Type: textarea
  • Properties: Create, Nillable, Update
  • Description: The description of the appointment.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 68.0
  • Type: textarea
  • Properties: Create, Nillable, Update
  • Introduced: API version 68.0
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 68.0
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 68.0
  • 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.
  • Type: double
  • Properties: Create, Filter, Nillable, Sort, Update
  • Introduced: API version 38.0
  • Description: The estimated length of the appointment. If the parent record is work order or work order line item, the appointment inherits its parent’s duration, but it can be manually updated. The duration is in minutes or hours based on the value selected in the Duration Type field.
  • Type: double
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 38.0
  • Type: picklist
  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 38.0
  • Description: The unit of the Duration: Minutes or Hours.
  • 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.
  • Type: email
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 44.0
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 56.0

  • Relationship name: EngagementChannelType

  • Relationship type: relationship

  • Refers to: EngagementChannelType

  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Description: The level of accuracy of a location’s geographical coordinates compared with its physical address. Usually provided by a geocoding service based on the address’s latitude and longitude coordinates. This field is available in the API only.
  • Type: picklist
  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 61.0
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 65.0
  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Introduced: API version 49.0
  • Description: Indicates whether a service resource was automatically assigned to the appointment. The default value is false.
  • Default value: false
  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Introduced: API version 53.0
  • Description: Indicates if this service appointment is a bundle service appointment. The default value is false.
  • Default value: false
  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Introduced: API version 53.0
  • Description: Indicates if this service appointment is a bundle member service appointment. The default value is false.
  • Default value: false
  • Type: boolean

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

  • Introduced: API version 65.0

  • Default value: false

  • Type: boolean

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

  • Introduced: API version 65.0

  • Default value: false

  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Introduced: API version 53.0
  • Description: Indicates if this bundle was created manually. The default value is false.
  • Default value: false
  • Type: boolean

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

  • Introduced: API version 65.0

  • Default value: false

  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Introduced: API version 52.0
  • Description: Any type of work that can be done remotely.
  • Default value: false
  • Type: boolean

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

  • Introduced: API version 65.0

  • Default value: false

  • Type: double

  • Properties: Create, Filter, Nillable, Sort, Update

  • Description:

    Used with Longitude to specify the precise geolocation of the address where the service appointments is completed. Acceptable values are numbers between –90 and 90 with up to 15 decimal places.

    To integrate data from an external data source for latitude, map your data to the ServiceAppointment.Latitude and not the ServiceAppointment.FSL__InternalSLRGeolocation__Latitude__s field.

    This field is available in the API only.

  • Type: double

  • Properties: Create, Filter, Nillable, Sort, Update

  • Description:

    Used with Latitude to specify the precise geolocation of the address where the service appointment is completed. Acceptable values are numbers between –180 and 180 with up to 15 decimal places.

    To integrate data from an external data source for longitude, map your data to the ServiceAppointment.Longitude and not the ServiceAppointment.FSL__InternalSLRGeolocation__Longitude__s field.

    This field is available in the API only.

  • Type: boolean

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

  • Introduced: API version 65.0

  • Default value: false

  • Type: picklist
  • Properties: Filter, Group, Nillable, Restricted picklist, Sort
  • Introduced: API version 66.0
  • 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: polymorphic

  • Refers to: Account, Asset, CareProgramEnrollee, Case, ClinicalServiceRequest, Lead, Opportunity, ProductServiceCampaignItem, ServiceAppointmentGroup, WorkOrder, WorkOrderLineItem

  • Type: picklist
  • Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
  • Description: (Read only) The Status Category of the parent record. If the parent record is a work order or work order line item, this field is populated; otherwise, it remains blank.
  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Description: (Read only) The type of parent record: Account, Asset, Lead, Opportunity, Work Order, or Work Order Line Item.
  • Type: phone
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 44.0
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The postal code where the work order is completed. Maximum length is 20 characters.
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 63.0

  • Relationship name: ReceiptOrder

  • Relationship type: relationship

  • Refers to: Order

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 53.0

  • Description:

    The bundle that this service appointment is a member of.

    This is a relationship field.

  • Relationship name: RelatedBundle

  • Relationship type: relationship

  • Refers to: ServiceAppointment

  • Type: reference

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 66.0

  • Relationship name: RelatedObject

  • Relationship type: polymorphic

  • Refers to: Interaction, Visit

  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The time at which the appointment is scheduled to end. If you are using the Field Service managed package with the scheduling optimizer, this field is populated once the appointment is assigned to a resource. Scheduled End – Scheduled Start = Estimated Duration.
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The time at which the appointment is scheduled to start. If you are using the Field Service managed package with the scheduling optimizer, this field is populated once the appointment is assigned to a resource.
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 65.0
  • Type: int
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 68.0
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 57.0
  • Description: The template ID which sets the template for each service document for the Document Builder feature.
  • Type: textarea
  • Properties: Create, Nillable, Update
  • Introduced: API version 39.0
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 38.0

  • Description:

    The service territory associated with the appointment. If the parent record is a work order or work order line item, the appointment inherits its parent’s service territory.

    This is a relationship field.

  • Relationship name: ServiceTerritory

  • Relationship type: relationship

  • Refers to: ServiceTerritory

  • Type: boolean

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

  • Introduced: API version 65.0

  • Default value: false

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The state where the service appointment is completed. Maximum length is 80 characters.
  • Type: string
  • Properties: Create, Nillable, Update
  • 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:

    While you can set the status to null via the API, setting the status to null returns an error. To prevent errors, use one of the picklist values.

  • Possible values:

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

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

  • Introduced: API version 38.0

  • Description:

    The category that each Status value falls into. The Status Category field’s values are identical to the default Status values.

    If you create custom Status values, you must indicate which category it belongs to. For example, if you create a Customer Absent value, you may decide that it belongs in the Cannot Complete category. To learn which processes reference StatusCategory, see How are Status Categories Used?

  • Type: textarea
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The street number and name where the service appointment is completed.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: A short phrase describing the appointment.
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 64.0
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 62.0
  • Description: The last transaction ID of the scheduling and optimization request that updated this object. The transaction ID is automatically generated and populated by the Enhanced Scheduling and Optimization engine.
  • Type: int
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 64.0
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 40.0

  • Description:

    The work type associated with the service appointment. The work type is inherited from the appointment’s parent record if the parent is a work order or work order line item. If Lightning Scheduler is also in use, this field is editable. However, users see an error if they update it to list a different work type than the parent record’s work type.

    This is a relationship field.

  • Relationship name: WorkType

  • Relationship type: relationship

  • Refers to: WorkType

Service appointments always have a parent record, which can be a work order, work order line item, opportunity, account, or asset. The type of parent record tells you about the nature of the service appointment:

  • Service appointments on work orders and work order line items offer a more detailed view of the work being performed. While work orders and work order line items let you enter general information about a task, service appointments are where you add the details about scheduling and ownership.
  • Service appointments on assets represent work being performed on the asset.
  • Service appointments on accounts represent work being performed for the account.
  • Service appointments on opportunities represent work that is related to the opportunity.
  • Service appointments on leads represent work that is related to lead—for example, a site visit to pursue a promising lead.

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.