Supplier Import in Fusion via FBDI in OIC
We can Bulk Upload Certain types of data like Invoices, Suppliers etc. in Oracle Fusion, this can be achieved by leveraging the FBDI import capabilities of the Oracle ERP Cloud Adapter of OIC
.
But before we go forward with the actual integration there are few prerequisites:
Download FBDI Template from the below link:
https://docs.oracle.com/en/cloud/saas/procurement/23c/oefbp/index.html#COPYRIGHT_0000
Get the Job definition and package name from your fusion instance
See the below blog on how to fetch it
In this Blog we are going to see how we can import Suppliers into Oracle Fusion Cloud.
For this we will write two Integration:
Integration A: Which will Import the Data to Fusion
Integration B: Which will Fetch the Status of the Import
Lets Start With Integration A:
Step1: Create a Scheduled Integration and name it “SupplierFBDI” which will poll for Supplier Extract files placed in sFTP server and convert it to FBDI format and send it to ERPC.
Step2: Add the FTP adapter of your source and select the list file Operation, specify the directory in which the Invoice Extracts will be placed
Step3: Add a For Each Loop and Iterate over the response received from the list file operation, inside the for-each add the FTP adapter and select the Download File Operation and download the file to a stage directory called ‘/tmp’
Step4: Map the filename and directory from the Current-File Source
Step5: After the Download File add Stage file Activity and Select the Read File in Segments operation and specify the structure of the file you received in your sFTP Server.
Your Integration Should Look Like below
Step6: Inside the Read File in Segments add another Stage File activity to create the FBDI File and select the Write File Operation here, specify the directory as ‘/fbdi’ and specify the structure of the file as the FBDI template you downloaded from the Oracle Website and Map the fields accordingly.
Step7: Now we will add another Stage File activity after the ReadFileInChunks to create the properties file with the details we fetched from Oracle Fusion previously, by using the Write File Operation and specify the directory as ‘/fbdi’, the extension of this file should be ‘.properties’
The structure will be as below:
<job package name>,<job definition name>,<zip file prefix>,<Param1>,<Param2>,<Param3>,<Param4>,<Param5>,<Param6>,<Param7>,<Param8>,<Param9>,<Param10>,<Param11>,<Param12>,<Param13>,<Param14>,<Param15>,<Param16>,<Param17>,<Param18>,<Param19>,<Param20>,<Param21>,<Param22>,<Param23>,<Param24>
Here job package name as the job path and job definition name as job name, zip prefix will be the prefix of the zip file we will create.
The Integration should look like this:
Step8: After that we will add another stage file activity and this time we will select the zip file operation and zip the ‘/fbdi’ directory, the extension should be ‘.zip’
Step9: Add the ERP adapter for your target Fusion Instance and select the ‘Import Bulk Data into Oracle ERP Cloud’ operation and select ‘Import Suppliers’ option.
Check the checkbox ‘Enable Callback’, this is necessary for our Integration B to receive the Import Status event.
Step10: Map the File Reference of Zip Activity to the Import Suppliers operation.
Your Integration A should look like below:
Save and Activate it.
Integration B:
Step1: Create an App-Driven Integration and name it ‘SupplierFBDICallback’
Step2: Add the ERPC adapter as trigger and select the ‘Receive Callback Event upon FBDI bulk import job’ and select download options as ‘Always’ and select ‘Import Suppliers’ as the Bulk Data Import Process.
Step3: Add a Stage File activity to write the file received from event to a temporary directory ‘/tmp’
Specify the Schema as an opaque schema
Step4: Encode the File Reference to base64 and Map it to opaque element
Step5: Add another Stage File Activity to unzip the zip attachment we wrote in the temporary directory, to the directory ‘/unzip’
Step6: Add another Stage file Activity which will list the files present in the temporary directory ‘/unzip’ and specify the file pattern as ‘*.pdf’
Step7: Add a Notification activity and map the file reference we received from the Stage File List response to the attachment of the Notification and configure the Notification as below:
Your Integration B should look like below:
Save and Activate it.
Now lets test it by placing the Supplier Extract to the sFTP server and triggering the Integration A on ad-hoc.
We can see that the Integration A has successfully been completed
And Our Callback Integration has received the Event and Notification was successfully sent
And we have received the email with the attachment