Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Overriding defualt price calculator on Catalog Items

sebbelcher
Kilo Explorer

Hi,

I am trying to override the default CatalogPriceCalculator for specific catalog items. I have a service which has some complex pricing, depending on options selected from Lookups in the form, the base price needs to be modified with both an 'adder' which is what normally happens if I pricing lookup is selected - but I also need to be able to apply a multiplication modifier to the price based on a value of the lookup field. (i.e. it costs 20% less to host an application in location A compared to location B - I want to multiply the catalog price by 0.8 if location B is selected)

The Wiki suggests extending the CatalogPricingCalculator to override the default function - I have written this override function for calcPrice - but how do I invoke this class for the specific catalogue items?

Thanks,
Seb

5 REPLIES 5

jamesmcwhinney
Giga Guru

Hi Seb,   Not sure if you are still trying to adjust the price but here is one possible workaround:


How to create a catalog item with a user specified cost