What data can be printed through Printing Services?

This article enumerates all data supported by each type of document you can print using Printing Services.

When should I read this article?

If you're creating or editing a label for a Printing Service, check this article to understand the variables you can use, and how they are configured.

Contents

  1. What variables can I use with Loftware Cloud/Nicelabel?
    1. Recipe Data Package (from a Recipe)
    2. Nutritional Macro Nutrients (from Recipe)
    3. Nutritional Micro Nutrients (from Recipe)
    4. Menu Item Data (from Menu Items)
    5. Menu Data (from Menus)
    6. Printing tags
  2. How can I work with the data? Which Functions can I use?
    1. ParseIngredients
    2. ConvertUnitTemplate
  3. Where can I find templates for the data and functions?
    1. Default Variables
    2. Default Functions

What variables can I use with Loftware Cloud/Nicelabel?

When printing from Loftware Cloud/Nicelabel, you can use variables with data from:

  • Recipes
  • Menus
  • Menu Items

Each source has different packages. Let's take a look at the different supported packages in the following sections.

Recipe Data Package (from a Recipe)

Variable Name Description Example Variable Usage
allergens List of allergens, separated by 2 semicolons, rolling up allergens from all ingredients. e.g. "dairy;;gluten". gluten;;milk;;sesame Text
bestBefore Expiration date of the recipe, calculated using produced date and shelf life in MM/DD/YYYY 2024-03-25 If the user provides Produced date, Best Before will be calculated using Produced Date + Shelf Life. If Produced Date is not provided, Best Before will be calculated using Current Date + Shelf life
description Recipe description Text description for this Recipe. text, multiline
externalName Extenal recipe name in Galley Galley Burger Single line with Recipe External Name
foodCostCents Cost of the recipe at the selected location 123.4567 Number, with 4 decimal places
ingredients List of ingredients, by their External Names. Will be the ingredients list of all items inside all recipe and sub-recipes meat;;salt;;milk Galley will fetch all ingredients for the recipes and sub-recipes, list all of them, separated by 2 semicolons
inventoryUnit Unit for the inventoriable item lb text
isDish If the recipe is sellable or component true/false boolean, "true" or "false"
notes Notes of the recipe Notes for this Recipe notes': 'Notes field for the recipe'
nutritionalsQuantity Serving amount 123.4567 Number, with 4 decimal places
nutritionalsUnit Serving unit grams Unit text
prepTime Preparation time for the menu item recipe, in seconds 123456 Number, with 0 decimal places
priceCents Recipe price, if Recipe is marked Sellable 12.3456 Number, with 4 decimal places
producedDate Produced date, manually entered by the user. If not provided, will be current date. Format MM/DD/YYYY 03/25/2024 Manually entered, format MM/DD/YYYY
recipeName Recipe name from the Recipe in Galley Galley Burger Single line with Recipe Name
shelfLifeDays Finished good Shelf life, in days 2 number, integer
shortCode Short code for the recipe RP-001 text
totalYield Yield amount for the recipe, with 4 decimal places 12.3456 Number, with 4 decimal places
yieldUnit Yield unit for the recipe serving Unit text
conversions Conversions for the recipe, structured in a JSON format [{'from':'each','to':'floz','factor':'16'},{'from':'each','to':'ml','factor':'473'}] Text in an structured format that needs to be parsed.

Nutritional Macro Nutrients (from Recipe)

