---
schema_version: "1"
id: 128f412ebfcc2a59e0429d9fb762a9e2a2201772503c9656bd055e24af8570ea
title: removeGroups Method
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_t_removegroups_method_214549.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_t_removegroups_method_214549.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c1a8dc36206ce01c8ebf9ac93052f6ab5066ccacb57f864278b519c7b8be08eb
description: Deletes a list of groups and their members.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# removeGroups Method

Deletes a list of groups and their members.

## 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="d103351e44">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d103351e50">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d103351e56">
              <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="d103351e44 ">
              <p style="margin-bottom:0;">contextId</p>
            </td>

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

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

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d103351e56 ">
              <p style="margin-bottom:0;">List of group IDs to be deleted.</p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d103351e56 ">
              <p style="margin-bottom:0;">Quote or order.</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="d103351e148">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d103351e154">
              <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="d103351e148 ">
              <p style="margin-bottom:0;">message</p>
            </td>

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

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

## Example Input Data

```
{"contextId":"0Q00b000000znTYCAY","groupIds":["a4M0b000002CWMGEA4"],"cartType":"Quote"}
```

## Example Output Data

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