Skip to main content

Integration & IT Modernization

Power of Oracle EPM Integration – Calling External RestAPI for Enhanced Performance

The Secret To Software Tool Integration Photo 1


This article explains how to use Groovy and connectors to call an external REST API using Oracle EPM Cloud and Middleware technology called MuleSoft.


There is an option to call both internal and external REST APIs using the Groovy EPM object model. To generate GL files from ERPs and load them into FCCS using data management (an internal API), you write and run a Groovy rule that calls an external MuleSoft REST API.

Required conditions:

Possess access to a Cloud EPM Enterprise Service instance as a Service Administrator.

You must first construct an interface in MuleSoft to cause the stored procedure in ERPs to generate the trail balance file in the appropriate format before you can begin using the MuleSoft APIs, which include the endpoint REST API. Visit Please visit the link below to learn how to create endpoints in MuleSoft’s Partner Manager:

If you run into migration errors importing the snapshot, re-run the migration excluding the HSS-Shared Services component, as well as the Security and User Preferences artifacts in the Core component. For more information on uploading and importing snapshots, refer to the Administering Migration for Oracle Enterprise Performance Management Cloud documentation.

Creating Groovy script to download ERP Actual file and loading to Consolidation tool.

Below are the steps we have defined for the above integration.

  1. Creating a connection in Oracle EPM to call the MuleSoft web services.Conn
  2. Before calling the endpoints of MuleSoft, it is necessary to authorize them. To achieve this, we need to create a logic that generates a bearer token using the client ID and Secret of MuleSoft API. The script below will help us to generate the bearer token efficiently.We pass the client ID and secret as the body.Scr
  3. We parse the JSON response output and assign the token to a variable using the method below.Scr1“Jaccess_token” is the bearer token generated from the “Mule” connection by using the above method.
  4. First, we authorize the API endpoint using a bearer token to generate a trail balance file for the requested fiscal year and period. To create a new connection, we start by providing the endpoint details.
  5. Creating a connection for the endpoint.Conn1
  6.       Using a Groovy script to connect and call the endpoint with a bear token created via web services connection.Scr2
  7. A URL passed in the get() method will have parameters to specify the fiscal year and period for general ledger data from ERP. The syntax for the URL is as follows:   def url = “/epmtrailbalance/us/summary?year=<FISCAL_YEAR>&month=<PERIOD>”
  8. The JSON response “jsonResponse1” will contain details of the trial balance files that have been generated in the SFTP location.
  9. It’s worth noting that we don’t have the file yet in EPM that we need to load into the target consolidation close application. Right now, it’s located in a cloud share location, which is managed by a third-party tool called “MoveIT.” MoveIT serves as a file-sharing interface through which we can transfer or modify the necessary files.
  10. We have implemented additional measures to ensure that our financial files are compliant and not stored in a cloud file share. We now download the files from the cloud file share and delete them from MoveIT. MOVEit encrypts files and uses secure file transfer protocols such as FTP(S) and SFTP to transfer data. It also provides automation services, analytics, and failover options.
  11. To harness the power of Oracle EPM integration, we established a new connection for MoveIT, a cloud tool that can be accessed via a RestAPI for file transfer..Conn2
  12. To call MoveIT, you can utilize a Groovy script similar to the one shown below.
  13. Below is the Groovy script to download the file into the EPM inbox directory.
  14. After step 6, the JSON response will include the details of the files created in the SFTP location. We will use these details to download the file from the SFTP location to the EPM Inbox/Outbox directory.
  15. As this is financial data, we must avoid any compliance issues by deleting the cloud-shared file from the SFTP location. Please follow the steps below to do so.Scr7
  16. Now we have the trial balance file in the EPM inbox directory and will be loading the file into FCCS using the data load rule created for transforming the files.
  17. Initiate data load rule by establishing a connection to call the internal API of data management.
  18. The script is designed to execute the data load rule that loads ledger files from the Inbox/Outbox directory to FCCS..Scr5
  19. All of the aforementioned procedures require the submission of a parameter. The appropriate mapping of data loading, validation logic, and import formatting are defined in data management.
  20. Below are the run time prompts which are created to take the params and execute the complete script.Prompts
  21. After creating all the necessary steps and script, ensure to validate and deploy it by clicking on E“Validate and Deploy”.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Srijith Chandran

Srijith Chandran is a Solution Architect with 14 years’ experience within Perficient’s Corporate Performance Management practice. He is certified in several technologies including Oracle financial close & consolidation and Oracle Planning. Srijith is continually endeavoring to guarantee effective experiences with CPM innovations for his clients.

More from this Author

Follow Us