Manage Rules

Introduction

Define one or more rules for a specific nutrition program. Each program contains a ruleset that determines the foods to avoid, increase or decrease for that program.

Rules can be added to either active or inactive programs.

Rule Components

A rule has the following components:

Action Type

There are three types of actions within a rule:

  • Avoid: Use this rule to indicate that it is necessary to avoid the intake of certain ingredients in a nutrition program. In the following example, avoid the sugar foods selected within the Ingredient Groups:

  • Decrease: Use this rule to indicate that it is necessary to decrease the intake of certain ingredients in a nutrition program. In the following example, decrease the salt intake within the Ingredient Groups:

  • Increase: Use this rule to indicate that it is necessary to increase the intake of certain ingredients in a nutrition program. In the following example, increase the omega-3 intake foods selected within the Ingredient Groups:

Ingredient group

Choose one or more ingredient groups to be targeted within the rule.

To add ingredient groups, click on the down arrow. Two ingredient sections are displayed:

  • Your ingredient groups section lists all the custom ingredient groups created by a user.

  • Ingredient groups by Suggestic section list all the predefined ingredient groups created by Suggestic.

Search for an ingredient by entering its name. For instance, introduce milk as an ingredient, and all the ingredients that contain milk will be displayed:

As in the example below and depending on the rule, one or more ingredient groups can be added:

Order

The order in which the rule will appear in the API.

Rule Priority

The rule priority is the weight of the rule. The more priority number selected, the more priority the rule has.

For instance, if there are the following rules defined:

Rule #1

Rule #2

Even though both action rules are defined as Avoid, Rule #2 will be prioritized because its priority is defined as 8. Therefore, it will be more important to avoid alcoholic beverages on the nutrition program than avoid sugary foods.

User Segment

Select the user segment the rule is applied. User Segments are created by users.

Click on the down arrow to list all the available user segments

If you cannot find a user segment that fits the rule, click on the Edit user segments option to open the Segments editor:

Rule Information

At the right side of the screen, the information of the rule must be filled in:

Create a Rule

As follows find an example of how to create a rule.

  1. Go to the Programs section and choose a program from the list of active or inactive programs:

2. Click on the Add Rule option:

Fill in the information as in the example below where a rule that avoids milk is created and add the program information. Finally, click on the Create button:

Create as many rules as needed.

Edit a rule

Rules can be edited either on active or inactive programs

Modify the information and then click on the Save Changes button.

Delete a Rule

The following message is displayed:

A message indicating that the rule has been deleted is displayed at the bottom right side of the screen:

Once a rule is deleted, it cannot be recovered.

Last updated