---
schema_version: "1"
id: 898065216b240a2a998293943736ceb4eb28f033dcb820d902747197abbd5e7a
title: ConnectApi.UpdateServiceAppointmentInput
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_input_update_service_appointment.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_update_service_appointment.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7c0bc23852e8e278c733b17974adb029a81151dc444475e486fa9115c2d8e212
description: Contains information to update a service appointment.
---
# ConnectApi.UpdateServiceAppointmentInput

Contains information to update a service appointment.

<table class="featureTable sort_table" summary="">




          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d745506e36">Property</th>

              <th class="featureTableHeader vertical-align-top " id="d745506e39">Type</th>

              <th class="featureTableHeader vertical-align-top " id="d745506e42">Description</th>

              <th class="featureTableHeader vertical-align-top " id="d745506e45">Required or Optional</th>

              <th class="featureTableHeader vertical-align-top " id="d745506e48">Available Version</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d745506e36 d745506e48" data-title="Property"><samp class="codeph apex_code">serviceAppointmentId</samp></td>

              <td class="entry" headers="d745506e39" data-title="Type">String</td>

              <td class="entry" headers="d745506e42" data-title="Description">The ID of the service appointment to be modified.</td>

              <td class="entry" headers="d745506e45" data-title="Required or Optional">Required</td>

              <td class="entry" headers="d745506e36 d745506e48" data-title="Property">53.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d745506e36 d745506e48" data-title="Property"><samp class="codeph apex_code">assignedResources</samp></td>

              <td class="entry" headers="d745506e39" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;<samp class="codeph apex_code"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_assigned_resource.htm" title="Contains information about assigned resources for a service appointment.">ConnectApi.AssignedResourcesInput</a></samp>&gt;
              </td>

              <td class="entry" headers="d745506e42" data-title="Description">
                <span class="ph" id="assignedResources2"><a name="assignedResources2"><!-- --></a>Represents the service resources who are assigned
                  to a service appointment.</span>
                <div class="p">When updating an appointment, pass the complete list of required resources. If
                  you don’t pass a resource who is already assigned to the appointment, the API
                  deletes that assigned resource. For example, suppose that an existing service
                  appointment has assigned resources: A and B and you pass B and C in assigned
                  resources in the PATCH request. The API checks the resource availability of B and
                  C for existing work type and service territory, and if both are available, the
                  service appointment gets updated with:<ul class="ul bulletList">
                    <li class="li">Resource A—Deleted</li>

                    <li class="li">ResourceB—Updated</li>

                    <li class="li">ResourceC—Created</li>

                  </ul>
                </div>
                <p class="p">However, if you don’t pass any of the assigned resources, the API
                  assumes there’s no change.</p>
                When creating an appointment, use <samp class="codeph apex_code">extendedFields</samp> to add values to any of the fields, including custom fields, in <samp class="codeph apex_code">assignedResources</samp> as long as you have edit access to those fields.
              </td>

              <td class="entry" headers="d745506e45" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d745506e36 d745506e48" data-title="Property">53.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d745506e36 d745506e48" data-title="Property"><samp class="codeph apex_code">lead</samp></td>

              <td class="entry" headers="d745506e39" data-title="Type"><samp class="codeph apex_code"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_lead.htm" title="Contains information about a lead or guest user.">ConnectApi.LeadInput</a></samp></td>

              <td class="entry" headers="d745506e42" data-title="Description">
                <span class="ph" id="Lead2"><a name="Lead2"><!-- --></a>Represents a prospect or lead.</span> Required to create a service appointment for unauthenticated guest users.
              </td>

              <td class="entry" headers="d745506e45" data-title="Required or Optional">Required if <samp class="codeph apex_code">serviceAppointment</samp> isn’t
                provided.</td>

              <td class="entry" headers="d745506e36 d745506e48" data-title="Property">53.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d745506e36 d745506e48" data-title="Property"><samp class="codeph apex_code">schedulingPolicyId</samp></td>

              <td class="entry" headers="d745506e39" data-title="Type">String</td>

              <td class="entry" headers="d745506e42" data-title="Description">The ID of the <samp class="codeph apex_code">AppointmentSchedulingPolicy</samp> object. If no scheduling policy is passed in the request body, the default configurations
                are used. The only scheduling policy configuration that is used in determining time
                slots is the enforcement of account visiting hours.</td>

              <td class="entry" headers="d745506e45" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d745506e36 d745506e48" data-title="Property">53.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d745506e36 d745506e48" data-title="Property"><samp class="codeph apex_code">serviceAppointment</samp></td>

              <td class="entry" headers="d745506e39" data-title="Type"><samp class="codeph apex_code"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_service_appointment.htm" title="Contains information about the service appointment.">ConnectApi.ServiceAppointmentInput</a></samp></td>

              <td class="entry" headers="d745506e42" data-title="Description">
                <span class="ph" id="serviceAppointment2"><a name="serviceAppointment2"><!-- --></a>Represents the service appointment details to book
                  an appointment.</span> When updating an appointment, pass only the fields that must
                be updated. When creating an appointment, use <samp class="codeph apex_code">extendedFields</samp> to add values to any of the fields, including custom fields, in <samp class="codeph apex_code">assignedResources</samp> as long as you have edit access to those fields.
              </td>

              <td class="entry" headers="d745506e45" data-title="Required or Optional">Required if <samp class="codeph apex_code">lead</samp> isn’t
                provided.</td>

              <td class="entry" headers="d745506e36 d745506e48" data-title="Property">53.0</td>

            </tr>

          </tbody>

        </table>