Converting Legacy SPARQLs to IMCScript is great way to improve product’s maintainability, scalability, simplicity as well as performance. There are several IMCScript - Entry points where the scripts can be executed, however After Pricing will be a group useful for most of legacy SPARQLs like ItemHeaderPriceItem, DocumentHeaderPriceItem etc. It executes the scripts once any pricing engine (Internal or External i.e. SSC) gets executed. Please refer Examples section to see the examples of the same.
In order to make use of IMCScript, first drop any SPARQL (or default SPARQL) on BDA i.e. itemHeaderTotalPrice or documentHeaderPrice under application extension schema owl and restart the server. This will eventually remove legacy calculable feature from those attributes.
Thereafter one can use such BDAs directly in IMCScript normally.
Note: Assigning BDA value via IMCScript without following above step can create multiple calculable values in the system (One via SPARQL and another via IMCScript) which can bring the system into inconsistent state.