Potential Savings Multi-Bank
Calculate potential savings summary from multi-bank fee analysis by comparing rates across banks
Potential Savings Multi-Bank
Calculate potential savings summary from multi-bank fee analysis. The function compares fees across multiple banks, groups data by categories, and returns the total potential savings for categories configured with savings calculation enabled.
Technical Name: PotentialSavingMultiBankFunc
Properties
- Execution Mode: SYNC
- Type: NATIVE
- Category: System Functions
- Function ID:
66e31772-bde2-4a8f-801d-c215b5cdc327
Input Schema
Required Parameters
| Parameter | Type | Description |
|---|---|---|
data | object | Report configuration object (MReportMaster) containing query with bank fee data |
The report query should include the following fields:
bank_name- Name of the bankname- Category nametotal_charges- Total charges for the servicevolume- Transaction volumeforex_rate- Foreign exchange rate for currency conversion
[Image placeholder: PotentialSavingMultiBank function configuration panel]
Input Example
{
"data": {
"reportConfig": {
"query": {
"selectFields": [
{
"fieldName": "bank_name",
"fieldAlias": "Bank"
},
{
"fieldName": "name",
"fieldAlias": "Category"
},
{
"fieldName": "total_charges",
"fieldAlias": "Total Charges"
},
{
"fieldName": "volume",
"fieldAlias": "Volume"
},
{
"fieldName": "forex_rate",
"fieldAlias": "Forex Rate"
}
],
"fromClause": {
"mobjectId": "bank-fee-mobject-uuid"
}
}
}
}
}Output Schema
| Field | Type | Description |
|---|---|---|
result | object | Summary object containing savings metric |
The result object contains:
| Field | Type | Description |
|---|---|---|
Savings | number (long) | Total potential savings (rounded to nearest integer) |
Output Example
{
"result": {
"Savings": 15000
}
}[Image placeholder: Potential savings output visualization]
How It Works
The function performs the following analysis:
-
Currency Conversion: Converts all charges to USD using forex rates:
total_charges_converted = total_charges × forex_rate -
Groups by Bank and Category: Groups fee data by bank name and category
-
Calculates Per-Unit Prices: Computes average price per unit for each bank-category combination:
per_unit = total_charges / total_primary_volume -
Organizes by Category: Structures results hierarchically by category and bank
-
Calculates Potential Savings: For categories with
include_l3_savingsflag enabled:- Compares per-unit prices across banks
- Calculates potential savings by identifying the minimum rate
- Aggregates savings across all eligible categories
-
Returns Summary: Returns total potential savings (rounded to nearest integer)
Category Configuration
Potential savings are only calculated for categories that have the include_l3_savings flag set to true in the Category Object. Categories without this flag will have savings set to 0.
Use Cases
Multi-Bank Savings Summary
Get a quick summary of potential savings across multiple banks:
{
"data": {
"reportConfig": {
"query": {
"selectFields": [
{"fieldName": "bank_name", "fieldAlias": "Bank"},
{"fieldName": "name", "fieldAlias": "Category"},
{"fieldName": "total_charges", "fieldAlias": "Charges"},
{"fieldName": "volume", "fieldAlias": "Volume"},
{"fieldName": "forex_rate", "fieldAlias": "Forex"}
],
"fromClause": {
"mobjectId": "bank-fee-mobject-uuid"
}
}
}
}
}Savings Dashboard
Display total potential savings in a dashboard:
Start → FetchMData(Bank Fees) → PotentialSavingMultiBank → DisplayDashboard → End[Image placeholder: Workflow example]
Related Functions
- Multi-Bank Fee Analysis - Generate detailed multi-bank fee analysis reports
- Potential Savings Intra-Bank - Calculate potential savings from intra-bank analysis
- Level 1 Analysis - Analyze intra-bank fee data with rate comparisons