Blog

How to Integrate Anaplan with MuleSoft Mule 4.2

Written by Charan Sai Dasagrandhi | Aug 11, 2020 4:07:00 PM

Improved connectivity is key in the digital transformation journey, and MuleSoft has been innovating connectivity solutions to ensure better compatibility with legacy and advanced systems. To further enhance connectivity solutions and drive better business decisions, consider integrating Anaplan with MuleSoft. This integration provides accurate data quickly, allowing businesses to evaluate data faster and empowering them to make more confident key business decisions. 

With every release, MuleSoft has been providing better API-led connectivity solutions. In this process, compared to Mule 3, the release of Mule 4 offers stronger solutions. Below, we will outline how to integrate Anaplan v3.0.0 Connector through Mule 4.

What is the Anaplan System?

Anaplan is a web enterprise platform for cloud-based business planning to promote connected design and performance management with documented use cases in finance, sales, supply chain, marketing, IT and HR. This platform extracts the right data from all cross-business functions to drive business objectives with exact resolutions.

At the core, Anaplan's technology is a single-hub, unified cloud platform across your enterprise, with a patented in-memory calculation engine for effective planning. This can build, deploy, maintain and share models without requiring coding efforts or reliance on IT personnel with skills in multi-dimensional scaling and optimization of data. This platform helps to communicate in real-time and convert business plans into results.

Integration using Anaplan v3.0.0 Connector through Mule 4

We've seen chunk implementation, import streaming, file upload, file preview and export streaming in the previous version (2.0) of the Anaplan Connector for Mule 3.8. Now, the MuleSoft Anaplan v3.0.0 Connector will help to connect your Mule flows to the Anaplan API in Mule 4.

The variables for authentication and configuration for Anaplan:

  • username
  • password
  • Key Store Path
  • Key Store Password
  • Key Store Alias
  • workspaceId
  • modelId
  • exportId
  • importId
  • deleteActionId
  • processId

This version of the MuleSoft Connector allows the following operations to be carried out in Anaplan:

  • Describe import
  • Describe export
  • Describe Anaplan file
  • Execute process
  • Execute delete
  • Execute import only
  • Execute import streaming
  • Execute import with files
  • Execute export streaming
  • Execute export with files
  • Execute file upload streaming
  • Execute file upload with files

Describe Import

Describe Import allows large datasets to be imported to Anaplan as a stream. Use temporary files when the import data should be deleted, not ephemeral, or the source data won't be available as a stream. Also, use the temporary files option for files with a size between 30-50 megabytes (MB) if you are extracting data from a database and want to push the information to the server without holding the results in memory. The process for importing using streaming is as follows:

  1. In the MuleSoft Anaplan v2.0.1 Connector tab, select Execute Import Action (Streaming).
  2. Configure the Connector to call a valid Anaplan import action by selecting the appropriate Workspace, Model and Import action.
  3. Enter an Import Chunk Size of 1-50 MB).
  4. Enter a Retry Count.
  5. Enter a Stream Reference.

The uploaded data from the file, first chunk of the file, or payload (from another cloud service) must be imported to the specific Anaplan Import Action. This will display the first 20 lines of the first chunk of the file to be imported.

Example

Execute Import Only — This will run a pre-configured Anaplan import action.

Execute Import from Files

Execute Import Streaming from Files/Payload

Import using Temporary Files

  1. In the MuleSoft Anaplan v2.0.1 Connector tab, select Execute Import Action (Temporary Files).
  2. Enter an Import Source File Path.
  3. Enter a Temporary Chunk Folder where the Connector will create the chunk files.
  4. Configure the Connector to call a valid Anaplan import action by selecting the appropriate Workspace, Model and Import action. 
  5. Enter an Import Chunk Size in MB.
  6. Enter a Retry Count.
  7. Select Delete Source File to delete the data source file on completion.

Describe Export

Describe Export allows us to preview the Anaplan data from the file or data from another Anaplan model to be imported to the file, chunk of file, or cloud service. This will show the first 20 lines of the file to be exported.

Export Files

The Export Files operation extracts and generates the file in the specified location.

To generate files, provide a temporary folder location: ${workingdirexportfiles}

Export Streaming

  1. In the Connector, select Export Streaming Operation.
  2. An export will run on the streaming operation, exporting the data from the Anaplan system to another service.

Describe Upload

  1. In the Connector, select Preview File to be Uploaded.
  2. Configure the Connector to fetch the Model import data by selecting the appropriate Workspace, Model and File action. A maximum of 20 lines will be shown. 

Execute Upload Streaming

  1. In the Connector, select Execute File Upload Streaming.
  2. Configure the Connector to upload the files in streaming process — this approach loads the data into Anaplan, but not its Model.
  3. To load it into Anaplan Model, import the data operation by selecting the appropriate Workspace and Model action. 

Execute Upload Files

  1. In the Connector, select Upload Files to be uploaded.
  2. Configure the Connector to upload a file using temporary file fetch into Anaplan.
  3. To load it into Anaplan Model, import data operation by selecting the appropriate Workspace and Model action.
  4. Provide the source file path along with the file name and temporary chunk folder, as this chunking will happened based on the size.

Execute Process

You can execute a pre-configured action process containing a combination of import, export and delete actions. You can also schedule the process to run at a particular interval:

  1. Create a flow with the poll component and configure the poll as necessary (i.e. Cron Scheduler).
  2. Drag an instance of the MuleSoft Anaplan v2.0.1 Connector to the main section of the flow.

  3. In the Connector, select Execute Process.
  4. Configure the Connector to execute on a schedule by selecting the appropriate Workspace, Model and Process action.

Execute Delete

You can run a pre-configured delete action in your model. For instance, you might want to delete data from an Anaplan list.

  1. In the Connector, select Execute Delete Action.
  2. Configure the Connector to execute a pre-configured delete action model in your Anaplan model by selecting the appropriate Workspace, Model and Delete action.