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 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"
      }
    }
  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.

    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.

    Important

The request modifies the service appointment with a new service resource.