Company Tag Reference Public

Core Concepts

The ideas behind ERPat ID Studio: employee ID versus tag serial, the ID-format token engine, templates and immutable versions, the generated-tag lifecycle, QR verification, and how a card is produced end to end.

Guide version: r1 Module version: 1.4.0 Updated: 2026-07-22 Estimated time: 3 min
Introduction

Core Concepts & Data Flow

A quick mental model of ID Studio: what an ID and a tag are, how templates are versioned, the states a card moves through, and how a card is rendered and verified.

Employee ID vs. tag serial

Employee ID

The business identifier printed on the card (e.g. ACME-2026-00421). Stored as the employee's Job ID and reused for every card that employee is issued. One per employee.

Tag serial

A unique, opaque per-card code (e.g. TAG-A1F4-8C20). Every generated card gets its own serial — a replacement reuses the employee ID but gets a new serial. The QR encodes the serial, never personal data.

The ID-format token engine

A format is a pattern of literal text and tokens. The rules the engine enforces:

  • Exactly one sequence token ({SEQ} or padded {SEQ:4}…{SEQ:10}).
  • Tokens: {COMPANY} {YEAR} {YY} {MONTH} {DEPT} {LOC} {SEQ} {JOBID}.
  • The generated ID must fit the Job ID column; the settings screen previews it and checks for length and collisions.
  • The reset policy partitions the counter: never = one running counter; yearly = a fresh counter per year; monthly = per month.

Why allocation can't collide

????
The counter lives in its own row and is handed out under a database lock, so two people (or two batches) allocating at the same moment always get different numbers. Gaps can appear if a run is cancelled — that's intentional and safe; numbers are never re-used.

Templates & versions

A template is a card design; its layout is stored as a validated JSON document (positions are percentages of the card, so it scales to full print resolution). Key ideas:

  • A template has a status: draft published archived.
  • Published versions are immutable. Editing a published template starts a new draft version — the published layout that cards were generated from never changes.
  • Generation always uses a template's published version, so a card is a faithful record of the design at the time it was made.
  • The layout is a declarative document, validated and sanitised on the server — never runnable HTML/JS.

The tag lifecycle

Every generated card (a tag) moves through these states:

StatusMeaning
generatedRendered and recorded; not yet printed or handed over.
printedMarked as physically printed.
issuedHanded to the employee.
expiredPast its validity date (shown automatically; the daily job also sets it).
revokedInvalidated with a required reason (lost/compromised).
replacedSuperseded by a newer card; the old and new cards link to each other.
????
Lineage is preserved. Replacing never edits the old card — it creates a new one and links them both ways (old → new, new → old). History stays intact and auditable.

How a card is produced

Published template (JSON layout)  +  Employee merge data
        │
        ▼
  Server renderer (draws each element at its % position)
        │
        ├──▶ Front PNG   ├──▶ Back PNG   ├──▶ CR80 PDF (85.6 × 54 mm)
        ▼
  generated_tags row  (unique serial · data snapshot · validity · file refs)
        │
        ▼
      Registry ──▶ print / issue / revoke / replace ──▶ QR verification

The data snapshot stored on the tag is the exact field data used at generation time, so a card's record never changes even if the employee's details later do.

Verification

A card's QR encodes a link like …/id/verify/<company>/<serial>. Scanning it opens a public page that reports only a status — valid, expired, revoked, superseded or unknown — and never discloses employee details.

Was this guide helpful?

Report a content problem