Projet

General

Profil

Labeling rules / Labelling rules

The labeling rules are a supple way to parameterize the labeling preview of a product. These rules can be defined in many spaces in the beCPG software :

  • On the product model (« Labeling » list) : these rules are copied and pasted on the product during his formulation (manual) or directly executed ;
  • On the product itself (« Labeling » list) ;
  • On a product specification (« Labeling rules» list)
  • On the list of the ingredients types (Becpg> administration BeCPG > lists of values > Ingredient Types : "do not declare" and "put at the end")
A rule is defined by :
  • A name ;
  • A type.

According to the rule type, other fields such as «Wording », « Expression », « Components » and « Replacements » are available.

the numbers are rounded down :

18.5% => 18%
18.6% => 19%
-1.5% => -1%
-1.6% => -2%

Types of rules (15)

(rules : language sensitive)

There are 15 types of rules:

  1. Render (create a label, ...);
  2. Format (manage the labeling format);
  3. Rename ;
  4. Agregate and detail;
  5. Agregate and do not detail ;
  6. Agregate and group ;
  7. Declare ;
  8. Detail ;
  9. Declare legal name ;
  10. Omit ;
  11. Do not declare ;
  12. Declaration threshold ;
  13. Ingredient type ;
  14. Language;
  15. Preference (Redefine the separators, CEE code, work in volume, ...)

1-Render

This rule type allows, for example, the creation of a new label.
When you create a label, it is possible to attribuate a group (group 1, group2, ....) to the rules.
You can associate another rules to the group and as the result to this label.

Many labeling formats exist and are defined by the following formulas that should be mentioned in the « Expression » field :

  • render () : displays the ingredients and the groupings

  • render(false): only displays the ingredients

  • renderGroupList(): ony displays the groupings
  • Or any combinations : renderGroupList()+"<br/>"+render(false)

  • renderAllergens(): displays the present allergens.
  • renderAsHtmlTable(): displays a table. Optionnal parameters (styleCss, showTotal)
  • renderAsHtmlTable().replaceAll(">null<","><") : displays a table with the ingredients / the origins / the proportions (%).

2-Format

The « Format » type is often used on the product model and allow the management of the labeling format.

