---
schema_version: "1"
id: f96cadc2d4060195890a0946f12aaa058c097ee0421095dbf5e7f8d0d4669019
title: Update Service Appointments
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/salesforce-scheduler-dev-guide/guides/salesforce-scheduler/build-custom-apps/usecase11/uc11-modify-service-appointment.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-modify-service-appointment.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b268af1ec956b19f1bd084a29fbf290a78f9f785da23ce437ce990b0b7f2280b
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# 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

1.  Create a page to review the appointment details and update the service appointment.

2.  To modify a service appointment, link the Next button to a `PATCH` request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API.

    **Resource URI**

    ```nolang
    https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/connect/scheduling/service-appointments
    ```

    Where `YOUR_INSTANCE` is a variable.

    **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`.

    ```nolang
    {
      "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.

    ```nolang
    {
      "result": {
        "assignedResourceIds": [
          "03rS70000000406IAA"
        ],
        "serviceAppointmentId": "08pS70000000CxOIAU"
      }
    }
    ```

3.  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.

    **important:** Ensure that the total number of dummy appointments doesn't exceed the total number of available resources for a time slot. Otherwise, when modifying appointments, one requires to update the time slots based on availability. To avoid these scenarios, configure the Concurrent Scheduling Max appointment slots to around 60–80% of total resource capacity.


The request modifies the service appointment with a new service resource.

