Get Service Appointment Details

A service appointment represents an appointment booked through Salesforce Scheduler.

  1. Create a page to show the details of a service appointment record that the user selects.

  2. Make a GET request on the ServiceAppointment object.

    Sample Request

    Here’s a sample GET request to retrieve the service appointment details.

    1https://yourInstance.salesforce.com/services/data/v68.0/sobjects/ServiceAppointment/08pS7000000019BIAQ

    Sample Response

    The method returns the service appointment details.

    1{
    2  "attributes": {
    3    "type": "ServiceAppointment",
    4    "url": "/services/data/v57.0/sobjects/ServiceAppointment/08pS7000000019BIAQ"
    5  },
    6  "Id": "08pS7000000019BIAQ",
    7  "OwnerId": "005S7000000Ipe4IAC",
    8  "IsDeleted": false,
    9  "AppointmentNumber": "SA-0004",
    10  "CreatedDate": "2023-03-13T17:31:23.000+0000",
    11  "CreatedById": "005S7000000Ipe4IAC",
    12  "LastModifiedDate": "2023-03-13T17:31:23.000+0000",
    13  "LastModifiedById": "005S7000000Ipe4IAC",
    14  "SystemModstamp": "2023-03-13T17:31:28.000+0000",
    15  "LastViewedDate": "2023-03-13T17:31:23.000+0000",
    16  "LastReferencedDate": "2023-03-13T17:31:23.000+0000",
    17  "ParentRecordId": "001S7000001pFlJIAU",
    18  "ParentRecordType": "Account",
    19  "AccountId": "001S7000001pFlJIAU",
    20  "WorkTypeId": "08qS70000004DQsIAM",
    21  "ContactId": null,
    22  "Street": "121 Spear Street",
    23  "City": "Charlotte",
    24  "State": "VT",
    25  "PostalCode": "05445",
    26  "Country": "United States",
    27  "Latitude": 44.356843,
    28  "Longitude": -73.194897,
    29  "GeocodeAccuracy": "Block",
    30  "Address": {
    31    "city": "Charlotte",
    32    "country": "United States",
    33    "geocodeAccuracy": "Block",
    34    "latitude": 44.356843,
    35    "longitude": -73.194897,
    36    "postalCode": "05445",
    37    "state": "VT",
    38    "street": "121 Spear Street"
    39  },
    40  "Description": null,
    41  "EarliestStartTime": "2023-03-13T17:31:23.000+0000",
    42  "DueDate": "2023-03-20T17:31:23.000+0000",
    43  "Duration": null,
    44  "ArrivalWindowStartTime": "2023-03-15T18:00:00.000+0000",
    45  "ArrivalWindowEndTime": "2023-03-15T19:00:00.000+0000",
    46  "Status": "Scheduled",
    47  "SchedStartTime": "2023-03-15T18:00:00.000+0000",
    48  "SchedEndTime": "2023-03-15T19:00:00.000+0000",
    49  "ActualStartTime": null,
    50  "ActualEndTime": null,
    51  "ActualDuration": null,
    52  "DurationType": "Hours",
    53  "DurationInMinutes": null,
    54  "ServiceTerritoryId": "0HhS700000001DYKAY",
    55  "Subject": null,
    56  "ParentRecordStatusCategory": null,
    57  "StatusCategory": "Scheduled",
    58  "ServiceNote": null,
    59  "AppointmentType": null,
    60  "Email": null,
    61  "Phone": null,
    62  "CancellationReason": null,
    63  "AdditionalInformation": null,
    64  "Comments": null,
    65  "IsAnonymousBooking": false,
    66  "IsOffsiteAppointment": false,
    67  "ApptBookingInfoUrl": null,
    68  "AppointmentInvitationId": null,
    69  "EngagementChannelTypeId": "0eFS70000004CG5MAM"
    70}
  3. Parse the JSON response, and show the service appointments details on the page that you created.

On the next page, you can let users to modify an engagement channel type, a service resource, or a time slot depending on what the user chooses to change.