You are here:
Customizing Default Interface Implementations for Margin Ranges
You can customize the Margin Range Loader or the Margin Validation interfaces by changing the default implementations. You may want to do this to customize the names of the calculation procedures, matrices, and/or the logic used to validate the ranges. These interfaces are invoked by the Pricing Plan when the LoadMarginRanges method name is specified in a step.
In the Pricing Plan Steps facet of the Default Pricing Plan, add the Load Margin Ranges step after the "Calculate Rollups" step and before the "Save Line Items" step.
If you do not have the MarginRangeLoader or MarginValidation interfaces in your org, install the Winter '19 release and run the post-installation or post-upgrade steps. See the CME Installation or the CME Upgrade .
This is an optional step. Use it only if you want to customize the default interface implementations to load the margin range and validate it.
Customize one or both of the following default interface implementations:
-
Margin Range Loader
The MarginRangeLoader interface implementation loads the margin range data from the calculation procedure and returns the data in an output map. The calculation procedure name is passed through the loadMarginRange parameter in the pricing plan step.
Customize this interface implementation, for example, when you don't want to be restricted to using the calculation procedure and want the flexibility to define your own margin range calculation process. See Customize the MarginRangeLoader Interface Implementation.
-
Margin Validation
The MarginValidation interface implementation validates margin range on line items and returns an error message at the line item level in the Industries CPQ Cart.
Customize this interface implementation, for example, when you don't want to validate error messages at the line item level. Instead, you want to set up a different validation mechanism. See Customize the MarginValidation Interface Implementation.
- Customize the MarginRangeLoader Interface Implementation
If you do not want to use a Vlocity calculation procedure to calculate your margin ranges, you can create a new one, name it in the pricing plan step, and build custom logic to load the margin range. - Customize the MarginValidation Interface Implementation
This interface implementation is called by the default Margin Range Loader interface implementation. You can overwrite this class to customize the margin validation. - Customizing Default Margin Range and Validation Interface Implementations
Follow these optional customization steps to build your own margin range and margin validation interface implementations.

