createNewGroup Method

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

Class

Input Parameters

Parameter

Required

Description

parentId

Required

Opportunity ID.

contextId

Required

Parent cart Id (Master/Enterprise Quote/Order Id)

groupName

Required

Name for the group.

groupDescription

Optional

Description of the group.

cartType

Optional: Defaults to Quote

Quote or Order.

memberType

Optional: Defaults to ServicePoint

CPQ Group Member Type Name. For example: ServicePoint.

isGroupAssociatedWithCart

Optional: Defaults to true

True value will create the corresponding Group-Cart record as well.

Output Parameters

Parameter

Description

groupId

Group ID of the created record.

groupInfo

All details related to a group. This contains groupCart, parentId, contextId, groupCartId, and groupName. See sample output

message

In case of any error.

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