---
schema_version: "1"
id: 4066477718f974e77daa50fc8ef052bb337b0e4f5db8625bf1b39ec05d838cde
title: Create 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/uc3-create-multi-resource-appointment.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-create-multi-resource-appointment.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b2a1e01559ba53412add0dff96bb090f60c41225ba686d27a77594f3fa669a24
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# Create Service Appointments

A service appointment represents an appointment booked through Salesforce Scheduler. Make a POST request on the `service-appointments` Connect API to create the appointment.

1.  Create a page where the user can review the appointment details and create the appointment.

    Here’s how a Review Service Appointment page can look.

    ![A representation of the Review Service Appointment screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_review_multi_resource_appointment.png)

2.  Link the Next button to a POST request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API to create the service appointment.

    **Resource URI**

    ```nolang
    https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-appointments
    ```

    **For an Existing User (Account)**

    **Sample Request**

    Pass the account ID as `parentRecordId` in the input request body.

    Set `status` to `Scheduled` to indicate that the appointment is scheduled.

    ```nolang
    {
       "serviceAppointment": {
          "serviceTerritoryId": "0HhS700000001DYKAY",
          "parentRecordId" : "001S7000001pFlJIAU",
          "schedStartTime" : "2023-11-30T17:00:00.000+0000",
          "schedEndTime": "2023-11-30T18:00:00.000+0000",
          "street": "121 Spear Street",
          "city": "Charlotte",
          "state": "VT",
          "postalCode": "05445",
          "country": "United States",
          "engagementChannelTypeId" : "0eFS70000004CG5MAM",
          "extendedFields" : [{
            "name": "status",
            "value": "Scheduled"
          }]
       },
       "assignedResources": [
          {
            "serviceResourceId": "0HnS700000002jAKAQ",
            "isRequiredResource": true,
            "isPrimaryResource": true,
            "extendedFields" : []
          }, {
            "serviceResourceId": "0HnS700000002jKKAQ",
            "isRequiredResource": true,
            "isPrimaryResource": false,
            "extendedFields" : []
          }
       ]
    }
    ```

    **Sample Response**

    The API returns the service appointment ID and the assigned service resources.

    ```nolang
    {
      "result": {
        "assignedResourceIds": [
          "03rS700000000ogIAA",
          "03rS700000000ohIAA"
        ],
        "serviceAppointmentId": "08pS700000001GIIAY"
      }
    }
    ```

    **For a Guest User (Lead)**

    **Sample Request**

    Pass the required lead details in the input request body.

    Set `status` to `Scheduled` to indicate that the appointment is scheduled.

    ```nolang
    {
       "serviceAppointment": {
          "serviceTerritoryId": "0HhS700000001DYKAY",
          "schedStartTime" : "2023-11-30T17:00:00.000+0000",
          "schedEndTime": "2023-11-30T18:00:00.000+0000",
          "street": "121 Spear Street",
          "city": "Charlotte",
          "state": "VT",
          "postalCode": "05445",
          "country": "United States",
          "engagementChannelTypeId" : "0eFS70000004CG5MAM",
          "extendedFields" : [{
            "name": "status",
            "value": "Scheduled"
          }]
       },
       "assignedResources": [
          {
            "serviceResourceId": "0HnS700000002jAKAQ",
            "isRequiredResource": true,
            "isPrimaryResource": true,
            "extendedFields" : []
          }, {
            "serviceResourceId": "0HnS700000002jKKAQ",
            "isRequiredResource": true,
            "isPrimaryResource": false,
            "extendedFields" : []
          }
       ] ,
        "lead": {
          "firstName": "Philip",
          "lastName": "Taylor",
          "phone": "012-345-6789",
          "email": "pmtaylor@company.com",
          "company": "Philip&Taylor Company",
          "extendedFields" : []
       }
    }
    ```

    **Sample Response**

    The API returns the service appointment ID and the assigned service resources.

    ```nolang
    {
      "result": {
        "assignedResourceIds": [
          "03rS700000000oqIAA",
          "03rS700000000orIAA"
        ],
        "parentRecordId": "00QS7000000sfcxMAA",
        "serviceAppointmentId": "08pS700000001GSIAY"
      }
    }
    ```


Create a page to show confirmation when the service appointment is created successfully.

Here’s how a sample confirmation page can look.

![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png)

