Sequences
Sequences Overview
Sequences are a general-purpose mechanism for generating custom sequential identifiers across any resource that requires one. Rather than relying on system-generated IDs, sequences let you define a human-readable prefix and an alphanumeric sequence string that together produce predictable, unique identifiers — for example, PX-AST-QWASRT1 or ORD-2024-0001.
Currently, sequences are supported for assets (to generate serial numbers), but the design is intentionally resource-agnostic so that any resource requiring sequential custom identifiers can use the same mechanism.
How Sequences Work
When a sequence is created, it registers a prefix and a sequence string for a given resource. Each time an identifier is generated using that sequence, the system increments from the sequence string to produce the next unique value.
For example:
- Prefix:
PX-AST-, Sequence:001→ generatesPX-AST-001,PX-AST-002, ...PX-AST-009 - Prefix:
PX-AST-, Sequence:ABCDEF→ generatesPX-AST-ABCDEF,PX-AST-ABCDEG,PX-AST-ABCDEH, ...
Uniqueness Rules
The combination of prefix and sequence must be unique per resource. However:
- The same
prefixcan have multiple sequences (e.g.,PX-AST-withABCDandEFG) - The same
sequencevalue can belong to multiple prefixes - The same
prefix+sequencecombination can exist independently for different resources
Exhaustion
Sequences are finite. If the sequence string is 1, only 9 identifiers can be generated before it is exhausted. If you define 01 and 10 as separate sequences under the same prefix, the first will generate 10 identifiers before collision occurs. Once a sequence is exhausted, further creation attempts using that sequence will return an error.
Object IDs
All sequence object ids are prefixed with seq_.