Automate Export and Import of CSV File Packages

You can use the SOAP web services or the REST APIs if you want to export and import CSV file packages outside of the Setup and Maintenance work area.

To submit export and import processes using web services or APIs, you need the Export Import Functional Setups User (ORA_ASM_FUNCTIONAL_SETUPS_USER_ABSTRACT) role, and a role with task-specific privileges to enter and modify setup data. If you intend to handle setup data for an offering, you might need an appropriate application administrator role as well.

Refer to the Additional Access Required for Exporting and Importing Setup Data topic to know if you need access to any additional roles. For detailed information about task-specific privileges, refer to the Oracle Fusion Cloud Applications Security Reference for Common Features guide.

The following graphic represents a high-level overview of the process to be followed for automating the export and import of CSV file packages.

CSV export and import process

SOAP Web Services and REST APIs

Refer to the following documents for detailed information about using web services and REST APIs to export and import CSV file packages.

Offering, Functional Area, or Task Code

To initiate the export or import process using an API, you must provide the code of the offering, functional area, or task. To complete this task, you must have the Export Import Functional Setups User (ORA_ASM_FUNCTIONAL_SETUPS_USER_ABSTRACT) role.

Tip: You can use a REST API to get the code for the offering or the functional area. For detailed information, see the use case Find the Code for an Offering or Functional Area in the REST API for Common Features in Oracle Fusion Cloud Applications guide.

To find the relevant code, follow these steps:

  1. Click Navigator > My Enterprise > Setup and Maintenance.

  2. In the Setup and Maintenance work area, click Manage Setup Content from the Tasks panel tab.

  3. Follow these instructions to obtain the required code:

    To search for the code of an offering or a functional area

    To search for the code of a task

    1. On the Manage Setup Content page, click Manage Offerings and Functional Area.

    2. In the Search field, select Offerings or Functional Area depending upon the code you're searching for, and click Search.

    3. In the search results, click the name of the offering or the functional area.

    4. On the Enter Basic Information page, look for value that appears against Code.

    5. Copy the code and use it where necessary.

    1. On the Manage Setup Content page, click Manage Task Lists and Tasks.

    2. In the Search field, select Tasks and click Search.

    3. In the search results, click the name of the task.

    4. On the Task page, look for value that appears against Code.

    5. Copy the code and use it where necessary.

Apply Scope to Filter Exported Setup Data

When you export setup data using web services or APIs, you can optionally apply scope to filter the data. To apply scope, you must provide values to the following parameter attributes.

  • BusinessObjectCode - Code of the business object whose attribute is used as the scope

  • AttributeName - Name of the attribute of the business object used as the scope

  • AttributeValue - Value of the named attribute that defines the filter criteria

Follow these steps to find values for required parameters.

  1. Follow the procedure in the Export and Import CSV File Packages topic and select these options.

    • The same offering, functional area or task for which you want to automate the export process.

    • The same scope-enabled business objects and their values to be used as the filter criteria in the automation process. Also note the names of the selected business objects.

  2. Complete the export and save the downloaded CSV file package. The attribute values from the downloaded files are used in the filter criteria when running the APIs.

  3. Complete these steps to find the code of the business object whose attribute is used as scope.

    1. In the Setup and Maintenance work area, select Manage Setup Content from the Tasks panel tab.

    2. On the Manage Setup Content page, click Manage Business Objects.

    3. Search for the business object that you identified in step 1 to set the scope and click that business object from the search results.

    4. Note down the code of the business object so that you can use it as the value for the BusinessObjectCode parameter in the API.

  4. Find the list of attributes that you want to use as filters and note down their values.

    1. From the CSV file packages exported and saved as instructed in step 2, find and open the file that has the same name as the business object used as scope.

    2. Note the column names and their values you want to use as filters. Use the column names as values for the AttributeName parameter and the column values as values for the AttributeValue parameter in the API.

Modify Setup Data in a CSV File

  1. Extract files from the downloaded CSV file package to a local folder..

  2. Open Microsoft Excel and click the Data tab.

  3. In the Get External Data group, click From Text.

  4. Navigate to and select the CSV file you downloaded.

  5. Select Delimited as Data Type and click Next.

  6. Select Comma as delimiter and click Next.

  7. Select Text as column data format for all columns and click Finish. You can now edit the file.

  8. Make the necessary changes and save the CSV into a .zip file. Make sure that the CSV file size doesn't exceed 10MB. You can now import the file.