# applyToGroup Method

Starts the Apply to Group batch job for a group.

## Class

## Input Parameters

<sfdocstbl><table><col /><col /><col /><thead><tr><th><p>Parameter</p></th><th><p>Required</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><p>ApplyToGroupIPName</p></td><td><p>Required</p></td><td><p>Name of Integration Procedure to execute for each members.</p></td></tr><tr><td><p>BatchSize</p></td><td><p>Optional: Default to 10</p></td><td><p>Batch Size is the chunk size for batch job.</p></td></tr><tr><td><p>applyToGroupFailed</p></td><td><p>Optional</p></td><td><p>Failed records.</p></td></tr><tr><td><p>cartType</p></td><td><p>Optional: Default to Quote</p></td><td><p>Quote or Order.</p></td></tr><tr><td><p>contextId</p></td><td><p>Required</p></td><td><p>Master quote or order ID.</p></td></tr><tr><td><p>groupCartId</p></td><td><p>Required</p></td><td><p>Group cart ID.</p></td></tr><tr><td><p>groupId</p></td><td><p>Required</p></td><td><p>Group ID.</p></td></tr><tr><td><p>hasPostProcess</p></td><td><p>Optional: Default to false</p></td><td><p>If true, it executes qualification rules after the apply-to-group job completes.</p></td></tr><tr><td><p>parentId</p></td><td><p>Required</p></td><td><p>Opportunity ID.</p></td></tr><tr><td><p>retrycount</p></td><td><p>Optional</p></td><td><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><code>MS.ATG.MaxRetry = 5</code></p></td></tr><tr><td><p>startJobVIPName</p></td><td><p>Optional</p></td><td><p>Name of the integration procedure, used for the queued apply-to-group job.</p></td></tr></tbody></table></sfdocstbl>

## Output Parameters

| Parameter    | Description                                                                       |
| ------------ | --------------------------------------------------------------------------------- |
| isJobStarted | True or false: True if the apply to group job started. False if it's not started. |

## 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"}
```
