Calculation Rules Provider

Estimated reading: 1 minute 4 views

Overview

It provides the Calculation Rules that are used to calculate the billing for a specific Billable Element.

Out-of-the-box Calculation Rules Provider

Wattyo comes with an out-of-the-box Calculation Rules Provider that covers all the common scenarios and more complex ones

Custom Calculation Rules Provider

It would be very strange that you need to create a custom one. In fact, we advise to discuss this with Wattyo support in case you need to do it.

However, as Wattyo was designed with flexibility in mind, you can create your own provider and plug it into the system in case your business requires a specific behaviour not covered by the out-of-the-box provider.

Calculation Rules Provider Interface

The CalculationRulesProvider interface is defined as follows:

interface CalculationRulesProvider {
    Map<Id, List<CalculationRule>> getCalculationRules(Set<Id> billableElementsIds);
}

The getCalculationRules method is responsible for loading the calculation rules for the specified Billable Elements. The method receives the list of Ids of the Billable Elements to load the rules for.

Please refer to the Calculation Rule documentation to get more information about the Calculation Rule object.

Leave a Comment

       
Euphoria, forever till the end of times

Euphoria

Share this Doc

Calculation Rules Provider

Or copy link

CONTENTS