global with sharing class CpqAppHandlerHookImplementation implements
vlocity_cmt.VlocityOpenInterface
{
global Boolean invokeMethod(String methodName, Map<String, Object> input,
Map<String, Object> output, Map<String, Object> options)
{
try
{
[Link]('____ CpqAppHandlerHookImplementation ' + methodName);
if (methodName == '[Link]' || methodName ==
'[Link]' ||
methodName == '[Link]' || methodName ==
'[Link]')
{
String customFields = 'Billing_Zip_Code__c'; // comma separated
list of custom fields
// if fields is passed in, append the custom fields to the
parameter value
if ([Link]((String)[Link]('fields')))
{
[Link]('fields', [Link]('fields') + ',' + customFields);
}
else
{
// if the fields is not passed in, initialize to default price
detail fields and include the custom fields
[Link]('fields',
'vlocity_cmt__BillingAccountId__c,vlocity_cmt__ServiceAccountId__c,Quantity,vlocity
_cmt__RecurringTotal__c,' +
'vlocity_cmt__OneTimeTotal__c,vlocity_cmt__OneTimeManualDiscount__c,vlocity_cmt__Re
curringManualDiscount__c,' +
'vlocity_cmt__ProvisioningStatus__c,vlocity_cmt__RecurringCharge__c,vlocity_cmt__On
eTimeCharge__c,ListPrice,' +
'vlocity_cmt__ParentItemId__c,vlocity_cmt__BillingAccountId__r.Name,vlocity_cmt__Se
rviceAccountId__r.Name,' +
'vlocity_cmt__PremisesId__r.Name,vlocity_cmt__InCartQuantityMap__c,vlocity_cmt__Eff
ectiveQuantity__c' + ',' + customFields);
}
// if priceDetailsFields is passed in, append the custom fields to
the parameter value
if ([Link]((String)[Link]('priceDetailsFields')))
{
[Link]('priceDetailsFields', [Link]('priceDetailsFields')
+ ',' + customFields);
}
else
{
// if the priceDetailFields is not passed in, initialize to
default price detail fields and include the custom fields
[Link]('priceDetailsFields',
'vlocity_cmt__RecurringCharge__c,vlocity_cmt__RecurringTotal__c,vlocity_cmt__OneTim
eCharge__c,' +
'vlocity_cmt__OneTimeTotal__c' + ',' + customFields);
}
}
return true;
}
catch (Exception ex)
{
[Link]('--- Exception: ' + [Link]());
[Link]('--- Stack Trace: ' + [Link]());
throw ex;
}
}
}
['Capex__c']['value']
['Opex__c']['value']
['Cost__c']['value']
['Capex__c']['label']
['Opex__c']['label']
['Cost__c']['label']
['One_Time_Cost_Total__c']['label']
['One_Time_Cost_Total__c']['value']
['vlocity_cmt__RecurringMargin__c']['value']
['vlocity_cmt__RecurringMargin__c']['label']
['vlocity_cmt__OneTimeMargin__c']['value']
['vlocity_cmt__OneTimeMargin__c']['label']