TAGBASE

Custom data

Store your own values on every tag, and pick the right way to enter them.

View as Markdown

Custom data is a set of values stored on each tag of a product: a batch number, a distributor, a best-before date, an edition number. The TAGBASE verification page does not show the raw values. You use them in the tag’s title and description, read them from the tag list, show them your own way on a custom domain, and read and write them from your own systems over the API.

There are two ways to enter custom data. Which one fits depends on who types the values.

Which way to choose

  • If you or a teammate type the values, use a category. It gives you a form with the right input for each value, and everyone on the team fills in the same fields. This is the way we recommend.
  • If a system or a developer gives you the values, paste them into the Custom Data field on the product form.
  • If you want numbered items such as “1 of 50”, write {{number}} into a category field or into the Custom Data field. See numbering items below.

Ask the agent

The fastest way to a category is the TAGBASE Agent on the dashboard. Tell it what your products are. It proposes the fields and asks you to confirm, then opens the finished category for you to fine-tune. A prompt like this is enough:

We sell single-malt whisky. Each bottle needs the distillery,
the cask number, the bottling date, the alcohol by volume,
and which distributor received it. Build a category
for that.

Add or change fields the same way: “Add a batch number to the Whisky category.” The agent edits the data of a tag as well: “Set the batch of the tag with edition 2 of 15 to B-7.” The agent needs an AI provider connected under integrations. You can also build a category by hand on the Categories page.

With a category

Choose the category under Details when you create a product. Its fields appear on the form, and the values you fill in go to every tag of the product. Edit a single tag later to give it different values, for example a different distributor. The quickest way to reach one tag is to scan it.

With the Custom Data field

Open Show Advanced Options on the product form to find the Custom Data field. It takes JSON, the text format developers use to pass data between systems. It looks like this:

{"batch": "B-2024-07", "distributor": "Zanna Therapeutics"}

The names on the left are the keys, the text on the right the values. The whole thing must start with { and end with }. If you have never seen JSON, use a category instead. It gives you a form with the same result.

The product form shows the field only when you have not chosen a category. A tag always keeps both. When you edit a single tag, its typed fields and its raw data sit side by side.

Numbering items

When a product mints more than one tag, TAGBASE fills two variables into the values as it mints each tag, in category fields and in Custom Data alike:

  • {{number}}: the tag’s number, counting up from 1.
  • {{total}}: how many tags the product mints.

On a 50-tag product, {"edition": "{{number}} of {{total}}"} gives the first tag "1 of 50" and the last "50 of 50". Every tag keeps its own copy.

Minting sets the number once: add 50 more tags later and the first 50 still say “1 of 50”.

Editing a tag by scanning it

Sign in to the dashboard on your phone, then hold it to a tag of one of your products. Instead of the verification page you get the tag’s edit form: its title, its description, the category fields, and the raw data. Change what you need and press Save Tag. Changes apply to that one tag only.

This is the way to fill in values you only know when the item is in your hand, such as the distributor who receives it or the batch it came from. Walk down a shelf with your phone and update each item as you tap it.

The form opens only when the tag belongs to the team you have open in the dashboard, so switch teams first if you manage more than one. Press the button at the top to continue to the verification page. Press Sign Out to see what a customer sees: the next tap runs the normal check. Your own taps do not count in the statistics.

Using the values

Every key is a variable for the tag’s title and description. With the data above, a title of Print {{edition}} shows “Print 1 of 50” on the first tag and “Print 50 of 50” on the last. Category fields work the same way, for example {{distributor.name}}. The preview beside the form shows the first tag as you type.

A title can only use what its own tag carries, so put the value in the data first. The tag list on the product’s page shows each tag’s data.

Your own systems can read and write each tag’s data too, in bulk, over the tags API. Push batch numbers from a spreadsheet or an ERP, or set the distributor on a pallet’s tags the moment it ships.

Showing the values on your own domain

The verification page on TAGBASE does not show the raw values. A page on your own custom domain is yours to build: the verification result you get from the client library includes the tag’s data, category fields included, under data. Format a best-before date the way your customers read dates, or put the distributor’s name in a sentence. Values a team member typed in after scanning the tag arrive the same way.

Next: every scan of those tags appears in verifications.