---
schema_version: "1"
id: 55488358f04ae6dd708fa57af6a084b651714c426d0819bc2dd2866d859997a0
title: Schedule Group Visits 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_group_visits.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/actions_obj_schedule_group_visits.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 28c4b48449ee0fca30f1bdbaf94bf1b08dfd5cba28af89622443b9de1bed12f8
description: Create visiting records for patient home visits by bundling them into a group and scheduling either a single start-of-care visit or a series of recurring visits associated with the bundled records.
---
# Schedule Group Visits Action

Create visiting records for patient home visits by bundling them into a group and scheduling either a single start-of-care visit or a series of recurring visits associated with the bundled records.

This action is available in API version 60.0 and later.

## Special Access Rules

The Schedule Group Visits 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/scheduleGroupVisits

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="d311663e107">Input</th>

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

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

            </tr>

          </thead>

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

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

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

            </tr>

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

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

              <td class="entry" headers="d311663e113" data-title="Description">Required.<p class="p">ID of the home health appointment bundle policy to be used to create the patient visit
                  records.</p>
              </td>

            </tr>

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

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

              <td class="entry" headers="d311663e113" data-title="Description">Required.<p class="p">ID of the work type that represents the care service that the visits are being
                  scheduled for.</p>
              </td>

            </tr>

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

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

              <td class="entry" headers="d311663e113" 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="d311663e107" data-title="Input"><span class="keyword parmname">firstVisitStartDateTime</span></td>

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

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

            </tr>

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

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

              <td class="entry" headers="d311663e113" data-title="Description">Date and time when the first group visit ends.</td>

            </tr>

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

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

              <td class="entry" headers="d311663e113" data-title="Description">ID of the operating hours record that specifies the time slots to schedule the group
                visit for.</td>

            </tr>

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

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

              <td class="entry" headers="d311663e113" data-title="Description">A comma-delimited list of record IDs of all skills required for the group visits.</td>

            </tr>

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

              <td class="entry" headers="d311663e110" data-title="Type">boolean</td>

              <td class="entry" headers="d311663e113" data-title="Description">Indicates whether recurring visits are scheduled. If false, then a single
                start-of-care group visit is scheduled.</td>

            </tr>

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

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

              <td class="entry" headers="d311663e113" data-title="Description">Required.<p class="p">Specifies the type of recurring group 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="d311663e107" data-title="Input"><span class="keyword parmname">recurringDaysList</span></td>

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

              <td class="entry" headers="d311663e113" data-title="Description">Comma-delimited list of days to schedule recurring group visits for patients. For
                example, Monday, Thursday, Saturday. If<span class="keyword parmname"> recurrenceFrequencyType</span> is
                set to Weekly, <span class="keyword parmname">recurringDaysList</span> is required.</td>

            </tr>

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

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

              <td class="entry" headers="d311663e113" data-title="Description">The number of recurring group visits to be scheduled.</td>

            </tr>

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

              <td class="entry" headers="d311663e110" data-title="Type">Apex-defined(Input example of apex
                type:<samp class="codeph nolang">{“street":"123 Main St","city":"Cityville","state":"CA","zip":"12345"})</samp>
              </td>

              <td class="entry" headers="d311663e113" data-title="Description">An Apex GroupVisitAddress record that specifies the address where the group visit for
                the selected patients is scheduled.</td>

            </tr>

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

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

              <td class="entry" headers="d311663e113" data-title="Description">Comma-delimited list of record IDs of all clinical service requests of the selected
                patients in the group visit.</td>

            </tr>

          </tbody>

        </table>

## Outputs

None.

## Example

**POST**

This sample request is for the Schedule Group Visits action.

{ 
  "inputs" : \[
    {
      "schedulingPolicyId" : "001SG000005OtxxYA0",
      "appointmentBundlePolicyId" : "0jyxx0000000001AAA",
     ."workTypeId" : "0jyxx0000000001AAA",
      "serviceTerritoryId" : "0HxxG00000015dZ0AQ",
      "serviceTerritoryId" : "0HxxG00000015dZ0AQ",
      "firstVisitStartDateTime" : "2024-03-16T07:00:00.000Z",
      "isRecurringVisit" : "false",
      "operatingHoursId" : "0OHxx0000004CKKGA2",
      "recurrenceFrequencyType" : "WEEKLY",
      "recurringDaysList" : "Monday, Thursday",
      "clinicalServiceRequestIdsList" :\["0jxxG0000000b1BYAQ","0jyxx0000000b1KYAQ"\],
      "groupVisitAddress" :{ "city" : "Hyderabad" }
    }
  \]
}

This sample response is for the Schedule Group Visits action.

\[ {
  "actionName" : "scheduleGroupVisits",
  "errors" : null,
  "isSuccess" : true,
  "outputValues" : {
      "careServiceVisitPlanId": "null"
      "bundleStatusMessage": "Group visit request has been submitted"
    },
  "version" : 1
} \]