TPM_RTRReportingWrapper_AMS is a base class that
contains the structures to load the input. This class contains the list of KPIs and filter
criteria that you chose in the report—selected time frame or the list of customers and products.
Depending on various use cases, the payload method can
contain different attributes.
The OutputRecord method returns product (pdim), KPI (kdim), time (tdim), and values (v). The values are defined in the actual logic class, which is TPM_RTRFunds_AMS in this use case. For example, you can use tdim to display values on a more granular view—weeks, months, or quarters. If a report meta has monthly values, the external datasource can also provide monthly values.
Sample Code
global with sharing class TPM_RTRReportingWrapper_AMS { global class PeriodMonth { global Integer year; global Integer start; global Integer total; } global class InputPayload{ global List <String> accountsfids; global List <String> productsfids; global PeriodMonth periodmonth; global List <String> kpis; global String responsetype; global String callingsfuser; } global class OutputRecord{ global String pdim; global String kdim; global String tdim; global Double v; global OutputRecord( String pdim, String kdim , String tdim , Double v){ this.pdim = pdim; this.kdim = kdim; this.tdim = tdim; this.v = v; } } }