Export Purchase Orders from Oracle ERP Cloud to an FTP Server
Use this recipe to subscribe to an Oracle ERP Cloud business event. This recipe subscribes to a business event that Oracle ERP Cloud raises when a purchase order is created, and writes the purchase order data to a file on an FTP file server.
Note:
This recipe is available as ERP Cloud - FTP Server | Business Event in the Integration Store. Oracle provides this recipe as a sample only. The recipe is meant only for guidance, and is not warranted to be error-free. No support is provided for this recipe.
Overview
This recipe registers with Oracle ERP Cloud Business Event services. When a purchase order is created, Oracle ERP Cloud Business Event services invokes the integration that in turn, adds the purchase order data to a file on an FTP file server.
You can store the file in File Server, an SFTP server embedded in Oracle Integration.
A purchase event in Oracle ERP Cloud triggers the integration. The integration reads from the lookup values where to store the CSV file in the FTP file server, then maps the values of the purchase order to the fields in the CSV file, and finally appends a line with the purchase order values to the file. If the file doesn't exist, it creates a new file.
The CSV file contains the following fields:
- Creation Date
- Order Number
- Supplier
- Buyer Name
- Currency
- Total Amount
The Order Number
field is mandatory. The rest of the fields are optional.
If there is an issue while running the integration, the fault handler adds the issue and its cause to the logs. You can use these logs to troubleshoot the issue.
The integration that results from installing this recipe is named: Oracle ERP Cloud FTP Server Business Event
.
System and Access Requirements
- Oracle Integration
- Oracle ERP Cloud
- File Server
Install, Configure, and Run the Recipe
For more information and steps to install, configure, and run recipes, see Get Started with Integration Accelerators and Recipes.
After you install the recipe, and before you run the integration you must:
Configure Oracle ERP Cloud and Oracle Integration
You must subscribe to Oracle ERP Cloud business events:
-
Create a Fusion Applications user to use in the Oracle ERP Cloud connection, and assign it the following roles:
- Integration Specialist
- AttachmentsUser
-
FND_MANAGE_CATALOG_SERVICE_PRIV
Notice that you can only add this role to a custom role. For more information about creating custom roles, see Custom Roles in Securing ERP.
This is the user you will specify in the ERP connection to connect to Oracle ERP Cloud.
For more information about these roles, see Assign Required Roles to an Integration User in Using the Oracle ERP Cloud Adapter with Oracle Integration.
-
Create a CSF (Credential Set Framework) key for Oracle ERP Cloud to use when calling the integration:
- Use an Oracle Integration user with the ServiceInvoker role to create the CSF key.
- Follow steps 1 to 5 in Configure Oracle ERP Cloud for Event Subscriptions.
The purchase order event is enabled by default in Oracle ERP Cloud.
For information on how to enable other events, see Supported SCM and Procurement Business Events in Using the Oracle ERP Cloud Adapter with Oracle Integration.
Enable File Server
If you are using an external FTP file server to store the CSV file, skip this section. Just make sure you have access to your FTP file server.
If you are using File Server, you must enable it for the user that you'll use to access File Server.
Before following these steps, make sure File Server is enabled. For information on how to enable File Server, see Enable File Server in Using File Server in Oracle Integration Generation 2.
- From the Main menu, select Integrations, then Settings, then File Server, and then Users.
-
Search for the user that you'll use to access File Server.
You can use the same user that you used to install the recipe.
- Make sure the switch in the Enable column is on.
- Make a note of the Home Folder value for this user. You will need this value to you configure the directory.
Configure the Integration Lookups
You must edit the value for the directory lookup to use your home folder:
- From the Main menu, select Integrations, then Lookups.
- Open ORCL-BRT-FTP_FOLDER.
-
In the Property_Value column for the directory property name, replace
/InputDirectory
with the path to the folder where you want to store the CSV file.If you are using File Server, enter the path that you wrote down when you enabled File Server for your user.
- In the Property_Value column
for the filename property name,
replace
CVS
with the name you want to use for the file that stores the purchase order data. For example:PurchaseOrders.csv
Configure the ERP Connection
You must configure the ERP connection to use the instance and credentials for your ERP instance:
- From the Main menu, select Integrations, then Connections.
- Locate and open Oracle ERP Cloud Connection.
- In the Connection Properties section, in the ERP Cloud Host field, enter the URL to access your Oracle ERP Cloud instance.
-
In the Security section, select a security policy and enter the credentials to access Oracle ERP Cloud.
For more information, see Configure Connection Security in Using the Oracle ERP Cloud Adapter with Oracle Integration.
- Click Save, and then click < to go back to the Connections list.
Configure the FTP Connection
You must configure the FTP connection to use your server and credentials:
-
If you are using an external FTP, find out the IP and port where the FTP server runs.
If you are using File Server, find its IP and port:
- From the Main menu, select Integrations, then Settings, then File Server, and then Settings.
- From the General section, copy the IP and port.
- From the Main menu, select Integrations, then Connections.
- Locate and open Oracle FTP Connection.
- In the Connection Properties
section enter the values for the following fields:
- FTP Server Host Address: the IP for your external FTP file server or the IP you copied from the File Server settings.
- FTP Server Port: the port for your external FTP file server or the port you copied from the File Server settings.
- SFTP Connection: Yes
- In the Security section, enter the username and password for your Oracle Integration instance.
Test the Recipe
After configuring the recipe, you can activate it and test it:
-
Activate the integration.
For information on how to activate an integration, see Activate an Integration in Using Integrations in Oracle Integration.
-
Create a purchase order in Oracle ERP Cloud.
-
Review the Monitoring page to verify the integration ran successfully:
- In Oracle Integration, from the Main menu, select Monitoring, then Integrations, and then Tracking.
- Search for your integration.
-
When the integration is complete, click the primary identifier to open the integration instance.
The flow is highlighted in green to indicate that it ran successfully.
- Click
and select View Activity Stream.
- Review the flow and messages for your integration.
- Click Close when you finish reviewing.
-
Connect to the file server using an FTP client, open the directory where you stored the CSV file, and then open the CVS and verify that the purchase order data was added to the file.
You can connect to File Server using an FTP client with the information you wrote down in Enable File Server.
For information on how to configure folder access in File Server, see Configure Folders and View List of Files in Using File Server in Oracle Integration Generation 2.
Related Documentation
To learn more about the Oracle ERP Cloud adapter, the Oracle FTP adapter, and File Server see: