Auto-code policies make it easy to automatically generate an identifier (e.g. name, ID) for a large number of records such as barrels or tanks using a pre-defined convention. Using auto-codes is not only faster, but also ensures consistency.
Auto-code policies can be set up for the following record types:
|
|
To rectify this, please locate the relevant Auto-Code Policy in your defaults and set it to '[Reset...]' temporarily while you update and save the changes to the auto-code. Remember to set the default back appropriately once the Policy has been updated.
Configuring an Auto-Code Policy
You can configure an auto-code policy from the Winery Set up window:
- Click
Set Up in the sidebar.
- Click General.
- From the Auto-Codes tile, click Configure.
- Click New Auto Code Policy. The Auto-Code Policy window displays.
- Specify the details for the policy including:
- Auto-Code Policy Name — A name for the policy.
- Auto-Code Policy Type — The type of record that the policy applies to.
- Add the policy’s code elements.
- Click Save.
You can also set the default auto-code policy for the record type. See the note above regarding updating existing auto-codes if they are set as defaults.
Code Elements
Each auto-code policy is made up of one or more code elements. Code elements are the individual parts of the identifier generated by the auto-code policy. When these code elements are combined, they result in a unique name for the record.
For example, you could create an auto-code policy for trial blends that creates a code using the year, the text 'TB-', followed by a three-digit number (e.g. 2020TB-001, 2020TB-002, 2020TB-003).
There are three types of code elements available for auto-code policies:
-
Attribute — An Attribute is a characteristic of the record that you’re adding. Available attributes will depend on the selected auto-code policy type. For example, if you’re adding an auto-code policy for batches, the attributes available include the vintage, owner, grower, and vineyard. If you’re adding an auto-code policy for barrels, the attributes include the purchase year, capacity, oak type, and cooper. The various attributes are explained in-depth at the end of this support article.
-
Inc — The Inc code element adds an incrementally increasing number in your auto-code policy. When you select the Inc code element type, you’ll need to enter 0s (zeroes) in the Value field to specify the number of digits for the generated number. For example, to generate two-digit numbers (e.g., 01, 02, 03), enter 00 in the Value field. To generate three-digit numbers (e.g., 001, 002, 003), enter 000 in the Value field and so on. Each auto-code policy must include a numbering function to ensure that generated name are unique, and Inc is appropriate in most instances.
TIP: The Batch auto-code policy allows you to use a unique Batch Number as well as/instead of the Inc function. - Text — The Text code element type includes static text in the generated code. Including text can help with the readability of the code and make it easier for you to distinguish record types from one another. For example, you could include the text BRL for barrels, BIN for bins, and GYR for gyro cages. Adding a hyphen (dash) as a Text element is another good way to make codes more legible.
Using an Auto-Code Policy
Once an Auto-Code Policy is in place, it can be used whenever you create a new entity of the relevant type within vintrace. For example, if you make a Barrel auto-code policy, you can use that auto-code policy to automatically name any new barrels you create within your database.
If you have not specified a default policy for the record type, a wand icon displays beside the Name field to indicate that an auto-code policy is available to use. To select an auto-code policy:
- Click the
wand icon.
- Select the Auto-Code Policy that you want to use.
Using an Auto-Code Policy to create multiple barrels or bins
Auto-codes can be used to quickly create and name multiple items with the same characteristics. For example, if you’re setting up multiple barrels of the same type you can enter the common properties of the barrels (e.g. Capacity, Year, Oak Type and Cooper), then simply indicate how many barrels you wish to create and vintrace will create and name the barrels for you accordingly. The properties you have entered will be applied to each of the new items. Only the incremental numbering of the item name will change.
- Click
Set Up in the Navigation Bar
- Click Vessels
- From the Barrels or Bins tile, click Configure
- Click New Barrels/Bins...
- Click the
Magic Wand icon to select an appropriate Auto-Code Policy*
- Specify the common properties of the items to be created
- Specify the number of items to be created
- Click Save
* If you have a policy set as default, this step is already done for you.
Configuring a Default Auto-Code Policy
After you’ve added an auto-code policy, you can configure vintrace to use the policy by default when you create a record. For example, if you have multiple auto-code policies for bins, you can select one of those policies to be the default when new bins are added.
Users will still have the option to override the default and select a different policy.
You can specify the default auto-code policies from the Winery Set up window:
- Click
Set Up in the Navigation Bar.
- Click General.
- From the Defaults tile, click Configure.
- Choose the System, Winery (for multi-winery databases) or User tab depending on who you want to set the default for.
- From the Auto-Code Policies section, select the default policy that you want to use for the record type.
- Click Apply before navigating away from this screen.
More information on defaults can be found in the Setting Up Defaults support article.
Overriding the Default Auto-Code Policy
If a default auto-code policy has been selected for a record type, [Auto Code] displays in the Name field.
To override the default auto-code policy:
- Click the
icon displayed beside the field to de-select the auto-code policy.
- To select another auto-code policy, click the
wand icon, then select the auto-code policy that you want to use.
Custom Codes
Custom codes only apply to batches, bins, and gyro cages.
The CustomCode attribute provides another way to further customize the identifiers for your batches, bins, and gyro cages. For example, suppose you have an auto-code for batches with the following code elements:
- Vintage
- Variety
- Region
- 3-digit increment number
Now suppose you also want to include an identifier for the winery in the custom code. For example, you want batches for JX2 Estate to include JE in their name so that you can easily identify them.
To use a custom code in your auto-code policy:
- Set up a custom code from the Winery Set up window (Set up > General > Custom Codes). The text entered in the Code field is what will be included in the identifier. Be sure to select the record type(s) that the custom code can be used for. If the custom code can be used for naming batches, select the Batch checkbox. If the custom code can be used for bins or gyro cages, select the Vessel checkbox.
- Set up an auto-code policy that includes a custom code in its code elements.
- Create the new record being sure to select the correct auto-code policy and custom code. In this example, we create a wine batch that uses the policy and custom code that we set up in the previous steps.
This example creates a wine batch named 20JECSNV001.
Auto-Code components defined
Common Auto-Code attributes
- Year: Full four digit code, i.e. 2025 displays as ‘2025’
- Year YY: Last two digits, i.e. 2025 displays as ‘25’
- Year Y: Last digit only, i.e. 2025 displays as ‘5’
Common user-defined Auto-Code attributes
- Owner: the auto-code element set against the Owner in their Address Book entry
- Grower: the auto-code element set against the Grower in their Address Book entry
- Vineyard: Set Up > Fruit Sources > Fruit Sources > select grower > edit vineyard <or> Blocks > Select block from vineyard, vineyard/grower tab, pencil tool on ‘Vineyard’
- Block: Set Up > Fruit Sources > Fruit Sources > select grower > select vineyard > select block <or> Blocks > select block > Block Details tab > pencil tool on ‘Main’
- Region: Set Up > Fruit Sources > configure Regions
- Variety: Set Up > Fruit Sources > configure Varieties
- Grade:
- Vintage Autocode: follows whatever you have input in the ‘auto-code’ field against the vintage entry in set up. Set Up > Winemaking > configure Vintages
Record-type specific Auto-Code attributes
Batch
Note: The ‘Batch Number’ attribute type and ‘Inc’ (incremental numbering) type for batch naming are independent of one another.
The ‘Inc’ option counts up incrementally within a batch type but resets for a new type, e.g. a Paso Robles 2025 Cab Sauv might be PR25CAS01 for the first batch and then PR25CAS02 for the subsequent batch created, while a Stag’s Leap Cabernet starts the counter afresh with SL25CAS01 as it’s a different type of batch.
‘Batch Number’ will assign a universally unique number that counts up with every batch in your database, regardless of other details. In the example above you might end up with PR25CAS0001, PR25CAS0002 and SL25CAS0003.
You can choose to use one or both numbering options, but a batch name Auto-Code does require at least one of these options.
Create different auto-code presets for different wine stages
Product Category cannot be captured against a brand new batch
Batch Type - automatically applies the code ‘WB’ to signify Wine Batch
Batch Number - automatic incremental count up of a unique batch number. This is defined by setting up a separate Auto-Code of the type ‘Batch Number’. This Batch Number Auto-Code can be set up with just numbers (recommended in most cases) using the ‘Inc’ setting within it, but also allows for a simple text component if required.
Product Category > Set Up > Classification > Product Categories
Product - auto-code assigned to a Product, as per the Products Allocation module. Products > Plus symbol > Add a product
Program - Set Up > Classification > Configure ‘Programs’
Product State - Set Up > Winemaking > Product States
Fraction Type 1 Char and 2 Char - indication of fraction type of the wine as per below:
- M/MU: Must
- F/FR: Free Run
- P/PR: Pressings
- C/CO: Combined
- L/PL: Pressings (Light)
- H/PH: Pressings (Heavy)
- O/OP: Pressings (Overnight)
- D/DR: Drainings
- S/SN: Saignée
- L/LS: Lees
- U/UN: Unknown
- N/NC: Condensate
Barrels
- Forest - Takes the auto-code element you enter against the Forest entry. (Set Up > Vessels > Forest Types)
- New or Used - Displays an ‘N’ for barrels unless flagged as purchase used, then ‘U’
- Capacity - Capacity in Litres or Gallons in numerical form, e.g. ‘225’ or ‘59’
- Cooper - The autocode element set against the cooper in their Address Book entry. More Options > Open Address Book > locate the Cooper’s entry and click to edit > ‘Edit’ next to Cooper role
- Oak Type - A single letter indicator of oak type, as follows:
- A: American
- B: Bulgarian
- C: Canadian
- E: Eastern European
- F: French
- H: Hungarian
- I: Acacia
- K: Slovakian
- M: Central European
- O: Other
- R: Russian
- S: Slovenian/Slavonian
- X: French Acacia
Fruit Intake
- Vintage AutoCode Value - the value you enter against the ‘auto-code’ field while creating/editing the vintage entry. Visit Setup > Winemaking > Vintage to edit these.
- Grade - The grade assigned to the fruit at intake, either on the scheduled booking or on an unscheduled intake. Visit Setup > Classification > Grading scales to edit these*
- Batch Type - an automatic designation of ‘PB’ in the code, short for ‘Parcel Batch’ to indicate a fruit parcel.
- Owner, Grower, Region, Vineyard, Variety - derived from the auto-code field entered against the relevant entity when creating/editing them. See ‘common user defined autocode elements’ above.
- Batch Number - Coincides with the Booking Number for the intake. This is usually an automatic, incremental count up, but can be manually input at time of booking/receival if required.
- Product Category - Deprecated. Do not use this.
- Block - The auto-code assigned to the source Block e.g. ‘5507PN’. See ‘common user-defined autocode elements’ above
- Block Name - the full name of the source Block e.g. ‘Pinot Noir Home Block 2’. See ‘common user-defined autocode elements’ above
*Not recommended for general use as it enforces a grading at time of booking/receival and will not allow the completion of the booking or intake without a grading in place.
Crush Load
All date information is filled from Start Date on the Crush/Press Load
- yyyy - four digit year code e.g. ‘2025’
- yyyymmdd - eight digit date code e.g. July 17 2025 presents as ‘20250717’
- Month Year - three letter month code and four digit year, e.g. ‘Jul 2025’
- Day Month - date in numeric code, eg. July 17 presents as 17/07
- Month - full name of month, e.g. ‘November’
- Date Portable Day - numeric date as year, month, day e.g. July 17 2025 is ‘2025-07-17’
- Grade, Region, Variety - refer to user defined common auto code elements above