Zumzum Financials Knowledge Base
Overview:
The Zumzum Financials Bank Receipt API service provides the following capabilities
- Post a Bank Receipt to the general ledger
Bank Receipt Description
The Bank Receipt objects are an ideal integration point to create transactions in Zumzum Financials from Salesforce. You should be aware of the following:
- Bank Receipts are automatically posted to the Zumzum Financials general ledger.
- When using the BankReceiptService Apex class, you will be creating the Batch Bank Receipt Record, with Bank Receipts and Bank Receipt Lines and the Ledger records.
- All Bank Receipt Line Item values will need to be provided as a positive number as negative amounts are not supported. If you wish to reverse a transaction to a bank account, then you will need to post the opposite transaction, e.g. a Bank Payment (both should be included in your Bank Reconciliation process)
- You are unable to un post or delete a Bank Receipt and it’s associated records once you have posted to the ledger.
The BankReceiptService function will accept the list of ‘BankReceiptWrapper’ as an input parameter. Below are the required fields when a Bank Receipt is created.
BankReceiptWrapper API Fields
Object Name | Field Name | API Name | Data Type | Required |
---|---|---|---|---|
BankReceiptWrapper | Reference | Reference | String | No |
BankReceiptWrapper | Bank | BankAccountId | Lookup (Zumzum__Bank_Account__c) | Yes |
BankReceiptWrapper | Date | PostingDate | Date | Yes |
BankReceiptWrapper | Tax Rate | TaxRate | Lookup (Zumzum_Tax_Rate__c) | Yes |
BankReceiptWrapper | Nominal Account | NominalAccount | Lookup (Zumzum_Nominal_Account__c) | Yes |
BankReceiptWrapper | Amount | Amount | Decimal (2 decimal places) | Yes |
BankReceiptWrapper | Details | Details | String (255) | No |
Create a Bank Receipt – CreateBankReceipt Method
Below is information related on how to post a Bank Receipt with the Bank Receipt API service using Apex code. Zumzum Financials includes a global class called BankReceiptService which you may call from your own Apex code. The CreateBankReceipt method is used to insert a Batch Bank Receipt record, with a Bank Receipt, Bank Receipt Lines and ledger records. The service returns a list of Bank Receipt records created.
Global Class Name | Method | Input | Output |
---|---|---|---|
BankReceiptService | CreateBankReceipt | List “BankReceiptWrapper” | List of type object, e.g. “Bank_Receipt__c” |
Sample Code: Post Bank Receipt
This example is provided to help you begin creating your own custom code. The code will post a single Batch Bank Receipt record, with a Receipt Line and three ledger records (if using a Tax code that generates a ledger entry). The following steps will be performed:
- Prepare the list collection “List<BankReceiptWrapper>” to supply as an input for the CreateBankReceipt function.
- Post the Bank Receipt
- Return a list of the Bank Receipt created with “Bank_Receipt__c”
Sample Code :
/* Create and Post A Bank Receipt */ zumzum.BankReceiptService.BankReceiptWrapper objBankReceiptWrapper = new zumzum.BankReceiptService.BankReceiptWrapper(); /* Provide the input for BankReceiptWrapper */ List<zumzum.BankReceiptService.BankReceiptWrapper> listOfWrapper = new List<zumzum.BankReceiptService.BankReceiptWrapper>(); /* Define the data fields for the Bank Receipt */ objBankReceiptWrapper.PostingDate =Date.Today(); objBankReceiptWrapper.NominalAccount ='a0i3H00000000LYQAY'; objBankReceiptWrapper.TaxRate ='a173H0000008OciQAE'; objBankReceiptWrapper.BankAccountId = 'a0K3H000000ExmXUAS'; objBankReceiptWrapper.Amount = 100; objBankReceiptWrapper.Details = 'test-1'; listOfWrapper.add(objBankReceiptWrapper); /* Execute the command to Post a Bank Receipt */ zumzum.BankReceiptService objBankService = new zumzum.BankReceiptService(); zumzum.BankReceiptService.BankReceiptResponse objResponse = objBankService.CreateBankReceipt(listOfWrapper); system.debug('objResponse>> ' + objResponse);
Below are a list of error codes that are returned by the Bank Receipt Service.
Supported Error Codes – Bank Receipt Service (API)
Error Message | Reason | Resolution |
---|---|---|
“BankReceiptResponse:[ResponseMessage=Success, bankReceipts=null]” | The list of Bank Receipts does not contain a Bank Receipt Line. | Submit the BankReceiptWrapper with all the necessary fields, for a Bank Receipt Line to be created |
[ResponseMessage= |
The Bank Receipt line value is zero | Submit the BankReceiptWrapper with the “Amount” value greater than 0.00 |
“BankReceiptResponse:[ResponseMessage= |
Tax Rate is missing from the Bank Receipt Line | Submit the BankReceiptWrapper with the “TaxRate” value as an ID to the Zumzum_Tax_Rate__c record to be used as your tax rate for this line item. |
“[ResponseMessage= |
Nominal Account is missing from the Bank Receipt Line | Submit the BankReceiptWrapper with the “NominalAccount” value as an ID to the Zumzum_Nominal_Account__c record to be used for this line item. |
“[ResponseMessage= “ |
Bank Account is missing from the Bank Receipt Line | Submit the BankReceiptWrapper with the “BankAccount” value as an ID to the Zumzum_Bank_Account__c record to be used for this line item. |
“[ResponseMessage= |
Date is missing from the Bank Receipt Line | Submit the BankReceiptWrapper with the “PostingDate” value to be used for this line item. |
“[ResponseMessage= |
The value provided to Detail has exceeded the 255 character limit. | Submit the BankReceiptWrapper with the “Detail” value with 255 characters or less. |
Learn more about leveraging the Zumzum Financials API to create your own integration.