Configure Price Quote (CPQ) CPQ for SOAP API Developers API Reference Asset Service Current: Terminating Assets PDF Download PDF Download page Terminating Assets. Current page All pages Terminating Assets You can invoke this global method for asset cancellation.APISignaturecancelAssetsstatic Apttus_Config2.CPQStruct.CancelAssetsResponseDO cancelAssets(Apttus_Config2.CPQStruct.CancelAssetsRequestDO request)ParametersNameTypeDescriptionrequestApttus_Config2.CPQStruct.CancelAssetsRequestDORequest object invoked by the methodRequest Data Object - Apttus_Config2.CPQStruct.CancelAssetsRequestDONameTypeDescriptionCancelDateDateThe termination date of the AssetAssetIdsList<ID>List of asset ids to terminate.CartIdIDThe id of Cart for which an asset is being canceled.Response Data Object - Apttus_Config2.CPQStruct.CancelAssetsResponseDOFieldTypeDescriptionLineItemMapMap <ID, Apttus_Config2__LineItem__c>Line Items that are to be terminated.Code SampleThe code sample below helps you terminate Assets based on the Termination Date. // create list of asset ids List<ID> listAssetId = new List<ID>(); for (AssetLineItemWrapperClass record : wrapperAssetLineItemList) { if (record.selected) { listAssetId.add(record.assetId); } } // create and populate request object if (objAssetLineItem.Apttus_Config2__CancelledDate__c != null){ Apttus_Config2.CPQStruct.CancelAssetsRequestDO request = new Apttus_Config2.CPQStruct.CancelAssetsRequestDO(); request.CancelDate = objAssetLineItem.Apttus_Config2__CancelledDate__c.date(); request.AssetIds = listAssetId; request.CartId = cartId; } // call cancelAssets API Apttus_Config2.CPQStruct.CancelAssetsResponseDO response = Apttus_Config2.AssetService.cancelAssets(request); ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info,'cancelAssets: ' + response)); CODE ×