Variable Name Description Example Variable Usage
caloriesKcal Calories, in Kcal 123.456 Number, with 3 decimal places
carbsG Total Carbs measured in g 123.456 Number, with 3 decimal places
carbsPercentDRV Total Carbs % of daily values 12.34 Percent, with 2 decimal places
cholesterolMg Cholesterol in the recipe 123.456 Number, with 3 decimal places
cholesterolPercentDRV Cholesterol % of daily values 12.34 Percent, with 2 decimal places
fiberG measured in g 123.456 Number, with 3 decimal places
fiberPercentDRV Dietary Fibe % of daily values 12.34 Percent, with 2 decimal places
proteinG measured in g 123.456 Number, with 3 decimal places
proteinPercentRDI % of daily values 12.34 Percent, with 2 decimal places
saturatedFat Saturated Fat in g 123.456 Number, with 3 decimal places
saturatedFatPercentDRV Saturated Fat % of daily values 12.34 Percent, with 2 decimal places
sodium measured in mg 123.456 Number, with 3 decimal places
sodiumPercentDRV Sodium % of daily values 12.34 Percent, with 2 decimal places
sugarG measured in g 123.456 Number, with 3 decimal places
sugarPercentDRV Total Sugars % of daily values 12.34 Percent, with 2 decimal places
totalFatG Total Fat in g 123.456 Number, with 3 decimal places
totalFatPercentDRV Total Fat % 12.34 Percent, with 2 decimal places
transFat Trans Fat in g 123.456 Number, with 3 decimal places
transFatPercentDRV Trans Fat % of daily values 12.34 Percent, with 2 decimal places

Nutritional Micro Nutrients (from Recipe) 

Variable Name Description Example Variable Usage
addedSugarG Added sugar measured in g 123.456 Number, with 3 decimal places
addedSugarPercentDRV Added sugar % of daily values 12.34 Percent, with 2 decimal places
biotinMcg Biotin measured in mcg 123.456 Number, with 3 decimal places
biotinPercentRDI Biotin % of daily values 12.34 Percent, with 2 decimal places
calciumMg Calcium measured in mg 123.456 Number, with 3 decimal places
calciumPercentRDI Calcium % of daily values 12.34 Percent, with 2 decimal places
chlorideMg Chloride measured in mg 123.456 Number, with 3 decimal places
chloridePercentRDI Chloride % of daily values 12.34 Percent, with 2 decimal places
CholineMg measured in mg 123.456 Number, with 3 decimal places
CholinePercentRDI % of daily values 12.34 Percent, with 2 decimal places
chromiumMcg measured in mcg 123.456 Number, with 3 decimal places
chromiumPercentRDI % of daily values 12.34 Percent, with 2 decimal places
copperMg measured in mg 123.456 Number, with 3 decimal places
copperPercentRDI % of daily values 12.34 Percent, with 2 decimal places
folateMcg measured in mcg 123.456 Number, with 3 decimal places
folatePercentRDI % of daily values 12.34 Percent, with 2 decimal places
iodineMcg measured in mcg 123.456 Number, with 3 decimal places
iodinePercentRDI % of daily values 12.34 Percent, with 2 decimal places
ironMg measured in mg 123.456 Number, with 3 decimal places
ironPercentRDI % of daily values 12.34 Percent, with 2 decimal places
magnesiumMg measured in mg 123.456 Number, with 3 decimal places
magnesiumPercentRDI % of daily values 12.34 Percent, with 2 decimal places
manganeseMg measured in mg 123.456 Number, with 3 decimal places
manganesePercentRDI % of daily values 12.34 Percent, with 2 decimal places
molybdenumMcg measured in mcg 123.456 Number, with 3 decimal places
molybdenumPercentRDI % of daily values 12.34 Percent, with 2 decimal places
niacinMg measured in mg 123.456 Number, with 3 decimal places
niacinPercentRDI % of daily values 12.34 Percent, with 2 decimal places
pantothenicAcidMg measured in mg 123.456 Number, with 3 decimal places
pantothenicAcidPercentRDI % of daily values 12.34 Percent, with 2 decimal places
phosphorusMg measured in mg 123.456 Number, with 3 decimal places
phosphorusPercentRDI % of daily values 12.34 Percent, with 2 decimal places
potassium measured in mg 123.456 Number, with 3 decimal places
potassiumPercentRDI % of daily values 12.34 Percent, with 2 decimal places
riboflavinMg measured in mg 123.456 Number, with 3 decimal places
riboflavinPercentRDI % of daily values 12.34 Percent, with 2 decimal places
seleniumMcg measured in mcg 123.456 Number, with 3 decimal places
seleniumPercentRDI % of daily values 12.34 Percent, with 2 decimal places
thiaminMg measured in mg 123.456 Number, with 3 decimal places
thiaminPercentRDI % of daily values 12.34 Percent, with 2 decimal places
vitaminAMcg measured in mcg 123.456 Number, with 3 decimal places
vitaminAPercentRDI % of daily values 12.34 Percent, with 2 decimal places
vitaminB12Mcg measured in mcg 123.456 Number, with 3 decimal places
vitaminB12PercentRDI % of daily values 12.34 Percent, with 2 decimal places
vitaminB6Mg measured in mg 123.456 Number, with 3 decimal places
vitaminB6PercentRDI % of daily values 12.34 Percent, with 2 decimal places
vitaminCMg measured in mg 123.456 Number, with 3 decimal places
vitaminCPercentRDI % of daily values 12.34 Percent, with 2 decimal places
vitaminD measured in mcg 123.456 Number, with 3 decimal places
vitaminDPercentRDI % of daily values 12.34 Percent, with 2 decimal places
vitaminEMg measured in mg 123.456 Number, with 3 decimal places
VitaminEPercentRDI % of daily values 12.34 Percent, with 2 decimal places
vitaminKMcg measured in mcg 123.456 Number, with 3 decimal places
vitaminKPercentRDI % of daily values 12.34 Percent, with 2 decimal places
zincMg measured in mg 123.456 Number, with 3 decimal places
zincPercentRDI % of daily values 12.34 Percent, with 2 decimal places

