---
schema_version: "1"
id: f502c6330811da969b948f971c721fbcc6068ddbbb05f4bcab49178cf8db0be0
title: Create Template of Service Appointment Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/health_cloud_object_reference/actions_obj_create_template_appointment_service.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/actions_obj_create_template_appointment_service.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 699504bab68e9d4365688edb5e04671e99d96a5ffaaa552b980079cef423ce57
description: Create a service appointment record of Cancelled status that's used as a template for creating the actual service appointment record while scheduling home visits manually.
---
# Create Template of Service Appointment Action

Create a service appointment record of Cancelled status that's used as a template for creating the actual service appointment record while scheduling home visits manually.

This action is available in API version 66.0 and later for users with the Home Health enabled.

## Supported REST HTTP Methods

**URI**: /services/data/vXX.X/actions/standard/createTemplateOfServiceAppt

Where XX.X is the latest API version.

**Formats**: JSON, XML

**HTTP Methods**: POST

**Authentication**: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

## Inputs

| Input | Type | Description |
| --- | --- | --- |
| accountId | String | Required. The person account ID of the patient to schedule the visits for. |
| clinicalServiceRequestId | String | Required. The ID of the clinical service request record that's associated with the home visits to be scheduled. |
| firstVisitEndDateTime | DateTime | The date and time when the first recurring home visit ends. |
| firstVisitStartDateTime | DateTime | Required. The scheduled date and time for the start of the first recurring home visit. |
| flowInterviewId | String | Required. The ID of the flow interview to set the service appointment template's Comment field to when manually scheduling home visits. |
| operatingHoursId | String | The ID of the operating hours record that specifies the time slots to schedule the home visit for. |
| recurrenceFrequencyType | Picklist | Required. Specifies the type of recurring home visits. If Weekly is specified, Recurring Days List is required. Valid values are Daily and Weekly. |
| recurringDaysList | String | The comma-delimited list of days to schedule recurring home visits for the patient. For example, Monday, Thursday, and Saturday. |
| schedulingPolicyId | String | Required. The ID of the home health scheduling policy to be used to identify care resources available for the home visits. |
| serviceAppointmentAddress | SObject | Required. The service appointment record that contains the home visit address specified by the user and is used to create the actual service appointment. |
| serviceTerritoryId | String | Required. The ID of the service territory record that contains the care resources to be assigned to the visits. |
| skillsIdsList | String | The comma-delimited list of record IDs of all skills required for the home visits. |
| visitsRequired | Integer | Required. The number of recurring home visits to be scheduled. |
| workTypeId | ID | The ID of the work type record that's associated with the clinical service request of the home visit. |