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
- What variables can I use with Loftware Cloud/Nicelabel?
- How can I work with the data? Which Functions can I use?
- Where can I find templates for the data and 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:
- Create, in Galley, a new tag for your Recipe, Menu or Menu Item. e.g. "Storage";
- Add values to the new tag and add it to one or more items. e.g. "Fridge", "Shelf";
- 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.:
- 'recipeTag_Storage" if that's a recipe tag;
- 'menuItemTag_Storage" if that's a menu item tag;
- 'menuTag_Storage" if that's a menu tag;
- 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";
- 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?
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
- 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.
- Input type: string
- Input options: "original", "lowerCase", ", or "upperCase"
Outputs
- 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"
- original: "Salt, Onion"
- lowerCase: "salt, onion"
- upperCase: "SALT, ONION"
Usage
- Download and add the function to your label
- Change the capitalization if needed
- Change the function name to fit your use best, e.g., name it "OriginalIngredientsList" or IngredientsListUpper"
- 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
- quantity: The quantity you want to convert. You can type a number or use a different variable as the source.
- Input type: quantity variable or number
- Input examples: totalYield.Value, 150.50
- fromUnit: The source unit. You can type the unit name or use a different variable as the source.
- Input type: unit variable or string
- Input examples: yieldUnit.Value, "each"
- ToUnit: The output unit. You can type the unit name or use a different variable as the source.
- Input type: unit variable or string
- Input examples: nutritionalUnit.Value, "ml"
- decimals: The number of decimal places after conversion
- Input type: number (integer)
- Input examples: 2, 0
- showToUnitInResult: Select if you want to have the unit or just the value in the output
- Input type: boolean
- Input Example: True, False
- If set to True, the result will show the unit you're parsing to. e.g. "10g".
- If set to False, the result will show only the quantity number, e.g. "10"
- addSpace: select if you want to add a blank space between the quantity and the unit
- Input type: boolean
- Input Example: True, False
- If set to True, e.g. "10 g".
- If set to False, e.g. "10g".
Outputs
- String with the converted value and unit, depending on your configuration
- decimals=4, showToUnitInResult=false: "12.2234"
- decimals=2, showToUnitInResult=true, addSpace=true: "12.22 each"
- decimals=0, showToUnitInResult=true, addSpace=true: "12 each"
- decimals=0, showToUnitInResult=true, addSpace=false: "12each"
Usage
- Download and add the function to your label
- Change the configurations as you see fit
- Change the function name to fit your use best, e.g., name it "ConvertYieldToFLOZ" or "ConvertNutritionalToEACH"
- Use the function as the source for a label object, e.g. Text box
- 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:
- All Menu Data: Contains all the variables defined in
- All Recipe Data: Contains all the variables defined in
- Menu Data: Contains all the variables defined in
- Menu Item Data: Contains all the variables defined in
- Nutritional Macro Nutrients: Contains all the variables defined in
- Nutritional Micro Nutrients: Contains all the variables defined in
- Recipe Data: Contains all the variables defined in
- Tag Examples: Contains examples for using tags
Default Functions
In this section, you'll find files for all functions described in section above