This method calls one of the available FeeReversalHelperFunctions
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 value must be one of the following:
- getFeeReversalAttributes — Fetches the list of Service Process attributes for the Fee Reversal request.
- callCreateCaseApi — Creates a new Case and a related Service Process record with the transaction data.
args
Type: Map<String, Object>
The first three keys must be input, output, and options. The required content for each depends on the action:
-
getFeeReversalAttributes
- String caseId — Id of the Case created using the Fee Reversal OmniScript.
-
callCreateCaseApi
- Map<String,Object>
Usage
To use this class 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.
Examples
Input and output JSON examples for some of the actions are as follows.
getFeeReversalAttributes
Input format:
{"caseId": "500RM000003rQu1YAE"}
Output format:
{
"caseRequestAttr": {
"FinancialAccountId": "a0URM0000004OCM2A2",
"Transactions": [
{
"frt_reversal_transaction_description": "Reverse Cheque book charge",
"frt_reversal_amount_currency": "USD",
"frt_reversal_percentage": 100,
"frt_transaction_id": "12",
"frt_reversal_error_reason": null,
"frt_override_percentage": 80,
"frt_reversal_transaction_amount": 40,
"groupCorrelationNumber": 1,
"frt_transaction_code": "54",
"frt_override_amount_currency": "USD",
"frt_transaction_posted_date": "2022-11-11T12:53:14.000Z",
"frt_fee_type": "Cheque book charge",
"override_percentage_formatted": "80.0%",
"frt_override_amount": 40,
"frt_transaction_amount_currency": "USD",
"frt_transaction_description": "Fee charge for Cheque book",
"frt_reversal_transaction_posted_date": "2022-11-15T20:20:20.000Z",
"reversal_percentage_formatted": "100.0%",
"frt_transaction_amount": 50,
"frt_reversal_amount": 50,
"frt_reversal_transaction_id": "1001116623",
"frt_reversal_transaction_amount_currency": null
}
]
}
}
callCreateCaseApi
Input format:
{
"attributes": {
"data": {
"financial_account_id_1": {
"value": "accountId"
},
"source_system_id_1": {
"value": "100"
},
"reversal_reason_1": {
"value": null
},
"fee_reversal_transactions_1": {
"value": [
{
"frt_transaction_id_1": "12",
"frt_transaction_posted_date_1": "2022-11-11T12:53:14.924Z",
"frt_transaction_amount_1": 50,
"frt_transaction_amount_currency_1": "USD",
"frt_fee_type_1": "Check book charge",
"frt_transaction_code_1": "54",
"frt_reversal_amount_currency_1": null,
"frt_reversal_amount_1": null,
"frt_reversal_percentage_1": null,
"frt_override_amount_currency_1": null,
"frt_override_amount_1": null,
"frt_override_percentage_1": null,
"frtr_transaction_id_1": null,
"frtr_transaction_posted_date_1": null,
"frtr_transaction_description_1": null,
"frtr_transaction_amount_1": null,
"frtr_transaction_amount_currency_1": null,
"frtr_error_reason_1": null
}
]
},
"reversal_summary_1": {
"value": {
"reversal_transaction_status_1": null
}
}
}
},
"svcCatalogItemDefApiName": "Fee_Reversal_Test_2",
"caseInfo": {
"data": {
"Subject": {
"value": "Check book charge reversal"
},
"Origin": {
"value": "Phone"
}
}
}
}
Output format:
{
"svcCatalogRequestId": "946xx000000009hEAA",
"caseId": "500xx000000cd69AAA",
"caseNumber": "00001032"
}