Oracle ERP Cloud provides REST APIs to view and manage the data. We can use these REST APIs to import the data into Oracle ERP Cloud using OIC REST Adapter. This blog will consider importing of Oracle AR Receipts using REST API by using OIC built-in adapters.
Steps to Build Integration:
- List the input files from the FTP adapter.
- Download the file to the OIC staging and read the file.
- Loop over the records and check if invoices are present by validating it against BIP report.
- Cash receipts are created using REST API for the invoices present.
Below are detailed steps to achieve this integration
- Connections in the left pane of OIC, the connections are created. Connections are configured by selecting the required adapters and providing the credentials.
- In the Integrations pane, Schedule Orchestration is selected in Create for building new integration.
- The FTP Adapter is configured and is used as invoke to list the input files from the source FTP which contains the data to be processed.
- The files are downloaded to the OIC stage. These files are used to read by uploading csv template to read records in the file. For-Each loop is used within the integration to read the records line by line.
- SOAP Adapter is configured to run BIP (BI Publisher) report, which is used to validate if the invoice present in the file exist in Oracle. The Output of the report is generated in bytes is decoded to reference and an opaque element is used to read the data from the report. Please note this is an optional step, required if we want to pass the remittance information.
- After the validation of the data with the BIP report, a switch is used and if the invoice is present in the Oracle fusion, REST Adapter is triggered to post AR Cash Receipts. REST Adaptor is configured in scope, to process all the records and fault handler within the scope enables to process all records and failed records are sent via email notification. The below sample json is passed in the REST adapter and the values from the input file are mapped to the request in the mapper accordingly:
REST End Point URL for creating receipts:
Sample Request Body
- FTP AdapterFTP Connection Host Address:
FTP Server Port:
- SOAP Adapter
Url: https://<<erp hostname>>/
- REST Adapter
References: REST API can be obtained from the below link