---
schema_version: "1"
id: 0c36a2d3f0428a0a2951464fc0fb0cfa965f45b96a84cc511328828a56be2db7
title: getGroups Method
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_t_getgroups_method_214615.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_t_getgroups_method_214615.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9a8fd40bd09941207729e4d930e920f1bead60d10470ada0092e4e2386b9172b
description: Returns a list of groups under a Master/Enterprise (Mega) quote or order, specific for a member-type.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# getGroups Method

Returns a list of groups under a Master/Enterprise (Mega) quote or order, specific for a member-type.

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

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

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

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

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d387730e56 ">
              <p style="margin-bottom:0;">Page size for pagination.</p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d387730e56 ">
              <p style="margin-bottom:0;">Offset for pagination.</p>
            </td>

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

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

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d387730e56 ">
              <p style="margin-bottom:0;">CPQ Group Member Type Name. For example: ServicePoint.</p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d387730e56 ">
              <p style="margin-bottom:0;">True value will try to fetch and return the corresponding
                Group-Cart record as well.</p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d387730e56 ">
              <p style="margin-bottom:0;">Sub-string to search within the group and it’s members. Returns
                matching search results as a response.</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="d387730e254">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d387730e260">
              <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="d387730e254 ">
              <p style="margin-bottom:0;">result</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d387730e260 ">
              <p style="margin-bottom:0;">JSONResult with Group and corresponding Cart record (If
                applicable). Please see sample output for details.</p>
            </td>

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

## Example Input Data

```
{"parentId":"0060b00000vGbYbAAK","contextId":"0Q00b000000znTYCAY","pageSize":20,"offset":0,"memberType":"ServicePoint","cartType":"Quote"}
```

## Example Output Data

```
{"totalSize":0,"records":[{"actions":{"getGroupedServices":{"rest":{"params":{},"method":null,"link":null},"remote":{"params":{"methodName":"getGroupedServices","groupCartId":"0Q00b000000znTiCAI","offset":0,"pageSize":20,"contextId":"0Q00b000000znTYCAY","parentId":"0060b00000vGbYbAAK","groupId":"a4M0b000002CWMGEA4"}},"client":{"params":{}}},"getGroupMembers":{"rest":{"params":{},"method":null,"link":null},"remote":{"params":{"methodName":"getGroupMembers","offset":0,"pageSize":20,"contextId":"0Q00b000000znTYCAY","parentId":"0060b00000vGbYbAAK","groupId":"a4M0b000002CWMGEA4"}},"client":{"params":{}}}},"displaySequence":-1,"groupId":"a4M0b000002CWMGEA4","itemsCount":1,"groupName":"Group-1","groupCartId":"0Q00b000000znTiCAI","groupCartURL":"apex/h_cpq_ecomm__MultiServiceHybridCPQ?id=0Q00b000000znTiCAI&parentId=0060b00000vGbYbAAK&groupCart=true&groupId=a4M0b000002CWMGEA4&contextId=0Q00b000000znTYCAY&cartType=Quote","groupCart":{"attributes":{"type":"Quote","url":"/services/data/v49.0/sobjects/Quote/0Q00b000000znTiCAI"},"h_cpq_ecomm__IsPriced__c":false,"h_cpq_ecomm__IsValidated__c":false,"Id":"0Q00b000000znTiCAI","RecordTypeId":"0120b000000hxEhAAI"},"hasUnappliedGroupItems":true,"Id":{"value":"a4M0b000002CWMGEA4","previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__MemberCount__c":{"value":1,"previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__LockedBy__c":{"value":null,"previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"Name":{"value":"Group-1","previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__Description__c":{"value":null,"previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__MemberType__c":{"value":"ServicePoint","previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__MultiServiceMessageData__c":{"value":null,"previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__LockedFor__c":{"value":null,"previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__AsyncJobId__c":{"value":null,"previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__AsyncOperation__c":{"value":null,"previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__HasUnappliedGroupItems__c":{"value":true,"previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__GroupCartId__c":{"value":"0Q00b000000znTiCAI","previousValue":null,"originalValue":null,"messages":[],"label":null,"hidden":null,"fieldName":null,"editable":null,"dataType":null,"alternateValues":null,"actions":{}},"h_cpq_ecomm__GroupCartId__r":{"h_cpq_ecomm__IsValidated__c":false,"h_cpq_ecomm__IsPriced__c":false,"h_cpq_ecomm__TrackingNumber__c":null,"h_cpq_ecomm__MultiServiceMessageData__c":null,"h_cpq_ecomm__DefaultServicePointId__c":null}}],"data":{"groupTotalCount":1}}"masterCartId":"0Q04x000000gZbWCAU","error":"OK"}
```