After you create transaction files, client staging and transaction tables, datasets, match groups, match group datasets, filters, rules, and rule details, the last step is to create data input workflows.
Create a data input workflow
You can trigger the workflow via a File Import task, Anaplan Data Orchestrator import, an external solution, such as an Extract, Transform, and Load (ETL), by adding the Application Integration , or through Anaplan's REST API.
Then, you will move the data from the staging tables to the transaction tables using a Calculation type. Finally, you will create a Calculation type to run the matching rules for the proper data source.
You must create a separate file import task for each data type.
- Select Explorer in the navigation pane and go to the desired folder
- Select the ellipsis, then select New > Process. Enter a name and select CREATE.
- In the process interface, choose the Task Toolbar tab from the top menu.
A task toolbox appears to the right. - Drag the File Import component, next to Start. Drag and drop the icon in the middle of the Start task to the icon in the middle of the File Import task to connect both tasks.
- Select the File Import component, select Edit, and enter a Name for the data source.
- Assign an owner, supervisor, and/or contributors. Set Import Definition to Manual Configuration as import definitions aren't used for transaction matching.
- Enter the Staging Table Name, uncheck the Transform and Load to Data Model, and configure the Due Date and Advance Rule.
Always select a staging table within a File Import task, not a transaction table. - Optionally add Info Text and select OK.
Duplicate the task for other data sources. You must create a separate file import task for each data type. File imports can be grouped in a single workflow or separated into multiple workflows. - Next, to load data into the transaction table, add a Calculation task. Drag the Calculation component and name it, such as Data Move or MB Transactions.
- Set the Type to Stored Procedure, and choose appdb for the Data Source.
- For the Stored Procedure Name, enter [matching].[Staging_To_Transaction].
This stored procedure will move data from the staging table to the transaction table. The stored procedure has a setting that will automatically clear the source staging table. The stored procedure includes logic to handle duplicate records based on the primary key column. - Leave the Result Variable field blank.
- Add two parameters, stagingTabl for the staging table and transactionTable for the transactions table. These parameters are case-sensitive.
- Select New Parameter, enter the name of the staging table, and repeat this step again for the transaction table.
Optionally, you can add a third parameter calledclearStagingand set its value to 1 if you don't want to clear the staging table. - Finally, connect all tasks, select Save > Run in the upper right to execute the process to complete the workflow.
Why clear the staging table?
This stored procedure:
- Loads data into the staging table.
- Moves data from the staging table to the transaction table.
- Clears the staging table after each data load, ensuring that the next ingestion starts with clean data.
- Checks for duplicates based on unique identifiers, helping maintain data accuracy.
To prevent clearing, add a third parameter clearStaging and set its value to 1. By default, the solution clears the staging table upon successful completion of the process.
Automate the match rule process
You can run matching rules manually via the Match Rules form or create a Calculation task to automate it. Be sure to trigger the matching rules after a successful data load. While transaction files are typically loaded daily, matching rules may run more often, based on your schedule.
- In the same workflow or a new one, add a Calculation task. Name it, such as Run Bank to GL Matching Rules, and set the Type to Stored Procedure.
- In the Data field, select appdb as the source.
- In the Stored Procedure Name field, enter [matching].[spAppg_match_group_name], ensuring it matches the Match Group name storing your rules. Use underscores for spaces if the Match Group name contains spaces.
- Leave the Result Variable field blank and add no parameters.
- Save the process and run it manually, or schedule it for automatic execution.
When the process runs, it'll apply the match rules to the transactions from the workflow data.