Traceability and Serialization
Manufacturing & Traceability Guide
Manage serial number series, generate traceable identifiers, and track manufacturing data with full audit capabilities.
Table of Contents
- Overview
- Understanding Serial Number Series
- Creating a Series
- Format String Tokens
- Base Types & Encoding
- Reset Rules
- Generating Serial Numbers
- Records & Tracking
- Script Engine Integration
- Best Practices
1. Overview
The Traceability Management system provides enterprise-grade serial number generation and tracking for manufacturing environments. It supports:
- Configurable Formats — Build serial numbers with date tokens, sequences, and custom prefixes
- Multiple Base Types — Numeric, alphanumeric, hexadecimal, or alpha-only encoding
- Automatic Reset — Reset sequences daily, weekly, monthly, yearly, or per shift
- Global Uniqueness — Enforce company-wide uniqueness across all series
- Full Audit Trail — Track when, where, and why each serial was generated
- High Capacity — Support billions of unique identifiers per series
Use Cases: Product serial numbers, batch/lot identifiers, work order numbers, document numbers, asset tags, shipping labels.
2. Understanding Serial Number Series
A Series defines how serial numbers are formatted and generated.
| Component | Description |
|---|---|
| Name | Human-readable identifier |
| Format String | Template with tokens for building serial numbers |
| Base Type | Numeric, alphanumeric, hex, or alpha encoding |
| Reset Rule | When to reset the sequence counter |
| Current Value | The last sequence number used |
| Increment | How much to increase sequence each time |
| Min Length | Minimum digits/characters for sequence portion |
| Global | Whether to enforce company-wide uniqueness |
3. Creating a Series
Step 1: Open Traceability Management
Navigate to Manufacturing → Traceability.
Step 2: Click "Add Series"
Step 3: Configure the Series
Basic Settings:
| Field | Description | Example |
|---|---|---|
| Series Name | Descriptive name | Product Serial Numbers |
| Format String | Template with tokens | SN-{YYYY}{JJJ}-{####} |
Sequence Settings:
| Field | Description | Default |
|---|---|---|
| Starting Value | First sequence number | 0 |
| Increment By | Step between numbers | 1 |
| Min Length | Minimum sequence digits | 4 |
Advanced Settings:
| Field | Description |
|---|---|
| Base Type | Encoding system (see Section 5) |
| Reset Rule | When to reset (see Section 6) |
| Global Series | Company-wide uniqueness check |
Step 4: Preview and Create
The live preview shows what generated serials will look like. Click Create Series when ready.
4. Format String Tokens
Build your serial number format using these tokens:
Date & Time Tokens
| Token | Description | Example |
|---|---|---|
{YYYY} | 4-digit year | 2025 |
{YY} | 2-digit year | 25 |
{MM} | Month (01-12) | 06 |
{DD} | Day (01-31) | 15 |
{JJJ} | Julian day (001-366) | 166 |
{WW} | Week of year (01-53) | 24 |
{HH} | Hour (00-23) | 14 |
{NN} | Minutes (00-59) | 30 |
{SS} | Seconds (00-59) | 45 |
Sequence Tokens
| Token | Description | Example |
|---|---|---|
{SEQUENCE} | Sequence number | 0042 |
{####} | Sequence (alias) | 0042 |
Context Tokens
| Token | Description |
|---|---|
{SHIFT} | Current shift (A/B/C) |
{LINE} | Production line |
{PLANT} | Plant/facility code |
{BATCH} | Batch identifier |
{PART} | Part number |
Format String Examples
| Format | Result | Use Case |
|---|---|---|
SN-{YYYY}{JJJ}-{####} | SN-2025166-0042 | Standard product serial |
{YY}{MM}{DD}{SHIFT}-{SEQUENCE} | 250615B-00123 | Date-stamped with shift |
P{YY}{WW}-{####} | P2524-001A | Alphanumeric compact |
LOT-{YYYY}{MM}{DD}-{LINE}-{####} | LOT-20250615-L1-0001 | Manufacturing batch |
5. Base Types & Encoding
Choose how the sequence portion is encoded:
Numeric (Default)
| Property | Value |
|---|---|
| Characters | 0-9 |
| Capacity (4 digits) | 10,000 |
| Example | 0001, 0042, 9999 |
| Best for | Standard serial numbers, traditional systems |
Alphanumeric (Base36)
| Property | Value |
|---|---|
| Characters | 0-9, A-Z |
| Capacity (4 digits) | 1,679,616 |
| Example | 0001, 00A1, ZZZZ |
| Best for | High-volume, compact identifiers |
Hexadecimal (Base16)
| Property | Value |
|---|---|
| Characters | 0-9, A-F |
| Capacity (4 digits) | 65,536 |
| Example | 0001, 00FF, FFFF |
| Best for | Systems expecting hex values, electronics |
Alpha Only (Base26)
| Property | Value |
|---|---|
| Characters | A-Z |
| Capacity (4 digits) | 456,976 |
| Example | AAAA, ABCD, ZZZZ |
| Best for | Letter-only requirements |
Capacity Comparison
| Base Type | 4 Chars | 6 Chars | 8 Chars |
|---|---|---|---|
| Numeric | 10K | 1M | 100M |
| Alphanumeric | 1.7M | 2.2B | 2.8T |
| Hexadecimal | 65K | 16.8M | 4.3B |
| Alpha Only | 457K | 309M | 209B |
6. Reset Rules
Control when the sequence counter resets to the starting value.
| Rule | Description | Best For |
|---|---|---|
| Never (Default) | Sequence continues indefinitely | Product serials that must always be unique |
| Daily | Resets at midnight | Daily batch numbers, shift logs |
| Weekly | Resets Monday at midnight | Weekly production batches |
| Monthly | Resets on the 1st of each month | Monthly document numbering |
| Yearly | Resets on January 1st | Annual numbering schemes |
| Per Shift | Resets at each shift change | Shift-specific tracking |
Example with Daily Reset:
- Day 1:
0001,0002,0003 - Day 2:
0001,0002,0003
7. Generating Serial Numbers
From the UI
- Open a series in Traceability Management
- Click Generate
- Optionally enter work order and quantity
- Click Generate Serials
From Scripts
Use the serial object in the Script Engine:
function main(context) {
// Generate single serial
const sn = serial.next("ProductSerials", {
plant: "DET",
line: "L1"
});
// Batch generate
const serials = serial.batch("PartSerial", 5, {
line: "L1"
});
// Preview without consuming
const preview = serial.preview("ProductSerials");
// Get series info
const info = serial.info("ProductSerials");
return {
success: true,
data: { serial: sn, batch: serials }
};
}From Document Templates
Serial numbers can be generated during document generation by calling serial functions in the script that triggers generation.
8. Records & Tracking
Every generated serial number is recorded with full context for traceability.
Record Fields
| Field | Description |
|---|---|
| Serial Number | The generated serial |
| Series | Which series generated it |
| Work Order | Associated work order (if provided) |
| Generated At | Timestamp of generation |
| Generated By | User who triggered generation |
| Context Data | Plant, line, shift, and other context tokens |
Searching Records
Search for serial numbers by:
- Serial number (exact or partial match)
- Series name
- Work order
- Date range
Record Metadata
View metadata about generated serials including generation statistics and series utilization.
9. Script Engine Integration
The Script Engine provides full access to the traceability system.
Available Methods
| Method | Description |
|---|---|
serial.next(series, [context]) | Generate next serial (increments counter) |
serial.preview(series, [context]) | Preview next serial (no increment) |
serial.info(series) | Get series details (format, counter, etc.) |
serial.batch(series, count, [context]) | Generate multiple serials atomically |
serial.list() | List all available series |
Label Printing with Serials
function main(context) {
// Generate serial
const sn = serial.next("PartSerials");
// Create ZPL label with serial
const zplCode = zpl.fromTemplate("SerialLabel", {
serialNumber: sn,
partNumber: context.partNumber,
barcode: sn
});
// Print the label
manufacturing.printLabel(context.printer, zplCode);
return { success: true, data: { serial: sn } };
}Serial + Document Generation
function main(context) {
// Get product info from UDT
const product = tables.get("products", context.productId);
// Get the correct serial series for this product
const seriesName = product.value.serialSeries || "DefaultSerials";
// Generate serial
const sn = serial.next(seriesName, {
partNumber: product.value.partNumber,
workOrder: context.workOrder
});
// Generate certificate document
documents.generate("Product Certificate", {
serialNumber: sn,
product: product.value,
manufactureDate: new Date().toISOString(),
workOrder: context.workOrder
});
return { success: true };
}10. Best Practices
Format Design
- Include date tokens — Makes serials self-documenting
- Use Julian day for compactness —
{JJJ}instead of{MM}{DD} - Match industry standards — Some industries have specific requirements
- Plan for capacity — Consider future growth when setting min length
Series Organization
- One series per use case — Don't mix product serials with document numbers
- Descriptive names — "Product Serial - Widget A" not "Series 1"
- Document purpose — Record what each series is for
Global vs. Local Uniqueness
| Use Global When | Use Local When |
|---|---|
| Serials must be unique across your entire company | Serials are part-specific |
| Multiple series might generate similar formats | Different series have clearly different formats |
| Regulatory compliance requires absolute uniqueness | Performance is critical (local checks are faster) |
Reset Rule Selection
| Use Case | Recommended Reset |
|---|---|
| Product serials | Never |
| Daily production logs | Daily |
| Weekly batch numbers | Weekly |
| Invoice numbers | Never or Yearly |
| Shift labels | Per Shift |
Capacity Planning
- Calculate annual volume — How many serials per year?
- Add safety margin — Plan for 3-5x expected volume
- Consider format lifespan — Will this format last 10+ years?
- Test with high volumes — Verify performance at scale