---
schema_version: "1"
id: 57afa62f464c5ec9c4c8877ebf23926b700eef01a8ba042372eacbc4b9ccefc8
title: Schedule Recurring Home Visit Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/health_cloud_object_reference/actions_obj_schedule_recurring_home_visit.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/actions_obj_schedule_recurring_home_visit.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c39f8a5ad47342d6e1d154570d385a9acfc606c63eaaf07a5cd2506f2da948f4
description: Create a set of recurring home healthcare visits and assign service resources to them based on the specified scheduling policy.
---
# Schedule Recurring Home Visit Action

Create a set of recurring home healthcare visits and assign service resources to them based on the specified scheduling policy.

This action is available in API version 58.0 and later.

## Special Access Rules

The Schedule Recurring Home Visit action is available in Enterprise and Unlimited Editions with Health Cloud enabled with the Home Health setting.

## Supported REST HTTP Methods

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

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

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



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d314670e107">Input</th>

              <th class="featureTableHeader  " id="d314670e110">Type</th>

              <th class="featureTableHeader  " id="d314670e113">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">accountId</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">Required
                <p class="p">Person account ID of the patient to schedule the set
                  of recurring visits for.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">careResourceCount</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">The number of care resources required for the home
                visit.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">clinicalServiceRequestId</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">Required
                <p class="p">ID of the clinical service request record that's
                  associated with the recurring home visits to be
                  scheduled.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">firstCareResourceSkillsIdsList</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">ID of the clinical service request record that's
                associated with the recurring home visits to be
                scheduled.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">firstVisitEndDateTime</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">datetime</td>

              <td class="entry" headers="d314670e113" data-title="Description">Scheduled date and time for the end of the first home
                visit.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">flowInterviewId</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">The ID of the flow interview to set the service
                appointment template's Comment field to when
                manually scheduling home visits.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">recurrenceFrequencyType</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">
                <p class="p">Required</p>

                <p class="p">Days of recurring home visits. If specified, the
                  <span class="keyword parmname">selectedDays</span> property is
                  required. Valid values are:
                </p>

                <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Daily</samp></li>

                  <li class="li"><samp class="codeph nolang">Weekly</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">operatingHoursId</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">ID of the operating hours record that specifies the
                time slots that the patient wants to schedule visits
                for.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">schedulingPolicyId</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">Required
                <p class="p">ID of the home health scheduling policy to be used to
                  schedule the home visit.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">recurringDaysList</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">Comma-delimited list of days to schedule recurring
                home visits for the patient. For example, Monday,
                Thursday, Saturday.
                <p class="p">Required if the <span class="keyword parmname">frequencyType</span>
                  property is set to <samp class="codeph nolang">Weekly</samp>.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">secondCareResourceSkillsIdsList</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">A comma-delimited list of skill record IDs required
                for the second care resource of home visits.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">serviceAppointmentAddress</span></td>

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

              <td class="entry" headers="d314670e113" data-title="Description">Service appointment record that contains the home
                visit address specified by the user and is used to
                create the actual service appointment. Available in
                API version 66.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">serviceTerritoryId</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">Required
                <p class="p">ID of the service territory record that contains the
                  care resources to be assigned to the visits.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">skillsIdsList</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">List&lt;String&gt;</td>

              <td class="entry" headers="d314670e113" data-title="Description">Comma-delimited list of record IDs of all skills
                required for the home visits.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">firstVisitStartDateTime</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">datetime</td>

              <td class="entry" headers="d314670e113" data-title="Description">Required
                <p class="p">Scheduled date and time for the start of the first
                  home visit.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">usageType</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">
                <p class="p">Specifies the method of scheduling of home visits for the action. Valid value is:
                  Manual.</p>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">visitsRequired</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">integer</td>

              <td class="entry" headers="d314670e113" data-title="Description">Required
                <p class="p">Number of recurring home visits to schedule.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">visitSourceId</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">string</td>

              <td class="entry" headers="d314670e113" data-title="Description">ID of the source from where visits are created.</td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e107" data-title="Input"><span class="keyword parmname">workTypeIdsList</span></td>

              <td class="entry" headers="d314670e110" data-title="Type">
                List &lt;String&gt;</td>

              <td class="entry" headers="d314670e113" data-title="Description">A
                comma-delimited list of work type record IDs
                associated with the clinical service request of the
                home visit.</td>

            </tr>

          </tbody>

        </table>

## Outputs

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



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d314670e434">Output</th>

              <th class="featureTableHeader  " id="d314670e437">Type</th>

              <th class="featureTableHeader  " id="d314670e440">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d314670e434" data-title="Output"><span class="keyword parmname">careServiceVisitPlanId</span></td>

              <td class="entry" headers="d314670e437" data-title="Type">string</td>

              <td class="entry" headers="d314670e440" data-title="Description">
                <p class="p">Required</p>

                <p class="p">ID of the care service visit plan record that’s
                  associated with the service request.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d314670e434" data-title="Output"><span class="keyword parmname">serviceAppointmentId</span></td>

              <td class="entry" headers="d314670e437" data-title="Type">string</td>

              <td class="entry" headers="d314670e440" data-title="Description">The ID of the service appointment that was used as a
                template to manually schedule home visits.</td>

            </tr>

          </tbody>

        </table>

## Example

**POST**

This sample request is for the Schedule Recurring Home Visit action.

{
  "inputs": \[
    {
      "schedulingPolicyId":"a0cSG0000002RlxxAE",
      "firstVisitStartDateTime":"2024-07-14T07:00:00.000Z",
      "firstVisitStartEndTime" : "2024-07-15T07:00:00.000Z",
      "visitsRequired" : 2,
      "frequencyType" : "DAILY",
      "selectedDays" : "Monday, Thursday",
      "clinicalServiceRequestId": "0jySG0000000VFxxAM",
      "skillsIdList": \["0C5xx0000004C92, 0C5xx0000004C93"\],
      "operatingHoursId": "0OHxx0000004CKKGA2",
      "accountId": "001SG00000LNllxxAT",
      "serviceTerritoryId": "0HxxG00000047xN0AQ",
      "firstCareResourceSkillsIdsList": \[0D2xx0000008DC91, 0D2xx0000008DC91\],
      "secondCareResourceSkillsIdsList": \[0P5xx0000004F16, 0P5xx0000004F16\],
      "careResourceCount" : 1,
      "workTypeIdsList": \["08qSG0000002b1xxAA"\],
      "visitSourceId": \["0Q0SG000000821R0xx"\]
    }
  \]
}

This sample response is for the Schedule Recurring Home Visit action.

\[ {
  "actionName" : "scheduleRecurringHomeVisit",
  "errors" : null,
  "isSuccess" : true,
  "outputValues" : {
      "careServiceVisitPlanId": "0qExx00000000WHEAY"
      "serviceAppointmentId": "0bZxx00000000yKEDB"
    },
  "version" : 1
} \]