Menu Item Data (from Menu Items)

When printing a Menu Item label, from a Menu page, you'll be able to access not only all the recipe data above, but also some specific Menu Item: 

Variable Name Description Example Variable Source Variable Usage
menuItemFoodCostCents Food Cost for the menu items 123.4567 Galley Number, with 4 decimal places
salesPriceCents Menu Item sales price in cents 123.4567 Galley Number, with 4 decimal places
unit Unit for the Menu Item Volume 12.34 Galley Percent, with 2 decimal places
unitFoodCostCents Unit for the food cost cents 123.4567 Galley Number, with 4 decimal places
volume Volume amount of the menu item 123.4567 Galley Number, with 4 decimal places
volumeSold Volume sold for the menu item 123.4567 Galley Number, with 4 decimal places

Menu Data (from Menus)

Variable Name Description Example Variable Source Variable Usage
menuConcept Concept of the menu, a single one Concept1 Galley Text
menuDate Menu date, in YYYY-MM-DD 2024-03-25 Galley Date
menuHeadCount Menu head count, in numbers, integer 10 Galley Number, integer
menuIsPerHead Menu volume mode, "Absolute" or "Per head" True/False Galley Boolean
menuLocation Location of the menu San Diego Galley Name of the Menu location
menuNotes Notes in the menu Notes for my Menu Galley text
menuTotalFoodCostCents Food cost for the entire menu 123.4567 Galley Number, with 4 decimal places

Printing tags (categories)

In addition to all data above, you're also able to print any Tag you want, and also use tags to filter and manipulate your data within the label. Galley supports printing by using tags from Recipes, Menus and Menu Items. To use them, follow these steps:

  1. Create, in Galley, a new tag for your Recipe, Menu or Menu Item. e.g. "Storage";
  2. Add values to the new tag and add it to one or more items. e.g. "Fridge", "Shelf";
  3. Create, in the Label, a new variable for the tag. The variable name is built by grouping a prefix, and the tag Name. e.g.:
    1. 'recipeTag_Storage" if that's a recipe tag;
    2. 'menuItemTag_Storage" if that's a menu item tag;
    3. 'menuTag_Storage" if that's a menu tag;
  4. Once you do that, the values for your new tag will be sent from Galley, separated by 2 semicolons, if more than one value is present. e.g. "Frigde;;Shelf";
  5. In the label, you can print the tag values, use them in functions, or use them as conditions for label behaviors. e.g. "If recipeTag_Storage contains Fridge, print a message 'Keep refrigerated'".

