Technical Chars. Provider

Estimated reading: 2 minutes 5 views

Overview

The Thecnical Characteriscts Provider feed the the Calculation Engine with the technical characteristics of the Billable Element. This data is used to calculate the billing.

The Technical characteristics are usually related to the Service Point o metering device, but it can vary depending on the business requirements.

For instance, a technical characteristics for an Electicity Business could be the Voltage Level, the Power Factor or the Meter Type of the Service Point.

Standard Technical Chars. Provider

The out-of-the box provider loads the Tecnical Characteristics from the Service Point object (which must be setup in the Billing Settings) and if gets the Characteristics in two complementary ways:

  • It loads all the records from the “Technical Characteristics” related list in the Service Point.
  • It loads the fields from the Service Point that are included in the specified fieldset.

This way, you can have a mix of static and dynamic characteristics for the Service Point.

These settings are configured in the Metering & Consumption Settings as the provider is technically part of the Metering & Consumption module.

Custom Technical Chars. Provider

In case you need to load the Technical Characteristics from a different object or you need to apply some custom logic to load the data, you can create your own Technical Characteristics Provider by implementing the TechnicalCharacteristicsProvider interface.

Technical Characteristics Provider Interface

interface TechCharacteristicsProviderInterface {
    Map<Id,List<TechCharacteristicDTO>> getTechCharacteristics(SObjectType theType, Set<Id> idList);
}

The getTechCharacteristics method is responsible for loading the technical characteristics for the specified records. The method receives the SObjectType of the records and the list of Ids to load the characteristics for.

For instance, the SObject could be ‘ServicePoint__c’ and the Ids could be the Service Points that are related to the Billable Element.

TechCharacteristicDTO

The TechCharacteristicDTO is the object that the provider must return. It is defined as follows:

class TechCharacteristicDTO {
    Id id;
    String parentId;
    String name;
    String type;
    String status;
    String valueType;
    Object value;
}

Leave a Comment

       
Euphoria, forever till the end of times

Euphoria

Share this Doc

Technical Chars. Provider

Or copy link

CONTENTS