---
schema_version: "1"
id: dfbee541ce6509c965e17c292b22415ce6a2310339ef0ec1acac01843de233fc
title: CalculateIncomeExpenseSummary
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/financial_services_cloud_object_reference/apex_fsccashflow_calculateincomeexpensesummary.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.financial_services_cloud_object_reference.meta/financial_services_cloud_object_reference/apex_fsccashflow_calculateincomeexpensesummary.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e34b9790dc76edc52b85f04e689b8830fd606a9a3c216456e3481ed8a790a7e3
description: Calculates the monthly income, total income, average monthly income, monthly expense, total expense, average monthly expense from a list of income and expenses provided.
---
# CalculateIncomeExpenseSummary

Calculates the monthly income, total income, average monthly income, monthly expense, total expense, average monthly expense from a list of income and expenses provided.

## Signature

call(String action, Map<String, Object\> args

## Return Value

Returns income and expense details.

## Examples

Input and output JSON example of the actions are as follows.

Input format:

\[
    {
        "Duration": "12",
        "PartyExpenseList": \[
            {
                "Name": "PE-0000000004",
                "UsageType": "CashFlow",
                "RecurrenceInterval": "Monthly",
                "Type": "Child Care",
                "Id": "2n3SG000007dkzpYAA",
                "TotalAmount": 999.99,
                "PartyId": "001SG000004TCczYAG",
                "Status": "Active",
                "StartDate": "2024-01-29T08:00:00.000Z"
            }
        \],
        "PartyIncomeList": \[
            {
                "Name": "PI-0000000003",
                "UsageType": "CashFlow",
                "IncomeFrequency": "Monthly",
                "IncomeType": "Salary",
                "Id": "2m3SG000007dkzpYAA",
                "IncomeAmount": 999.99,
                "PartyId": "001SG000004TCczYAG",
                "IncomeStatus": "Active",
                "StartDate": "2024-01-29T08:00:00.000Z"
            }
        \]
    }
\]

Output format:

\[
    {
        "MonthlyIncome": {
            "Nov 2023": 0,
            "Aug 2024": 999.99,
            "Oct 2023": 0,
            "Jan 2024": 96.7732258064516,
            "Mar 2024": 999.99,
            "Jul 2024": 999.99,
            "Apr 2024": 999.99,
            "Dec 2023": 0,
            "Jun 2024": 999.99,
            "Sep 2024": 999.99,
            "Feb 2024": 999.99,
            "May 2024": 999.99
        },
        "MonthlyExpense": {
            "Nov 2023": 0,
            "Aug 2024": 999.99,
            "Oct 2023": 0,
            "Jan 2024": 96.7732258064516,
            "Mar 2024": 999.99,
            "Jul 2024": 999.99,
            "Apr 2024": 999.99,
            "Dec 2023": 0,
            "Jun 2024": 999.99,
            "Sep 2024": 999.99,
            "Feb 2024": 999.99,
            "May 2024": 999.99
        },
        "AvgMonthlyExpense": 674.72,
        "TotalIncome": 8096.69,
        "TotalSurplus": 0,
        "AvgMonthlyIncome": 674.72,
        "AvgMonthlySurplus": 0,
        "TotalExpense": 8096.69
    }
\]