Zumzum Financials Knowledge Base
Overview:
The Zumzum Financials Supplier Refund API service provides the following capabilities
- Post a Supplier Refund to the general ledger
Bank Supplier Refund Description
The Supplier Refund objects are an ideal integration point to create transactions in Zumzum Financials from Salesforce. You should be aware of the following:
- Supplier Refunds are automatically posted to the Zumzum Financials general ledger as Bank Receipts.
- When using the BankSupplierRefundService Apex class, you will be creating a Bank Receipt Record, with Bank Receipt, Bank Receipt Lines and the Ledger records.
- You are unable to un post or delete a Supplier Refund / Bank Receipt and it’s associated records once you have posted to the ledger.
The BankSupplierRefundService method will accept the list of ‘BankSupplierRefundWrapper’ as an input parameter. Below are the required fields when a Bank Supplier Refund is created.
Create a Bank Supplier Refund – CreateBankSupplierRefund Method
Below is information related to how to post a Bank Supplier Refund with the Bank Supplier Refund API service using Apex code. Zumzum Financials includes a global class called BankSupplierRefundService which you may call from your own Apex code. The CreateBankSupplierRefund method is used to insert Batch Bank Receipt records, with Bank Receipts, Bank Receipt Lines, and ledger records. The service returns a list of Bank Receipt records created.
Sample Code: Create Bank Supplier Refund
This example is provided to help you begin creating your own custom code. The code will post a single Supplier Refund record, with a single Bank Receipts, containing a single Bank Receipt Line Item 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<RefundWrapper>” to supply as an input for the CreateBankSupplierRefund function.
- Post the Bank Supplier Refund
- Return a list of the Bank Supplier Refund created with “Bank_Receipt”
Sample Code :
/**************Create Supplier Refund*****************************/ // Create a new instance of the Bank Supplier Refund Service. zumzumBankSupplierRefundService objSupplierRefundService = new zumzum.BankSupplierRefundService(); // Declare the Bank Supplier Refund Wrapper zumzum.BankSupplierRefundService.BankSupplierRefundWrapper objRefundWrapper = new zumzum.BankSupplierRefundService.BankSupplierRefundWrapper(); // Add variables to the Bank Supplier Refund Wrapper objRefundWrapper.AccountID = '0012600000yKYhj'; objRefundWrapper.PostingDate = Date.Today(); objRefundWrapper.BankAccountId = 'a032600000IQwSj'; objRefundWrapper.TaxRate = 'a1H260000019Qva'; objRefundWrapper.Amount = 5; // Execute the command to create the Bank Supplier Refund zumzum.BankSupplierRefundService.Response objResponse = objSupplierRefundService.CreateBankSupplierRefund(objRefundWrapper); system.debug('Response>>' + objResponse.ResponseMessage); // Receive a list of the Bank Receipts created for the Supplier Refund system.debug('BankReceipts >>' + objResponse.BankReceipts ); /**********************************************************/
Learn more about Apex Codes here. Find out more about leveraging the Zumzum Financials API to create your integration.