---
schema_version: "1"
id: 42f0466aff04b6824a72fb3cc06a6c5d105f750fff4a1598dc2d1bc914ec9dcd
title: call(action, args)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/financial_services_cloud_object_reference/apex_industriespersonalizedfinance_FSCPersonalizedFinanceUtil_call.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.financial_services_cloud_object_reference.meta/financial_services_cloud_object_reference/apex_industriespersonalizedfinance_FSCPersonalizedFinanceUtil_call.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b5648fb032cf77f95472454d114821ab6cf0cece2fa44d0f1375347508284f79
description: This method calls one of the available FSCPersonalizedFinanceUtil actions and passes arguments to that action.
---
# call(action, args)

This method calls one of the available FSCPersonalizedFinanceUtil actions and passes arguments to that action.

## Signature

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

## Parameters

### action

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_methods_system_string.htm)

The action to call. The only action is getIncomeExpenseCategories.

- getIncomeExpenseCategories — Retrieves categorized income or expenses to populate the Income or Expenses pie chart in the Cash Flow FlexCard.

### args

Type: Map<[String](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_methods_system_string.htm), Object>

The arguments passed to the corresponding action. All actions require input, output, and options arguments, but these arguments can be empty if the action doesn’t use them. Values listed here are for the input argument.

- getIncomeExpenseCategories — Accepts an Option argument, set to Income or Expense, followed by an Income or Expense list, as in the following examples. This Option argument is different from the standard options argument, which is empty for this action.

Income example:

{
  "Option": "Income",
  "Income": \[
    {
      "FinancialAccountName\_\_c": "Simon Checking",
      "PartyId\_\_c": "001SB000003ECqnYAG",
      "PartyName\_\_c": "Simon Maurice",
      "TransactionCategory\_\_c": "Salary",
      "TotalDepositsByCategory\_\_c": 5000,
      "FinancialAccountId\_\_c": "a0USB0000005xYv2AI"
    },
    {
      "FinancialAccountName\_\_c": "Simon Checking",
      "PartyId\_\_c": "001SB000003ECqnYAG",
      "PartyName\_\_c": "Simon Maurice",
      "TransactionCategory\_\_c": "Salary",
      "TotalDepositsByCategory\_\_c": 5000,
      "FinancialAccountId\_\_c": "a0USB0000005xYv2AI"
    },
    {
      "FinancialAccountName\_\_c": "Simon Checking",
      "PartyId\_\_c": "001SB000003ECqnYAG",
      "PartyName\_\_c": "Simon Maurice",
      "TransactionCategory\_\_c": "Bonus",
      "TotalDepositsByCategory\_\_c": 5000,
      "FinancialAccountId\_\_c": "a0USB0000005xYv2AI"
    }
  \]
}

Expenses example:

{
  "Option": "Expenses",
  "Income": \[
    {
      "FinancialAccountName\_\_c": "Simon Checking",
      "PartyId\_\_c": "001SB000003ECqnYAG",
      "PartyName\_\_c": "Simon Maurice",
      "TransactionCategory\_\_c": "Car Payment",
      "TotalExpensesByCategory\_\_c": 10000,
      "FinancialAccountId\_\_c": "a0USB0000005xYv2AI"
    }
  \]
}

## Return Value

Type: Map<String, Object>

The return values of the corresponding action, returned in the output argument.

- getIncomeExpenseCategories — Returns total income or expenses under the TotalAmount key and categorized amounts and percentages under the Data key, as in the following example. If there are more than five categories, the sixth and subsequent categories are grouped.

{
  "TotalAmount": 15000,
  "Data": \[
    {
      "Amount": 10000,
      "Category": "Salary  $10000 (67%)"
    },
    {
      "Amount": 5000,
      "Category": "Bonus  $5000 (33%)"
    }
  \]
}

## Usage

To use this method in an Integration Procedure, specify the class in the Remote Class property, the action in the Remote Method property, and the arguments in the Additional Input property.