---
schema_version: "1"
id: 395aef5dd10fbf9fae536994dde652dcc2d95d2eec1fbd702fe7adb944bf16f5
title: createNewGroup Method
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_t_createnewgroup_method_214350.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_t_createnewgroup_method_214350.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 93524100d79a8e1d27e2f598367509eeb16ae6ba79ccceb44f9622b3dd7f71ff
description: Creates a new (Quote or Order)-group with or without the corresponding Group Quote or Group Order record.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# createNewGroup Method

Creates a new (Quote or Order)-group with or without the corresponding Group Quote or Group Order record.

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

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

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

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

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d40008e56 ">
              <p style="margin-bottom:0;">Name for the group.</p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d40008e56 ">
              <p style="margin-bottom:0;">Description of the group.</p>
            </td>

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

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

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

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

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d40008e56 ">
              <p style="margin-bottom:0;">True value will create the corresponding Group-Cart record as
                well.</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="d40008e233">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d40008e239">
              <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="d40008e233 ">
              <p style="margin-bottom:0;">groupId</p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d40008e239 ">
              <p style="margin-bottom:0;">All details related to a group. This contains groupCart, parentId,
                contextId, groupCartId, and groupName. See sample output</p>
            </td>

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

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

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

## Example Input Data

```
{"groupName":"South Group","groupDescription":"All south region","parentId":"0060b00000vGbYbAAK","contextId":"0Q00b000000znTYCAY","memberType":"ServicePoint","isGroupAssociatedWithCart":true,"cartType":"Quote"}"parentId":"0060b00000vGbYbAAK","contextId":"0Q00b000000znTYCAY","pageSize":20,"offset":0,"memberType":"ServicePoint","cartType":"Quote"}
```

## Example Output Data

```
{"groupInfo":{"groupCart":{"attributes":{"type":"Quote","url":"/services/data/v49.0/sobjects/Quote/0Q00b000000znU2CAI"},"Name":"South Group","OpportunityId":"0060b00000vGbYbAAK","RecordTypeId":"0120b000000hxEhAAI","Pricebook2Id":null,"h_cpq_ecomm__PriceListId__c":null,"h_cpq_ecomm__DefaultServiceAccountId__c":"0010b00002ccljKAAQ","h_cpq_ecomm__DefaultBillingAccountId__c":"0010b00002ccljKAAQ","h_cpq_ecomm__ParentQuoteId__c":"0Q00b000000znTYCAY","h_cpq_ecomm__NumberOfContractedMonths__c":null,"Status":"Draft","Id":"0Q00b000000znU2CAI","h_cpq_ecomm__QuoteGroupId__c":"a4M0b000002CWMaEAO"},"groupCartURL":"apex/h_cpq_ecomm__MultiServiceHybridCPQ?id=0Q00b000000znU2CAI&parentId=0060b00000vGbYbAAK&groupCart=true&groupId=a4M0b000002CWMaEAO&contextId=0Q00b000000znTYCAY&cartType=Quote","groupCartId":"0Q00b000000znU2CAI","parentId":"0060b00000vGbYbAAK","contextId":"0Q00b000000znTYCAY","groupId":"a4M0b000002CWMaEAO","groupName":"South Group"},"groupId":"a4M0b000002CWMaEAO","error":"OK"}
```