In the "Сompensation plan engine" / "Computing workflow" you can view, edit and create workflows and rules by which they work.
The workflow is a relative set of rules, which used to calculate plan properties (for creating a plan, see "Configure plans"). You can configure the properties for the calculation in the "Plan Properties" section.
A customized workflow will be used to calculate the dependent properties (for example, group volume change) when one of the plan's properties changes (for example, the personal volume due to the purchase made by the distributor).
On the page workflows are grouped according to plans. Information for each created plan (if more than one) is displayed on a separate tab.
Workflows are displayed as tabs within the selected plan.
The following operations are available in the section:
- Creating / editing workflow
- Creating new rule
Creating new computing workflow
To create new workflow, follow these steps:
- Click the blue button "Create workflow" on the toolbar (functional panel).
- On the page that opens, fill in the fields:
- Name - enter the name of the process to be created. Note, that you can not use process names and their aliases twice.
- Alias - enter the alias of the created workflow.
- Plan - select the plan, where the workflow will be created from the list of available plans.
Processor type - select the type of processor, two types are available:
- Collateral - when choosing this type of processor, the rules are applied alternately to the positions (first rule to the first position, then first rule to the second position, etc.).
- Recursive - when selecting this type of processor, the rule list is applied to the positions in the order of the queue (all rules to the first position, then all rules to the second position, etc.).
3. Click the "Submit" button to add a new workflow to the page of the selected plan.
After creating the workflow, it becomes possible to create a rule, according to which this workflow will work.
Editing an existing workflow
A link to the workflow editing form is located at the end of the line with workflow tabs.
Click on the workflow and follow the link "Edit workflow", the prefilled editing form will open. The form of editing is the same as the form of creation, only the Delete workflow button was added.
Creating new rule
To create new rule for an existing process, follow these steps:
- Click on the blue "Create rule" button on the toolbar.
- This will take you to the page for creating a plan rule. Example of rule creation form:
The rule creation / editing form contains 6 blocks:
It displays the fields:
- Rule name - enter the name of the rule.
- Alias - enter the alias of the rule to be created.
2. Source property / properties
This block specifies the original properties.
- Here one or more initial properties are specified, at change of which the rule will work. You can add a property using the plus sign, delete with cross.
- For each property, the nature of the change is also indicated. There are 4 versions:
- Any - any change (specified by default).
- Increase - increment the value of the specified property.
- Decrease - decrease the value of the specified property.
- Match - is a match respectively. When this change is selected, it is possible to specify a fixed value or a range of values (in an additional field).
3. Dependent property
- In the third block, the dependent property (one) is selected, which will change in connection with the change of the original property.
- For dependent property, you need to specify the positions, whose property will be changed. The following line items are available:
- Own is its own position (the same position as the source property). Important! when using the "own position", the initial and dependent properties in the formulas use only the marketing properties of this position (they are highlighted with a yellow marker). If the dependent property has a different position (for example, upline), then in the formulas you can use both the properties of the source position and the properties of the dependent position (it is highlighted in orange).
- Sponsor is a superior position.
Upline is the ability to specify a range of positions. When specifying a range, two additional fields are available:
- Range - specify integers from 0 to infinity (they mean the number of generations up relative to the current position) and / or marketing properties and parameters.
- Select conditions - enter any condition for selection of positions, to select not the entire range, but only those positions, that match the conditions.
Other tree - select positions in other tree with same account. When specifying this option, two additional fields are available:
- Tree - select a tree from the list of available, in which the dependent positions will be searched.
- Select conditions - enter any condition for selection of positions.
4. Setting the Periods
Below the blocks of the source and dependent properties, respectively, is the block for setting the periods. Specify, for which period the property values will be taken: for the previous, current or next.
5. Dependency algorithm
- Execution conditions - enter a logical formula for determining the trigger conditions.
- Break chain on exec - if the field is checked, then as soon as the formula works for the next position, further upward movement will be discontinued (the field can be marked, only if the dependent positions are specified by the range - Upline positions).
In the formula block two fields "Formula" and "After action" are displayed.
- Formula. Here an arithmetic expression is defined to calculate the property value. In the expression, you can use: the property values (both the source position and the dependent if they do not match), system variables (for example, Upline-offset), parameters (for example, access to Mapping parameters), built-in comparison formulas (Minimum and Maximum ) to select the minimum or maximum value from the row, respectively.
When you enter formulas, the following colors of the application elements and styles are used:
- Marketing properties of the starting position - yellow
- Marketing properties of the dependent position (if this is a different position) - orange
- Plan parameters - green
- The values of the plan parameters from the directories - gray
- System variables - blue
- Functions - italic
- Arithmetic and logical operators - bold
- After action - here you can enter any condition for the action after the rule is executed, for example assignment / change of rank, charging of the network bonus, etc. All these actions are executed after the completion of the entire chain, from which they were initiated.
Click the "Submit" button and the new rule will be added to the plan page.
Changing rule execution priority
To change the priority / order of execution of an existing rule, click the arrow icon in the "Actions" column. The up arrow moves the rule one position up (priority increase), the down arrow moves down one position (lower priority), respectively.