Rule Designer Walkthrough
Table of Contents
All rules are reviewed by Ariox prior to enabling for use to ensure continuity.
There may be a short delay before you can use a newly created/modified rule.
Overview
The Rule Designer is an intuitive, easy to use tool that enables the user to transform their data as it passes from one system to another by means of an automated data transfer (an integration).
Getting Started
To make use of the Rule Designer, you must navigate to the Data Rules module under the Settings menu on the left-hand side of the platform (1). From here you may make use of the Rule Designer to build a new rule by selecting the Add New Data Rule button (2) or to edit an existing rule by selecting the edit button within its ellipses submenu (3).
You should now see the Rule Designer console. Here create a name for your rule, when it should execute during the integration process (At the start, within the Data Map, or at the end). For now, you can ignore the save and send for approval button as you will select it once you are ready to send the rule to Ariox to approve it for use. Until you feel the rule is finished all you need to do is save it periodically so you do not lose any progress.
Code Catalog
Now before we begin making a rule, let’s go through an overview of the catalog of code puzzle pieces:
The Logic section is comprised of if statements and different Boolean condition pieces.
The Loops section has your do, do while, and for loops.
The Math section contains your number pieces, operators, rounding, etc.
The Text section contains anything you want to do with a string: add text, capture substrings, trim spaces or characters, replacing characters, changing case, etc.
The Lists section contains the pieces for list creation, sorting, searching, etc. logic
The Color section contains pieces for assigning colors in various ways, to one or more fields.
The Input section contains the Create input button. Once created, each input that you have created will appear as a puzzle piece in this section.
The Output section contains the Create output button. Once created, each output that you have created will appear as a puzzle piece in this section.
The Variables section contains the variable creation button. Once created, each variable that you have created will appear as a puzzle piece in this section.
The Functions section contains the pieces you can use to make rules.
The Emails section contains the pieces pertaining to sending emails.
Now that we have reviewed the catalog, lets go over a couple of items before we create an example rule. There are three options as to when your rule executes (At the start, within the Data Map, or at the end). Where you choose to execute your rule will depend on what you are trying to do. For instance, if you want to send an email, the start or end of your integration would likely be the best place to execute (See example below) whereas the majority of the other rules one could build involving transforming or manipulating the data would be best to execute as part of the Data Map (See example below).
Please note that some items are not able to be used together such as Number operations and text pieces, if you run into one of these items the wizard will not allow you to connect it to the function in that area.
Here is an example of pieces that do not match. You can not do some operations with different types. Number operations will require number pieces, and text operation will require text pieces. However, variables can fit in any operation type, because the can have any type.
Here is an example of a logic comparison that does not make sense. You can not compare pieces of different types. You can not even use logical pieces like [true/false] with a text piece for example, but you can use it with variables.
Making a Rule
To start making the rule select a block from one of the sections. From here you will add additional blocks to create the condition in which the rule will trigger.
- Use any of the sections of blocks to create a condition that will transform or manipulate your data when those conditions are met.
- The type of data we are transforming (char, datetime, integer, etc.) determines the type of data that must be assigned.
- When you have finished your rule you must submit it for approval so the Ariox team can verify what you have built will not impact the performance of your integrations. Once approved, your rule will be enabled for use. You may then activate and inactivate the rule as you wish without triggering approval. Please note that any changes you make to the rule will require it to be reapproved.
Example Rules
- Basic rule using text. (This rule transforms text to title case)
a. Fill data rule required field and select "Data Mapper" execution level
b. Create the input variable
c. Create the output variable
d. Set the output variable to title case of the input - Example of how send an email at start of an integration or at end.
a. Fill data rule required field and select "At Start or At End" execution level
b. Fill in the To: field
c. Fill in the Subject field
d. Fill in the Message field - Advance Rule using If/Else, functions and variables. (This rule calculates a discount value based on order amount. It applies a 10 percent discount if the order amount is greater or equal 100, a 5 percent discount if it is less than 100 but greater or equal 50, or no discount if less than 50. It also applies an additional 5 percent discount if the payment method is CASH.)
a. Create the inputs variables (order amount and payment method)
b. Create the output variable (discount)
c. Create a reusable function to set the discount, considering the payment method
d. Create the logic block and call the "calculate discount" function with the desired values