Asset Line Item Callback Class
Asset Line Item Callback provides you a mechanism to define the criteria based on which you want to filter assets on the Installed Product page. The asset line items on the Installed product page are shown according to the business logic defined in the Asset Line Item Callback class. You can further filter the asset line items on the Installed Products page using the filters on the page. You can also use this callback to validate the termination of an asset on the Asset Termination page.
To use the Asset Line Item Callback you must create a custom Apex class that implements the Apttus_Config2.CustomClass.IAssetLineItemCallback4 interface and register the custom apex class with Asset Line Callback Class. You must write your custom logic in the custom apex class.
The following methods are available in the Apttus_Config2.CustomClass.IAssetLineItemCallback4 interface:
Method | Signature | Description |
---|---|---|
finish() | void finish() | This the last method that is executed after the callback is invoked. |
getAssetSearchScope() | List getAssetSearchScope() | You can use this method to return the asset search scope that was set in the start method. |
getFilterExpr() | String getFilterExpr(Apttus_Config2.CustomClass.ActionParams) | You can use this method to set the search scope. |
getQueryFilter() | String getQueryFilter(Id) | You can use this method to create and return the query filter. |
start() | void start(Apttus_Config2.ProductConfiguration, String, List) | This is the first method that is executed when the callback is invoked. |
validateAssetTermination() | Boolean validateAssetTermination(Set, Set, Date) | You can use this method to validate the termination of asset. |
getAssetTerminationDate() | Date getAssetTerminationDate() | You can use this method to fetch the termination date of asset. |
You must update CPQ to the latest version in the Apex class that you create to implement the Apttus_Config2.CustomClass.IAssetLineItemCallback4 interface. Otherwise, any logic to default date is not executed. Follow the steps below to update the version setting.
- Go to ' .
- Open the Apex class you created to implement the Asset Line Item Callback.
- Click Edit. Click Version Settings.
- Find the Conga Configuration & Pricing package. In the Version dropdown next to the package select the latest version of CPQ. For details about latest packages, refer to CPQ on Salesforce Release Notes.
- Click Save.
Examples
You can use Asset Filter Callback in the following scenarios. You can modify the code based on your requirements.
- Defaulting date and custom validation.
- Retrieving assets from multiple accounts.
The following sample code enables you to fetch assets from multiple accounts.