Configure Price Quote (CPQ) CPQ for SOAP API Developers API Reference Asset Service Current: Swapping Assets PDF Download PDF Download page Swapping Assets. Current page All pages Swapping Assets You can invoke this API for swapping Assets.APISignatureswapAssetsstatic Apttus_Config2.CPQStruct.SwapAssetsResponseDO swapAssets(Apttus_Config2.CPQStruct.SwapAssetsRequestDO request)ParametersNameTypeDescriptionrequestApttus_Config2.CPQStruct.SwapAssetsRequestDORequest object invoked by the methodRequest Data Object - Apttus_Config2.CPQStruct.SwapAssetsRequestDONameTypeDescriptionNewStartDateDateThe new Asset Start Date on SwappingProductIdsList<ID>Id of the product with which the Asset is being swapped.AssetIdsList<ID>The Id of the Asset which is swapped.CartIdsIdThe Id of Cart for which an Asset is being swappedResponse Data Object - Apttus_Config2.CPQStruct.SwapAssetsResponseDOFieldTypeDescriptionLineItemMapMap<ID, Apttus_Config2__LineItem__c>Map of line items of the assets that are being swapped.Code SampleThe code sample below helps you swap an Asset with another product. // create list of asset ids List<ID> listAssetId = new List<ID>(); for (AssetLineItemWrapperClass record : wrapperAssetLineItemList) { if (record.selected) { listAssetId.add(record.assetId); } } // create list of product ids List<ID> listProductId = new List<ID>(); for (ProductWrapperClass product : wrapperProductList) { if (product.selected) { listProductId.add(product.productId); } } // create and populate request object if (objAssetLineItem.Apttus_Config2__StartDate__c != null) { Apttus_Config2.CPQStruct.SwapAssetsRequestDO request = new Apttus_Config2.CPQStruct.SwapAssetsRequestDO(); request.AssetIds = listAssetId; request.ProductIds = listProductId; request.NewStartDate = objAssetLineItem.Apttus_Config2__StartDate__c; request.CartId = cartId; } // call swapAssets API Apttus_Config2.CPQStruct.SwapAssetsResponseDO response = Apttus_Config2.AssetService.swapAssets(request); ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info,'swapAssets: ' + response)); CODE ×