Skip to content

Activation key formats & batches

By default Oclavex issues an activation code as a random string. A key format replaces that with a format you choose: your prefix, a running number, the issue date, a check character. The same format also lets you generate codes in batches ahead of time, for a campaign or a reseller order, and to import codes you generated elsewhere.

The format belongs to an entitlement, and applies to every code issued from it. Codes issued before you set a format keep working unchanged.

ACME - 2607 - 000042 - 7Q4K9 literal text your prefix DATE:yyMM July 2026 SEQ:6 42nd code issued RAND:4 + CHK unguessable + typo check ACME-{DATE:yyMM}-{SEQ:6}-{RAND:4}{CHK}
Token Produces
{RAND:n} n random characters from the alphabet
{SEQ:n} the next number, zero-padded to n digits
{DATE:fmt} the issue date in UTC — yyyy, yy, MM, dd, HH, mm
{CHK} a check character over everything before it; must come last

Anything outside braces is literal text. Write {{ or }} for a literal brace.

The portal shows example codes as you type, so you can see the format before you save it. Those examples come from the same generator that issues real codes, so what you see is what customers get.

The default alphabet is Crockford Base32, which leaves out I, L, O and U. That is not arbitrary: it removes the characters people misread when copying a code off a printed card or reading one out over the phone. 0 and O can no longer be confused because O is never issued.

You can also pick digits only, hexadecimal, uppercase alphanumeric, or supply your own set.

Because the ambiguity is designed out, Oclavex can also be tolerant about it at redemption: if a customer types O where the code has 0, the code still resolves. You can turn that off per format.

{SEQ} draws from a counter you can scope to the entitlement, the product, or everything you issue. Two properties to know before you rely on it:

  • Numbers can have gaps. They are handed out in blocks, so a batch that fails or is abandoned leaves its numbers unused. The alternative would mean pausing all issuance while any one batch is being generated.
  • A lower number does not mean an earlier code. Two batches generated at once finish independently. If you need issue order, put {DATE} in the template — that is the clock.

The counter makes codes readable and traceable. It is not what keeps them unique: that is enforced separately, so a code is never issued twice even if the counter is restored from a backup.

Generate creates codes from the format and hands you the list once, as a CSV download. Save the file at that moment — the list is not shown again, though the codes stay listed on the entitlement and are tagged with the batch label you gave.

Each code becomes an ordinary activation code, so nothing about redemption changes: a customer activates a pre-generated code just as they would one you issued to them directly.

Import registers codes you generated somewhere else — carrying over an existing scheme, or migrating from another system.

Run it as a preview first. The preview reports exactly what a real run would do — how many would be registered, which repeat within your file, which already exist — without saving anything.

Case and separators are still ignored for every code, imported or generated — acme f001 and ACME-F001 are the same code. Only the look-alike substitution is skipped for imported codes.

In the portal, open an entitlement:

  • Policies tab → Activation Key Format to set or change the template.
  • Activation codes tab → Generate batch or Import codes.

A format can only be changed while the entitlement is offline for editing, like the entitlement’s other policies. Already-issued codes stay valid, but the format still sets how they are matched at redemption — the look-alike tolerance above — so a change is not confined to future codes.