Monetize360
WorkflowsFunctionsSystem Functions

Level 1 Analysis

Analyze intra-bank fee data to generate summary reports with rate comparisons, volume breakdowns, and potential savings

Level 1 Analysis

Generates comprehensive intra-bank fee summary reports. The function analyzes fee data across banks, services, countries, and currencies to identify rate variations, calculate fee changes, and estimate potential savings.

Technical Name: Level1AnalysisFunc

Properties

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

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
  • bank_service_description - Description of the bank service
  • name - Country name
  • currency_name - Currency name
  • from_date - Start date of the period
  • to_date - End date of the period
  • unit_price - Unit price/rate for the service
  • volume - Transaction volume

[Image placeholder: Level1Analysis function configuration panel]

Input Example

{
  "data": {
    "reportConfig": {
      "query": {
        "selectFields": [
          {
            "fieldName": "bank_name",
            "fieldAlias": "Bank"
          },
          {
            "fieldName": "bank_service_description",
            "fieldAlias": "Service"
          },
          {
            "fieldName": "name",
            "fieldAlias": "Country"
          },
          {
            "fieldName": "currency_name",
            "fieldAlias": "Currency"
          },
          {
            "fieldName": "from_date",
            "fieldAlias": "From Date"
          },
          {
            "fieldName": "to_date",
            "fieldAlias": "To Date"
          },
          {
            "fieldName": "unit_price",
            "fieldAlias": "Unit Price"
          },
          {
            "fieldName": "volume",
            "fieldAlias": "Volume"
          }
        ],
        "fromClause": {
          "mobjectId": "bank-fee-mobject-uuid"
        }
      }
    }
  }
}

Output Schema

FieldTypeDescription
resultarrayArray of Level 1 analysis objects

Each object in the result array contains:

FieldTypeDescription
BankstringBank name
Bank Service DescriptionstringDescription of the bank service
CountrystringCountry name
Currency LCYstringCurrency name
RatenumberCurrent rate for this service
Minimum RatenumberMinimum rate found for this service
Total VolumenumberTotal transaction volume
Total FeesnumberTotal fees paid (total_volume × rate)
Total Fee Increase/DecreasenumberFee change compared to current rate (positive = increase, negative = decrease)
Potential SavingsnumberPotential savings if using minimum rate (for current month)
Last Month ChargestringLast month when charges were applied (or "Current Price")
Volume Per MontharrayArray of volume breakdowns by month
[Month Name]numberCustom fields for each month (e.g., "Jan 2024", "Feb 2024") showing volume

The result also includes summary rows per bank:

  • Fee Increase During Analysis Period - Total fee increases for the bank
  • Fee Decrease During Analysis Period - Total fee decreases for the bank

Output Example

{
  "result": [
    {
      "Bank": "ABC Bank",
      "Bank Service Description": "Fee Increase During Analysis Period",
      "Total Fee Increase/Decrease": 5000.00
    },
    {
      "Bank": "ABC Bank",
      "Bank Service Description": "Fee Decrease During Analysis Period",
      "Total Fee Increase/Decrease": -2000.00
    },
    {
      "Bank": "ABC Bank",
      "Bank Service Description": "Wire Transfer",
      "Country": "United States",
      "Currency LCY": "USD",
      "Rate": 0.30,
      "Minimum Rate": 0.25,
      "Total Volume": 10000,
      "Total Fees": 3000.00,
      "Total Fee Increase/Decrease": 500.00,
      "Potential Savings": 500.00,
      "Last Month Charge": "Current Price",
      "Volume Per Month": [
        {
          "from_date": "2024-01-01",
          "to_date": "2024-01-31",
          "volume": 5000
        }
      ],
      "Jan 2024": 5000.00
    }
  ]
}

[Image placeholder: Level 1 analysis output visualization]

How It Works

The function performs the following analysis:

  1. Groups by Dimensions: Groups fee data by bank, service, country, and currency
  2. Finds Rate Variations: Identifies services with multiple pricing tiers (more than one distinct price)
  3. Calculates Minimum Rate: Finds the minimum rate for each service group
  4. Aggregates Volumes: Sums volumes by rate and groups volume per month
  5. Calculates Fee Metrics:
    • Total fees paid = total_volume × rate
    • Fee increase/decrease = (current_rate - rate) × total_volume
    • Potential savings = volume × (rate - min_rate) for current month
  6. Identifies Current Rate: Marks the latest month's rate as "Current Price"
  7. Adds Summary: Includes bank-level summaries showing total fee increases and decreases

Use Cases

Bank Fee Summary Report

Generate comprehensive fee analysis across banks and services:

{
  "data": {
    "reportConfig": {
      "query": {
        "selectFields": [
          {"fieldName": "bank_name", "fieldAlias": "Bank"},
          {"fieldName": "bank_service_description", "fieldAlias": "Service"},
          {"fieldName": "unit_price", "fieldAlias": "Rate"},
          {"fieldName": "volume", "fieldAlias": "Volume"}
        ],
        "fromClause": {
          "mobjectId": "bank-fee-mobject-uuid"
        },
        "where": [
          {
            "field": "from_date",
            "operator": "greaterThanOrEquals",
            "value": "2024-01-01"
          }
        ]
      }
    }
  }
}

Multi-Bank Fee Comparison

Compare fee structures across multiple banks:

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

[Image placeholder: Workflow example]