---
schema_version: "1"
id: b3baf8cb2e100f8cfb0ad108f02fe46e854e6232c44648a84d504e6acbf00e93
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/uc6-create-single-resource-appointment.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-create-single-resource-appointment.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ac2be2960b96f897eaa8dcd8ad84e4128840862666032274c11ae4e3522e11d9
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# Create Service Appointments

The last step in the concurrent scheduling application is to show the service appointment details for the user to review and create the appointment. A service appointment represents an appointment booked through Salesforce Scheduler.

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/concurrent-reviewAppointmentScreen.png)

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": "0HhB00000001P0PKAU",
      "parentRecordId" : "001B0000018vs9fIAA",
      "workTypeId" : "08qB00000002ocgIAA",
      "schedStartTime" : "2021-10-29T16:00:00.000+0000",
      "schedEndTime": "2021-10-29T17:00:00.000+0000",
      "additionalInformation" : "Concurrent Booking",
      "appointmentType" : "Training Purpose",
      "extendedFields" : [ {
        "name": "status",
        "value": "Scheduled"
     } ]
   },
   "assignedResources": [
      {
      "serviceResourceId": "0HnB00000001SJxKAM",
      "isRequiredResource" : "true"
      }
   ]
}
```

**Sample Response**

The API returns the service appointment ID and the assigned service resources.

```nolang
{
  "result" : {
    "assignedResourceIds" : [ "03rB0000000cBZ6IAM" ],
    "serviceAppointmentId" : "08pB0000000aKjMIAU"
  }
}
```

**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": "0HhB00000001P0PKAU",
      "schedStartTime" : "2021-10-29T16:00:00.000+0000",
      "schedEndTime": "2021-10-29T17:00:00.000+0000",
      "workTypeId" : "08qB00000002ocgIAA",
      "additionalInformation" : "Concurrent Booking",
      "appointmentType" : "Training Purpose",
      "extendedFields" : [ {
        "name": "status",
        "value": "Scheduled"
     } ]
   },
   "assignedResources": [
      {
      "serviceResourceId": "0HnB00000001SJxKAM",
      "isRequiredResource" : "true"
      }
   ],
   "lead": {
      "email" : "name@company.com",
      "firstName" : "FName",
      "lastName" : "LName",
      "company" : "CompanyName"
   }
}
```

**Sample Response**

The API returns the service appointment ID and the assigned service resources.

```nolang
{
  "result" : {
    "assignedResourceIds" : [ "03rB0000000cBAFIA2" ],
    "parentRecordId" : "00QB000000ASSt5MAH",
    "serviceAppointmentId" : "08pB0000000aKIgIAM"
  }
}
```

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)