How can I work with the data? Which Functions can I use?

Now that you know what data Galley provides you with, you next should know that you'll need to manipulate part of that data using Loftware's embedded functions in the label. You can use several types of functions, as you can see here https://help.nicelabel.com/hc/en-001/articles/4402145586193-Functions.
Additionally, Galley provides you with some ready-to-go functions:

ParseIngredients

Depends on

Recipe data being printed from a Menu Item or a Recipe label

Description

The ingredient list has a standard format where the ingredients are separated by 2 semicolons, e.g. "Salt;;Onion". This function parses the ingredient list by separating the ingredients by simple commas and allows you to control the capitalization of the output.

Inputs

  1. capitalization: Tell the system if you want the output to keep the original format or if you want to change it to be lowercase or uppercase.
    1. Input type: string
    2. Input options: "original", "lowerCase", ", or "upperCase"

Outputs

  1. String with the list of items, separated by commas and capitalized based on your selection. Check the examples below for an ingredient list of "Salt;;Onion"
    1. original: "Salt, Onion"
    2. lowerCase: "salt, onion"
    3. upperCase: "SALT, ONION"

Usage

  1. Download and add the function to your label
  2. Change the capitalization if needed
  3. Change the function name to fit your use best, e.g., name it "OriginalIngredientsList" or IngredientsListUpper"
  4. Use the function as the source for a label object, e.g. Text box

ConvertUnitTemplate

Depends on

Recipe data being printed from a Menu Item or a Recipe label

Description

The conversions you get from Galley are a structured list that needs to be parsed in order to be used. This function takes a unit and quantity and converts the data into a target unit using the conversions described in the variable conversions.

Inputs

  1. quantity: The quantity you want to convert. You can type a number or use a different variable as the source.
    1. Input type: quantity variable or number
    2. Input examples: totalYield.Value, 150.50
  2. fromUnit: The source unit. You can type the unit name or use a different variable as the source.
    1. Input type: unit variable or string
    2. Input examples: yieldUnit.Value, "each"
  3. ToUnit: The output unit. You can type the unit name or use a different variable as the source.
    1. Input type: unit variable or string
    2. Input examples: nutritionalUnit.Value, "ml"
  4. decimals: The number of decimal places after conversion
    1. Input type: number (integer)
    2. Input examples: 2, 0
  5. showToUnitInResult: Select if you want to have the unit or just the value in the output
    1. Input type: boolean
    2. Input Example: True, False
      1. If set to True, the result will show the unit you're parsing to. e.g. "10g".
      2. If set to False, the result will show only the quantity number, e.g. "10"
  6. addSpace:  select if you want to add a blank space between the quantity and the unit
    1. Input type: boolean
    2. Input Example: True, False
      1. If set to True, e.g. "10 g".
      2. If set to False, e.g. "10g".

Outputs

  1. String with the converted value and unit, depending on your configuration
    1. decimals=4, showToUnitInResult=false: "12.2234"
    2. decimals=2, showToUnitInResult=true, addSpace=true: "12.22 each"
    3. decimals=0, showToUnitInResult=true, addSpace=true: "12 each"
    4. decimals=0, showToUnitInResult=true, addSpace=false: "12each"

Usage

  1. Download and add the function to your label
  2. Change the configurations as you see fit
  3. Change the function name to fit your use best, e.g., name it "ConvertYieldToFLOZ" or "ConvertNutritionalToEACH"
  4. Use the function as the source for a label object, e.g. Text box
  5. If you want to have more than one conversion, use multiple copies of this function and rename them

Where can I find templates for the data and functions?

Galley provides you all this data directly to your Loftware Cloud Control Center.

In your Control Center, in the page Documents, you'll see a folder called !Galley Default Files. Inside this folder, you'll see folders for Default Variables and Default Functions. Let's take a look at each.

Default Variables

The variables are separated into several different data sets, each containing a subset of variables:


Default Functions

In this section, you'll find files for all functions described in section above

 

Back to 🔝