---
schema_version: "1"
id: b866023f9d7a1d09ad65d85780603ff10d119577d383743ba17266923751ae46
title: addToGroup Method
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_t_addtogroup_method_214454.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_t_addtogroup_method_214454.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f1b93d54bff3c9a95071eb67942c5da6e2fcf57107349385282c648504fabef8
description: Adds a service point to a group.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# addToGroup Method

Adds a service point to a group.

## Class

## Input Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d344082e47">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d344082e53">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d344082e59">
              <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="d344082e47 ">
              <p style="margin-bottom:0;">parentId</p>
            </td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d344082e59 ">
              <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="d344082e47 ">
              <p style="margin-bottom:0;">contextId</p>
            </td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d344082e59 ">
              <p style="margin-bottom:0;">Parent cart Id (Master/Enterprise Quote/Order Id)</p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d344082e59 ">
              <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="d344082e47 ">
              <p style="margin-bottom:0;">groupCartId</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d344082e53 ">
              <p style="margin-bottom:0;">Required if corresponding cart record is present</p>
            </td>

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

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d344082e59 ">
              <p>Pass the IDs of member to add to the
                group.</p>
              <p style="margin-bottom:0;">
                <code>{"servicePoints":["a3R6g000000BAN3EAO", "a3R6g000000BAN4EAO"]}</code>
              </p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d344082e59 ">
              <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="d344082e47 ">
              <p style="margin-bottom:0;">memberType</p>
            </td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d344082e59 ">
              <p style="margin-bottom:0;">CPQ Group Member Type Name. For example: ServicePoint</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="d344082e242">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d344082e248">
              <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="d344082e242 ">
              <p style="margin-bottom:0;">message</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d344082e248 ">
              <p style="margin-bottom:0;">In case of any error.</p>
            </td>

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

## Example Input Data

```
{"groupId":"a4M0b000002CWMaEAO","groupCartId":"0Q00b000000znU2CAI","groupName":"South Group","parentId":"0060b00000vGbYbAAK","contextId":"0Q00b000000znTYCAY","groupJSON":{"servicePoints":["a3h0b00000CwSUFAA3","a3h0b00000CwSUGAA3"]},"memberType":"ServicePoint","cartType":"Quote"}
```

## Example Output Data

```
{"error":"OK"}
```