Update Service Appointments
Show the details of service appointments—appointments booked
through Salesforce Scheduler—on a page of your app so that business managers or
administrators can review and update appointments.
To modify appointments, the branch manager or administrator who’s reassigning service
appointments need these user permissions.
- Read, Create, and Edit on service appointments
- Read on accounts, contacts, operating hours, service resources, service territories, work types, and work type groups
- Create a page to review the appointment details and update the service appointment.
-
To modify a service appointment, link the Next button to a PATCH request on the service-appointments Connect API.
- Resource URI
-
https://yourInstance.salesforce.com/services/data/v64.0/connect/scheduling/service-appointments
- Sample Request
-
Pass the appointment ID as serviceAppointmentId and the resource ID of the actual resource as serviceResourceId in the request. To indicate that the appointment is scheduled, set status to Scheduled.
{ "schedulingPolicyId": "0VrS70000004CEhKAM", "serviceAppointmentId": "08pS70000000CxOIAU", "serviceAppointment": { "serviceTerritoryId": "0HhS70000004F9zKAE", "extendedFields": [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0HnS700000007xwKAA", "isRequiredResource": "true" } ] }
- Sample Response
-
The API returns the service appointment ID and the assigned service resources.
{ "result": { "assignedResourceIds": [ "03rS70000000406IAA" ], "serviceAppointmentId": "08pS70000000CxOIAU" } }
-
For each service appointment ID that you want to modify, run the PATCH request.
Assign active resources to all customers by modifying the appointments booked against the dummy resource. Usually, Business Location Manager or the person who assigns actual resources performs the modification.
The request modifies the service appointment with a new service resource.