Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

download

Registering Split Cart Parameters

The global method setSplitCartInfo is used to group the line items in the cart for pricing. You can define the parameters, namely the threshold and the split criteria based on which you want to split the line items in the cart through the API. If you do not define the parameters, the values of settings Split Cart Threshold and Split Cart Criteria Fields in Config System Properties are used to split the line items instead.

API

Signature

setSplitCartInfo

static void setSplitCartInfo(Id cartId, Apttus_Config2.CustomClass.SplitCartInfo splitInfo)

Parameters

Name

Type

Required?

Description

cartId ID

Yes

The id of the Cart you want to split.

splitInfo Apttus_Config2.CustomClass.CustomClass.SplitCartInfo

Yes

The request object.

Request Object - Apttus_Config2.CustomClass.SplitCartInfo

Field

Type

Description

SplitCriteriaFields List

The list of API names of the fields to use as criteria.

SplitThreshold Integer

The number of line items in a group.

Code Sample

The sample below enables you to set the values of Split Cart Threshold and Split Cart Criteria Fields to define the information required to split a cart.

//Setting Split info Apttus_Config2.CustomClass.SplitCartInfo splitInfo = new Apttus_Config2.CustomClass.SplitCartInfo(); splitInfo.SplitCriteriaFields.add('Apttus_Config2_LocationId_c'); splitInfo.SplitThreshold = 10; //Calling SplitInfo // cartID can be Main Cart Id or Config Cart Id ID cartID = 'a1I2f00000029Iy'; Apttus_Config2.CPQWebService.setSplitCartInfo(cartID , splitInfo);