Monetize360
WorkflowsFunctionsSystem Functions

Multi-Bank Fee Analysis

Generate comprehensive multi-bank fee analysis reports comparing fees across banks by category with percentage breakdowns

Multi-Bank Fee Analysis

Generates comprehensive multi-bank fee analysis reports. The function compares fees across multiple banks, groups data by categories, converts all charges to USD, and provides percentage breakdowns for sub-categories.

Technical Name: MultiBankFeeAnalysisFunc

Properties

  • Execution Mode: SYNC
  • Type: NATIVE
  • Category: System Functions
  • Function ID: 66e31772-bde2-4a8f-801d-c215b5cdc328

Input Schema

Required Parameters

ParameterTypeDescription
dataobjectReport configuration object (MReportMaster) containing query with bank fee data

The report query should include the following fields:

  • bank_name - Name of the bank
  • name - Category name
  • total_charges - Total charges for the service
  • volume - Transaction volume
  • forex_rate - Foreign exchange rate for currency conversion

[Image placeholder: MultiBankFeeAnalysis 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

FieldTypeDescription
resultobjectResult object containing analysis data
result.dataarrayArray of Level 3 analysis objects
result.countintegerNumber of categories analyzed

Each object in the result.data array contains:

FieldTypeDescription
BankstringBank name (for parent category rows)
Custom Category DescriptionstringCategory or sub-category name
Bank Service DescriptionstringBank service description (for sub-categories)
CategorystringParent category name
Total ChargesnumberTotal charges (converted to USD)
Total VolumenumberTotal transaction volume
Total Primary ChargesnumberTotal primary charges (converted to USD)
Total Primary VolumenumberTotal primary volume
Potential SavingsnumberPotential savings (only for categories with include_l3_savings flag)
PercentbooleanWhether this row shows percentage breakdown
[Bank Name] SpendnumberCustom field: Total spend for this bank (or percentage if Percent=true)
[Bank Name] Primary VolumenumberCustom field: Primary volume for this bank (or percentage if Percent=true)
[Bank Name] Per unitnumberCustom field: Average price per unit for this bank

Output Example

{
  "result": {
    "data": [
      {
        "Custom Category Description": "Payment Services",
        "Category": "Payment Services",
        "ABC Bank Spend": 50000,
        "ABC Bank Primary Volume": 100000,
        "ABC Bank Per unit": 0.50,
        "XYZ Bank Spend": 45000,
        "XYZ Bank Primary Volume": 90000,
        "XYZ Bank Per unit": 0.50,
        "Potential Savings": 5000
      },
      {
        "Custom Category Description": "Wire Transfer",
        "Bank Service Description": "Wire Transfer",
        "Category": "Payment Services",
        "ABC Bank Spend": 30000,
        "ABC Bank Primary Volume": 60000,
        "ABC Bank Per unit": 0.50,
        "XYZ Bank Spend": 25000,
        "XYZ Bank Primary Volume": 50000,
        "XYZ Bank Per unit": 0.50
      },
      {
        "Custom Category Description": "Payment Services Percentages",
        "Category": "Payment Services",
        "Percent": true,
        "ABC Bank Spend": 0.60,
        "ABC Bank Primary Volume": 0.60,
        "XYZ Bank Spend": 0.56,
        "XYZ Bank Primary Volume": 0.56
      }
    ],
    "count": 3
  }
}

[Image placeholder: Multi-bank analysis output visualization]

How It Works

The function performs the following analysis:

  1. Currency Conversion: Converts all charges to USD using forex rates:

    total_charges_converted = total_charges × forex_rate
  2. Groups by Bank and Category: Groups fee data by bank name and category

  3. Aggregates Metrics: Sums charges and volumes for each bank-category combination

  4. Organizes by Category: Structures results hierarchically:

    • Parent category rows show totals across all banks
    • Sub-category rows show breakdowns by bank service
    • Percentage rows show child category percentages relative to parent
  5. Calculates Per-Unit Prices: Computes average price per unit for each bank:

    per_unit = total_charges / total_primary_volume
  6. Calculates Potential Savings: For categories with include_l3_savings flag, calculates potential savings by comparing rates across banks

  7. Adds Percentage Breakdowns: Creates percentage rows showing how sub-categories contribute to parent categories

Use Cases

Multi-Bank Fee Comparison

Compare fees across multiple banks by category:

{
  "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"
        }
      }
    }
  }
}

Category-Based Analysis

Analyze fee distribution across categories and banks:

Start → FetchMData(Bank Fees) → MultiBankFeeAnalysis → Export → End

[Image placeholder: Workflow example]