There exists 4 formats per default :
  • Groupings : <b>{0} ({1,number,0.#%}):</b> {2}

Bread : wheat flour, water, yeast, salt ...

  • Detailed elements : {0} {1,number,0.#%} ({2})

icing sugar (sugar, maize starch)

  • Ingredients types : {0}: {1}

Preservative : ascorbic acid

  • Ingredients (default) : {0}

wheat flour, water, yeast, salt ...

Anothers exemples :

ex : write "wheat flour" in red:
  • Formula :

<h style="color:#DC143C">{0} {1,number,0.#%} </h>{2}

  • Components:

wheat flour

  • Results :

resultats : wheat four 24.2 %, butter 14.52%, sugar 6.78%

ex : displaying the origins of the ingredients ({3}) (see as well "Render" if you are looking for a table for the components and their origins)
  • Formula :

<{0} ({1,number,0.#%}): {3}

  • Components:

wheat flour

  • Results :

resultats : wheat flour (24.2%): France, Spain , butter, sugar.

These « format codes » have to be entered in the expression field. Then, the targeted component have to be selected or the field has to be blank in order to specify the default format. Consequently, it’s possible to display percentages, to put text in bold, in red and so on. Formats can include HTMP etc. Please, find more information here : http://docs.oracle.com/javase/1.4.2/docs/api/java/text/MessageFormat.html

3-Rename

This rule is executed by chosing a component to be replaced (in the « Components » drop-down box) and its substitute. This latter can be selected in the «Replacement» drop-down box if it already exists, or it can be created by putting its name in the « Wording » field (label).

If the renaming concerns the labels generated in a certain language unically, this latter should be specified by selecting it in the language list as below :

Which generates the following :

4-Aggregation and detail

These rules allow the aggregation of two ingredients (Example : milk, pasteurized cow milk) into a third ingredient (Example : milk).
To do this, aggregated components have to be entered in the « Components » field and the aggregate has to be selected in the « Replacements » drop-down list if it already exists or created by putting its name in the « Wording » field (Label).

It’s possible to specify the part of each ingredient in the aggregate. For example, if 100 % Milk and 80 % pasteurized cow milk have to be considered, it should be written « 100,80 » in the « Expression » field. The aggregate appears with its aggregated and their proportions in the total product.

Becomes :

5-Aggregate and group

The same as in the « Aggregate and detail » , apart from the fact that the aggregate is separated from the rest of the labeling. Moreover, the aggregate part in the total product is recalled.

Becomes :

6-Aggregate and do not detail

Here, only the aggregate is displayed in the labeling.

Becomes :

Each declaration can be done in the « Composition » space or it can be overloaded by a rule by indicating the statement type and the component that must be overloaded. For example, if for only one RM it’s mandatory to detail, a rule can be established in a model to force the labeling of this RM whatever has been chosen by the user in the drop menu.

7-Declare

You have a rule like "Do not Declare" for a kind of component (ex : processing aid). You want to made an exception. You can use this rule to declare one or more specific component.

For exemple : water as a processing aid.

Water

Before : wheat flour, water (25%), yeast, salt...
After : wheat flour, water (28.5%), yeast, salt...

8-Detail

This rule is not a duplicate of the rule from the Declaration Type.
A declaration type's rule is used for all the label.
A rule type can be used for a label, a group, one product, one component or more.

Displays the MP followed by its ingredients (Example : Milk cream 27 % (Milk 50 %, Cream 50%)).

9-Declare the legal name

Displays the MP name without detailing.
the name declare will the legal name, at least the name (cm:name)

10-Omit

Omitted components are not visible on the labeling and their proportion in the recipe is zero.

  • before : wheat flour 60%, butter : 30% water 9%, sel 1%
  • after : butter 75%, water 22.5%, salt 2.5%

11-Do not declare

Components undeclared aren’t visible on the labeling. However, their proportion in the recipe is taken into account.

before : wheat flour 60%, butter 30%, water 9%, salt 1%
after : butter 30%, water 9%, salt 1%

12-Declaration treshold

the rule allow to not declare the component when the proportion is under the chosen treshold

Rule Type : Declaration treshold
Name : Test
Expression : 5
Components : lemon zeste, butter, egg yolk
Groupe : Chose a group (If you don't chose the groupe, all the labels will be modified),

before : wheat flour 52.25%, water 16,24%, sugar 12,55%, butter 11,62 %, egg yolk 3,48 %, Orange blossom water 1,45%, yeast 1,12%, salt 0,56%, lemon zeste 0,48 %*, liquid whole egg 0,22%

after : wheat flour 52.25%, water 16,24%, sugar 12,55%, butter 11,62 %, Orange blossom water 1,45%, yeast 1,12%, salt 0,56%, liquid whole egg 0,22%

Only the ingredients with a proportion under 5 % and identified by the rule won't be declare

13-Ingredient type

Labelling Rules

This rule is executed while chosing a component to be replaced (in the « Components » drop-down box) and its substitute (in the « Replacement » drop-down box). For example, the E250 additive could be used as a defoamer rather than a conservator. Thus, in the « Components » field, « E250-Sodium-Nitrite » will be chosen and in the « Replacements » field, « Defoamer » will be chosen.

Becomes :

If the type change concerns the labels generated in a certain language unically, this latter should be specified by selecting it in the language list (cf. « Renaming » part).

Ingredient types : specifications

You can add labelling rules when you create or you change the ingredient types. It is possible to :

- do not declare some type like for example the antimotting processing aid,
- put the ingredients at the end of the labelling,

To create these rules you have to do the following actions :

BeCPG > administration BeCPG,
List of values > ingredient Types
Click on the pen (at the right, last column, active button)

ex : vitamin/ add at the end

Before :

After :

14-Language

The « Language » type allows the definition of languages of label generation.
In the « Expression » field, codes linked to labeling languages have to be entered.

Labelings generated into different languages are available this way:

N.B : here, the three labels are written in French (apart from certain words) because translations haven’t been preliminary done. In order to display everything properly in the chosen langage, it should be remembered to define, for each product, its legal name in multilangual like this :

For the raw materials :

For the ingredients :

15-Preferences

You can associate "Preference" to a group and as a result to a label. The rule will be applicated to the whole label.
If you want to be more accurated, you need to use a "format" rule.

Work in volumes

useVolume = true

Display CEE ingredients codes instead of the legal name

showIngCEECode = true

Redefine the separators

defaultSeparator  = "; " 
groupDefaultSeparator  = ", " 
ingTypeDefaultSeparator  = ", " 
subIngsSeparator = ", " 

Redefine the format

Ingredient format

ingDefaultFormat = "{0}" 

Group format

  • # : indicated the number of digits after the decimal point (ex : ##, 2 number after the decimal point),
  • <b> ...</b> : these HTML tags are used to put the bolt police (<i> ... </i> for italics),
  • the numbers are rounded down :

18.5% => 18%
18.6% => 19%
-1.5% => -1%
-1.6% => -2%

groupDefaultFormat = "<b>{0} ({1,number,0.#%}):</b> {2}" 

Groups lists format

groupListDefaultFormat = "<b>{0} {1,number,0.#%}</b>" 

Detail Format

detailsDefaultFormat = "{0} {1,number,0.#%} ({2})" 

Ingredient type

ingTypeDefaultFormat = "{0}: {2})" 

Ingredient type with treshold

ingTypeDecThresholdFormat = "{0}" 

Ingredient format with sub-ingredient

subIngsDefaultFormat = "{0} ({2})" 

Yield taken into account

ingsLabelingWithYield = true

Allergen

allergenReplacementPattern = "<b>$1</b>" 

Tables

htmlTableRowFormat = "<tr><td style=\"border: solid 1px !important;padding: 5px;\" >{0}</td>" 
            + "<td style=\"border: solid 1px !important;padding: 5px;\" >{2}</td>" 
            + "<td style=\"border: solid 1px !important;padding: 5px;text-align:center;\">{1,number,0.#%}</td></tr>" 

Precision

Treshold beyond which the ingredient isn’t displayed

qtyPrecisionThreshold = 0.001d;

Formula

It’s possible to filter the components thanks to a SPEL formule.

The available variables are :

  • compoListDataItem : the element in the composition ;
  • ingListDataItem : the extraccted ingredient.

Statement (7)

There are 7 types of statement /declaration
  1. Declare ing.
  2. Declare legal name
  3. Detail
  4. Kit
  5. Group
  6. Omit
  7. Do not declare

Statements are defined in the « Composition » inset, on the right bottom of the labeling page. To modify the declaration type, click on the actual declaration. A drop menu appear, allowing the chosing of the declaration type.

1-Ingredients declaration

Only displays the ingredients.

2-Declare legal name

Displays the raw material without its ingredients. The display name will be the "legal name" and by default the name (cm:came)

3-Detail

The ingredients will follow-up the display raw-material. (Ex: bread 27% (wheat flour 60%, water 35%, yeast 4%, salt 1%))

4-Groupings

Creates a grouping (Example : Rum ice cream with raisins (65,4%) : Sugar 0,455 ; Milk cream 41,2 % (Milk 50 %, Cream 50%)).

5-Assortments

Same as the grouping but the percentages are computed at the assortment level.
Example : Apple pie

Dough 35%: wheat flour 60%, butter 30%, egg yok 8%, salt 2%.
Apple Mixe 65% : apple 55%, applesauce 35%, sugar 8%, butter 2%.

If you only want to declare the proportion of the applesauce, you need to use the labelling rules "format":
Label : {0} {1,number,0.##%} ({2})
Component : Applesauce
rule : format

6-Omit

the components omitted aren't visibleson the labelling. Their proportion is set to zero.

Before :
Wheat flour 60%, butter 30, water 9%, salt 1%

After :
Butter 75%, water 22.5%, salt 2.5%

7-Do not declare

The undeclared components are not visible on the labelling. Unlike the statement "Omit", the percentage is not set to zero.

Before :
Wheat flour 60%, butter 30, water 9%, salt 1%

After :
butter 30, water 9%, salt 1%

Rules defined on groups

The « Group » field is useful :

  • First case: when different rules have to be applied (of type different from « Render ») to many labels. For example, lets consider a label of group 2 and a label of group 1. The separator has to be changed from « , » to « ; » unically in the label 1. A new rule is created, with the « Preference » type. The text « defaultSeparator = « ; » » is written in the « Expression » field and the group 1 is specified.

  • Second case: when the same rule has to be applied for all the labels. For example, lets consider a label of group 2 and a label of group 1. The separator has to be changed from « , » to « ; » in all the labels. A new rule is created, with the « Preference » type. The text « defaultSeparator = « ; » » is written in the « Expression » field and the « Group » field is left blank.

ATTENTION : if the rule « Display the percentages » is chosen by default, the case 1 won’t work.

Allergens labeling

Allergen list feeding

A preestablished allergen listnalready exists per default in the system. However, if it’s necesary to add new allergens, go to beCPG> Administration beCPG> Characteristics> Allergens and click on « Add ». A form is displayed and permit to enter :

  • The allergen name ;

  • The allergen regulatory threshold ;
  • The « children-allergens »;

Steps to label the allergens properly

Enter the allergens in the recipe

In order to display the allergens in the product labeling, these latter have to be preliminary put at the RM level. For your information, it’s enough to put the allergens only once on the raw material to make them appear every time the RM is used in a product recipe.

To do this, go to each product’s raw material and click on the « Allergens » list. An allergens list is displayed by default but it’s possible to add new ones by clicking on « Add » and by chosing an element from the list.

Once the allergen has been chosen, it’s necessary to mention the nature of its presence. For this purpose, a decision tree can be used in order to know if the allergen should be declared or not and if its presence is volontary or fortuitous.

In function of the nature of its presence , it will be necessary to tell the source of this allergen, which means, the ingredient in which the allergen is found. This step is important to generate a correct labeling.

Choose the statement type

  • Either the raw material is declared accoridng to the type « Declare legal name », in which case the allergen will always be put into brackets and in bold just after the RM name, whether its source has been mentioned or not.
  • Either the raw material is declared accoridng to the type « Declare ingredients », in which case the allergen will be put into brackets and in bold just after the ingredient name, ONLY if its source has been mentioned.

Source mentioned :

Attention : in this case, if the ingredient name corresponds to one of the allergen children, it will be put in bold and the allergen won’t be put in bracket next to the ingredient name.

Parameter the formatting of the allergens labeling

If the formatting of allergens bolding in the labeling as its presented just above does’nt suit you, it’s possible to do it manually.

In the case in which « Statement type » = « Declare the ingredients » : click on the ingredient in question and edit its properties. In the legal name, add the tag <b> at the beggining of the word that should be put in bold and </b> after this word. Go back to the « Labeling » list and click on « Formulate » to see the modifications appear. Indeed, the modifications done manually prevail the default modifications.

Modifications to be done :

Before modifications :

After modifications :

Synchronisable State :

There are 3 types of synchronisation for the labelling rules.

Template

  • The rule is registered on the product template : product A (FP, SF, RM);
  • The rule will always be applied to all the product whose model are the product A;
  • The rule isn't visible by the user when he looks at the labelling rules of his products.

Interest: the purpose is to reduce the labelling rules 'list for the finished product. The user will only find the rule on the template.

Synchronisation

  • The rule is registered on the product template : product A (FP, SF, RM);
  • The rule will always be applied to all the product whose template are the product A;
  • The rule is visible by the user when he looks at the labelling rules of his products ;
  • The rule can be changed in the product's template.

Interest: the purpose for this synchronisation is to be used by all the products and to be easily changed. It is also possible to disabled it.

Manual

  • The rule is registered for each product;
  • The rule is visible by the user when he looks at the labelling rules of his products;
  • The rule can be changed in the labelling rules 'list of the product.

Interest: the purpose for this synchronisation is to stay independant from the other product.

Activate/desactivate a rule.