Book Service Appointments
A service appointment is an appointment booked through Salesforce Scheduler. Use the service-appointments API to create an appointment.
-
On your website, create a page with a Create button on which you can show the appointment details for the user to review and book the appointment.
-
Link the Create button to a POST request on the
service-appointmentsConnect API.Resource URI
Where
YOUR_INSTANCEis a variable.For an Account User
Sample Request
This sample calls the
service-appointmentsAPI to create the appointment record for an account user.The
parentRecordIdfield is required. Pass the account ID asparentRecordIdin the input request body.Sample Response
The API returns the service appointment ID and the assigned service resources.
For a Guest User
Sample Request
This sample calls the
service-appointmentsAPI to create the appointment record for a guest user.The
leadfield is required. Pass the guest user details, including the first name, last name, email address, and phone number asleadin the input request body.Sample Response
The API returns the service appointment ID and the assigned service resources.
-
If the service appointment creation is successful, then show the user a confirmation message.
Here’s a sample confirmation page.
