This article will show you how to encode a dynamic value into your barcode. This means each barcode can be unique to each pass issued. This is useful if you have your own value (like a membership number, SKU, or POS code).
There are 2 options.
Terminology
Barcode Payload
The data encoded within the barcode.
Dynamic Value
A value that changes or is unique for each barcode.
Field Key
A unique identifier for a specific data field within the pass.
Placeholder
A representation of a field key within the barcode payload, denoted by curly brackets (e.g., ${fieldkey}).
Meta Field
A custom data field that stores additional information, often used for dynamic barcode values.
API (Application Programming Interface)
A set of rules and specifications that software programs can follow to communicate with each other.
Zapier/Make
No-code automation platforms used to connect and integrate different applications.
Encode a value from a field already on the pass
You can encode the content of any field on the pass into the barcode.
To do this we need to add a placeholder in the barcode Payload field. This is made up by taking the field key and wrapping it in curly brackets.
Example - ${fieldkey}
The field key can be found in the field settings.
Finding the field key
Click on the field to open the field settings.
Using the example above, the placeholder will be ${meta.myData}
Adding the placeholder to the barcode Payload
This can then be added to the Encoded Barcode Content field.
Encode a value to be added when the pass is created (When using Zapier or the API)
With this option the data must be provided when the pass is issued. This can be done via the API or a no code solution like Zapier and Make.
In this case, you can provide any meta field key, making sure to populate this field when issuing the pass.
Example,
If I set the placeholder in the Barcode Payload field to be ${meta.barcode}, then I must use the following parameters when creating the pass using the API.
"metaData": {
"barcode": "My Barcode Value"
}
This data isn't displayed anywhere else on the pass, but is stored in the pass record and is used to populate any field with the corresponding placeholder.