Monetize360
WorkflowsFunctionsSystem Functions

Intra-Bank Fee Detail Report

Generate detailed reports for intra-bank fee analysis showing transaction details and potential savings

Intra-Bank Fee Detail Report

Generates detailed reports for intra-bank fee analysis. The function identifies services with multiple pricing tiers, calculates potential savings by comparing actual charges against minimum rates, and returns comprehensive transaction-level details.

Technical Name: IntraBankFeeDetailReportFunc

Properties

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

Input Schema

Required Parameters

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

The report query should include the following fields:

  • bank_service_description - Name/description of the bank service
  • bank_name - Name of the bank
  • from_date - Start date of the period
  • to_date - End date of the period
  • account_number - Account number
  • account_region - Account region
  • branch_name - Branch name
  • unit_price - Unit price/rate for the service
  • volume - Transaction volume
  • total_charges - Total charges for the service
  • forex_rate - Foreign exchange rate
  • currency_code - Currency code

[Image placeholder: IntraBankFeeDetailReport function configuration panel]

Input Example

{
  "data": {
    "reportConfig": {
      "query": {
        "selectFields": [
          {
            "fieldName": "bank_service_description",
            "fieldAlias": "Service"
          },
          {
            "fieldName": "bank_name",
            "fieldAlias": "Bank"
          },
          {
            "fieldName": "from_date",
            "fieldAlias": "From Date"
          },
          {
            "fieldName": "to_date",
            "fieldAlias": "To Date"
          },
          {
            "fieldName": "account_number",
            "fieldAlias": "Account"
          },
          {
            "fieldName": "unit_price",
            "fieldAlias": "Unit Price"
          },
          {
            "fieldName": "volume",
            "fieldAlias": "Volume"
          },
          {
            "fieldName": "total_charges",
            "fieldAlias": "Total Charges"
          },
          {
            "fieldName": "forex_rate",
            "fieldAlias": "Forex Rate"
          }
        ],
        "fromClause": {
          "mobjectId": "bank-fee-mobject-uuid"
        }
      }
    }
  }
}

Output Schema

FieldTypeDescription
resultarrayArray of detailed fee report objects

Each object in the result array contains:

FieldTypeDescription
BankstringBank name
Period FromdateStart date of the period
Period TodateEnd date of the period
Account NumberstringAccount number
Bank Service DescriptionstringDescription of the bank service
Account RegionstringAccount region
Branch NamestringBranch name
Unit PricenumberUnit price/rate for the service
VolumenumberTransaction volume
Total ChargesnumberTotal charges for the service
Min RatenumberMinimum rate found for this service
Rearranged ChargesnumberCharges if using minimum rate (forex_rate × volume × min_rate)
SavingsnumberPotential savings (total_charges - rearranged_charges)

Output Example

{
  "result": [
    {
      "Bank": "ABC Bank",
      "Period From": "2024-01-01",
      "Period To": "2024-01-31",
      "Account Number": "ACC123456",
      "Bank Service Description": "Wire Transfer",
      "Account Region": "North",
      "Branch Name": "Main Branch",
      "Unit Price": 0.30,
      "Volume": 1000,
      "Total Charges": 300.00,
      "Min Rate": 0.25,
      "Rearranged Charges": 250.00,
      "Savings": 50.00
    }
  ]
}

[Image placeholder: Report output visualization]

How It Works

The function performs the following analysis:

  1. Groups by Service: Groups fee data by bank service description
  2. Finds Minimum Rate: Identifies the minimum unit price for each service
  3. Filters Multi-Price Services: Only includes services with multiple distinct prices (more than one pricing tier)
  4. Calculates Rearranged Charges: Computes what charges would be at minimum rate:
    rearranged_charges = forex_rate × volume × min_rate
  5. Calculates Savings: Compares actual charges against rearranged charges:
    savings = total_charges - rearranged_charges
  6. Filters Positive Savings: Only returns records where savings > 0

Use Cases

Detailed Fee Analysis Report

Generate comprehensive reports showing transaction-level fee details and savings:

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

Cost Optimization Workflow

Analyze fees and export detailed savings report:

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

[Image placeholder: Workflow example]