---
schema_version: "1"
id: f13cb0d2975d55a0d6bed30955bf319529ba57130ae6e71ba7a9b493f83035b8
title: applyToGroup Method
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_t_applytogroup_method_214803.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_t_applytogroup_method_214803.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 79e591352927c1fcd38db8092d1ac1a81641f4b765457c371227cbef95c7a193
description: Starts the Apply to Group batch job for a group.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# applyToGroup Method

Starts the Apply to Group batch job for a group.

## Class

## Input Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d212082e44">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d212082e50">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d212082e56">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">ApplyToGroupIPName</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Required</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Name of Integration Procedure to execute for each
                members.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">BatchSize</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Optional: Default to 10</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Batch Size is the chunk size for batch job.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">applyToGroupFailed</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Optional</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Failed records.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">cartType</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Optional: Default to Quote</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Quote or Order.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">contextId</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Required</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Master quote or order ID.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">groupCartId</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Required</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Group cart ID.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">groupId</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Required</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Group ID.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">hasPostProcess</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Optional: Default to false</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">If true, it executes qualification rules after the apply-to-group
                job completes.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">parentId</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Required</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Opportunity ID.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">retrycount</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Optional</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p>The number of times of retry of failed members because of a ROW
                LOCK ERROR.</p>
              <p>Max retry count is 5 by default. But you can
                change it by setting the CPQ Configuration custom
                settings.</p>
              <p style="margin-bottom:0;">
                <code>MS.ATG.MaxRetry = 5</code>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e44 ">
              <p style="margin-bottom:0;">startJobVIPName</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e50 ">
              <p style="margin-bottom:0;">Optional</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e56 ">
              <p style="margin-bottom:0;">Name of the integration procedure, used for the queued
                apply-to-group job.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Output Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d212082e326">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d212082e332">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e326 ">
              <p style="margin-bottom:0;">isJobStarted</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d212082e332 ">
              <p style="margin-bottom:0;">True or false: True if the apply to group job started. False if
                it's not started. </p>
            </td>

          </tr>
        </tbody>
      </table>

## Example Input Data

```
{"ApplyToGroupIPName":"MultiService_ApplyToGroup","BatchSize":25,"applyToGroupFailed":"","cartType":"Quote","contextId":"0Q05g000000x5etCAA","groupCartId":"0Q05g000000x5f3CAA","groupId":"a3W5g000000LNyxEAG","groupIds":[],"hasPostProcess":"false","parentId":"0065g000006Lh4mAAC","retrycount":"","startJobVIPName":"MultiService_StartApplyToGroup"}
```

## Example Output Data

```
{"isJobStarted":true,"errorCode":"INVOKE-200","error":"OK"}
```