Creating and Updating Related Line Items
You can use this global method to create related line items records of an asset and associate them with a given service product. You can also delete the related line item. You can create and delete related line items for multiple service products in a single call, however, the number of line items must adhere to the Salesforce Governor Limits.
API |
Signature |
---|---|
updateRelatedLineItems |
static Apttus_Config2.CPQStruct.UpdateRelatedLineItemResponseDO updateRelatedLineItems(Apttus_Config2.CPQStruct.UpdateRelatedLineItemRequestDO requestDO) |
Parameters |
||
---|---|---|
Name |
Type |
Description |
requestDO | Apttus_Config2.CPQStruct.UpdateRelatedLineItemRequestDO |
Request related line item details data object that is invoked by the method. |
Request Data Object - Apttus_Config2.CPQStruct.UpdateRelatedLineItemResponseDO |
||
---|---|---|
Name |
Type |
Description |
CartId | ID |
The ID of the product configuration. |
RelatedLineItemColls | Map<Id,
List<Apttus_Config2.RelatedLineItemColl>> |
Map of service line item id to the list of data objects containing relevant details of the asset associated with the given service line item. |
Data Object - Apttus_Config2.RelatedLineItemColl |
||
---|---|---|
Name |
Type |
Description |
Action | String |
Define one of the following strings to specify whether associate or dissociate the asset from the service line item:
|
AssetLineItemId | Id |
The Id of the asset line item |
RelatedLineItemSO | Apttus_Config2__RelatedLineItem__c |
The Sobject with the updated values to be saved in the database. |
Response Data Object - Apttus_Config2.CPQStruct.UpdateRelatedLineItemResponseDO |
||
---|---|---|
Field |
Type |
Description |
Errors | List <Strings> |
List of errors encountered while creating or deleting the related line item |
isSuccess | Boolean |
Indicates whether the related line items were created or deleted successfully. |
Code Sample
The code sample below helps you create and delete a related line item.