You can invoke this API to renew assets.

APISignature
renewAssetsWebService static Apttus_CPQApi.CPQAsset.RenewAssetsResponseDO renewAssets(Apttus_CPQApi.CPQAsset.RenewAssetsRequestDO request)
Parameters

Name

Type

Description

requestApttus_CPQApi.CPQAsset.RenewAssetsRequestDORequest object passed by the invoker method.
Request Data Object - Apttus_CPQApi.CPQAsset.RenewAssetsRequestDO

Name

Type

Description

RenewEndDateDateAsset end date for renewal.
FarthestAssetEndDateBooleanSetting this value to true renews assets using the farthest end date.
RenewTermIntegerRenewal term for an asset.
AssetIdsList<ID>List of asset IDs to be renewed.
CartIdIDID of the cart for which an asset is being renewed.
Response Data Object - Apttus_CPQApi.CPQAsset.RenewAssetsResponseDO

Field

Type

Description

LineItemMapList<LineItemEntryDO>Line items that are renewed.
ErrorsList<String>List of error messages if any error occurred.
LineItemEntryDO

Name

Type

Description

LineItemIdIDLineitem ID
LineItemSOApttus_Config2__LineItem__cLineItem SObject


Code Sample

The following code sample helps you renew assets based on the renewal date, farthest asset end date, or renewal term.

Public Apttus_CPQApi.CPQAsset.RenewAssetsResponseDO renewAssets() 
{
	// create and populate request object 
	Apttus_CPQApi.CPQAsset.RenewAssetsRequestDO request = new Apttus_CPQApi.CPQAsset.RenewAssetsRequestDO(); 
	request.CartId = 'a1I6C000000k6lmUAA';
	// list of primary asset ids to be renewed
	request.AssetIds = new List<ID> {'a0e6C000001uATS'};
	request.renewenddate = Date.newInstance(YYYY, MM, DD);

	// call renewAssets API 
	Apttus_CPQApi.CPQAsset.RenewAssetsResponseDO response = Apttus_CPQApi.CPQAssetWebService.renewAssets(request); 
	return response;
}
CODE