Newer Version Available
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
- 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, 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:
1{ 2 "Option": "Income", 3 "Income": [ 4 { 5 "FinancialAccountName__c": "Simon Checking", 6 "PartyId__c": "001SB000003ECqnYAG", 7 "PartyName__c": "Simon Maurice", 8 "TransactionCategory__c": "Salary", 9 "TotalDepositsByCategory__c": 5000, 10 "FinancialAccountId__c": "a0USB0000005xYv2AI" 11 }, 12 { 13 "FinancialAccountName__c": "Simon Checking", 14 "PartyId__c": "001SB000003ECqnYAG", 15 "PartyName__c": "Simon Maurice", 16 "TransactionCategory__c": "Salary", 17 "TotalDepositsByCategory__c": 5000, 18 "FinancialAccountId__c": "a0USB0000005xYv2AI" 19 }, 20 { 21 "FinancialAccountName__c": "Simon Checking", 22 "PartyId__c": "001SB000003ECqnYAG", 23 "PartyName__c": "Simon Maurice", 24 "TransactionCategory__c": "Bonus", 25 "TotalDepositsByCategory__c": 5000, 26 "FinancialAccountId__c": "a0USB0000005xYv2AI" 27 } 28 ] 29}Expenses example:
1{ 2 "Option": "Expenses", 3 "Income": [ 4 { 5 "FinancialAccountName__c": "Simon Checking", 6 "PartyId__c": "001SB000003ECqnYAG", 7 "PartyName__c": "Simon Maurice", 8 "TransactionCategory__c": "Car Payment", 9 "TotalExpensesByCategory__c": 10000, 10 "FinancialAccountId__c": "a0USB0000005xYv2AI" 11 } 12 ] 13}
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.
1{
2 "TotalAmount": 15000,
3 "Data": [
4 {
5 "Amount": 10000,
6 "Category": "Salary $10000 (67%)"
7 },
8 {
9 "Amount": 5000,
10 "Category": "Bonus $5000 (33%)"
11 }
12 ]
13}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.