Implement the Asset Line Item Filter Callback interface if you are enabling Wallet Manager Flow. This callback interface filters all the regular asset line items and displays only the active wallet asset line items on the Installed Products pages. All wallets with asset end date older than the system date are considered as expired and are filtered out from the Installed Products page.

To add the custom class

  1. Go to Setup > App Setup > Develop > Apex Classes.
  2. Click New.
  3. Enter the sample callback class code.

  4. Click Save.

This is just a sample callback class. You may change the code per your requirements.

In order to implement the interface, prefix it with Apttus_Billing.CustomClass.<Interface Name>.


global interface IAssetLineItemCallback3{
	**
     * Method to initialize variables and thereby start the callback.
     **/

 global void start(Apttus_Config2.ProductConfiguration configuration, String assetSearchFilter, List<String> assetSearchScope) {
       
    }
	 /**
     * Method to get query filter.
     **/
    global String getQueryFilter(ID accountId) {
        
    }
	 /**
     * Method to get string expression to put along with where clause to filter asset line items.
     **/
    global String getFilterExpr(Apttus_Config2.CustomClass.ActionParams params) {
        
       
    }
    
    /**
     * Methog to get list of scopes to search asset.
     **/
    global List<String> getAssetSearchScope() {
       
    }
    
    /**
     * Method to perform finalization before ending callback execution.
     **/
    global void finish() {
        
    }
	 global Boolean validateAssetTermination(Set<ID> assetIds, Set<ID> accountIds, Date effectiveDate) {
        
    }
}
global with sharing class AssetLineItemFilterCallback implements Apttus_Config2.CustomClass.IAssetLineItemCallback3 {

    // Apttus_Config2__ProductType__c
    public static final String PRODUCT_TYPE_WALLET = 'Wallet';

    // System properties
    public static final String PROP_SYSTEM_PROPERTIES = 'System Properties';

    //WalletFlow Field Value from Billing System Properties
    private String walletFlowCustomFieldValues;

    /**
     * Method to initialize variables and thereby start the callback.
     **/
    global void start(Apttus_Config2.ProductConfiguration configuration, String assetSearchFilter, List<String> assetSearchScope) {

        Apttus_Billing__BillingSystemProperties__c prop = Apttus_Billing__BillingSystemProperties__c.getInstance(PROP_SYSTEM_PROPERTIES);
        walletFlowCustomFieldValues = prop.WalletFlow__c;
    }
    
    /**
     * Method to get query filter.
     **/
    global String getQueryFilter(ID accountId) {
        return '';
    }
    
    /**
     * Method to get string expression to put along with where clause to filter asset line items.
     **/
    global String getFilterExpr(Apttus_Config2.CustomClass.ActionParams params) {
        
        String conditionExpression = '';

        if(params.Flow == walletFlowCustomFieldValues) {
            conditionExpression = 'AccountId__c = \'' + params.AccountId + '\' ';
            conditionExpression += ' AND ProductType__c = \'' + PRODUCT_TYPE_WALLET + '\'';
            conditionExpression += ' AND EndDate__c >= Today';
        }else{
            conditionExpression = 'AccountId__c = \'' + params.AccountId + '\' ';
            conditionExpression += ' AND ProductType__c != \'' + PRODUCT_TYPE_WALLET + '\'';
        }
        return conditionExpression;
    }
    
    /**
     * Methog to get list of scopes to search asset.
     **/
    global List<String> getAssetSearchScope() {
        return new List<String>();
    }
    
    /**
     * Method to perform finalization before ending callback execution.
     **/
    global void finish() {
        
    }
    global Boolean validateAssetTermination(Set<ID> assetIds, Set<ID> accountIds, Date effectiveDate) {
        return true;
    }

} 
CODE


To add the name of custom callback class, go to Setup > App Setup > Develop > Custom Settings and click Manage beside Config Custom Classes. Click Edit for System Properties and enter the name of your custom callback class in Asset Line Item Callback Class.