Request Data Object - Apttus_CPQApi.CPQ.SetIncentivesForCartRequestDO
Name
Type
Description
CartId
Id
The ID of the cart for which you want to set the incentives.
IncentiveCodes
List
The list incentives code that you want to set for cart or line item.
LineItemId
Id
The ID of the line item for which you want to set the incentive.
Data Object - Apttus_CPQApi.CPQApi.CPQ.SetIncentivesForCartResponseDO
Name
Type
Description
IsSuccess
Boolean
Indicates whether the incentives were successfully set on the cart or line item.
Code Sample
The sample code below enables you to set incentives for a cart or a line item.
// set incentives for cart
Apttus_CPQApi.CPQ.SetIncentivesForCartRequestDO request = new Apttus_CPQApi.CPQ.SetIncentivesForCartRequestDO();
request.CartId = configSO.Id;
request.IncentiveCodes.add(incentiveSO.Apttus_Config2__IncentiveCode__c);
Apttus_CPQApi.CPQ.SetIncentivesForCartResponseDO result = Apttus_CPQApi.CPQWebService.setIncentivesForCart(request);
// set incentives for cart line item
Apttus_CPQApi.CPQ.SetIncentivesForCartRequestDO request4 = new Apttus_CPQApi.CPQ.SetIncentivesForCartRequestDO();
request4.LineItemId = lineItemSO.Id;
request4.IncentiveCodes.add(incentiveSO.Apttus_Config2__IncentiveCode__c);
Apttus_CPQApi.CPQ.SetIncentivesForCartResponseDO result4 = Apttus_CPQApi.CPQWebService.setIncentivesForCart(request4);