# Barcode

Barcodes usually comprise of multiple codes combined into a single string, which you may want to parse during production.

TilliT allows for you to manually type in the barcode, but if you are using a mobile device, you can download a third-party Barcode Keyboard to scan barcodes instead. Barcode keyboards present an option in your device's on-screen keyboard to utilise it's camera as a barcode scanner. You can find whichever one suits you by searching "Barcode Keyboard" in your device's app store.

In this example, the user is using and android phone and has installed [Scanner Keyboard by TEC-IT](https://play.google.com/store/apps/details?id=com.tecit.android.barcodekbd.demo) as their keyboard. When the user taps in the barcode field, the keyboard is brought up. They tap the barcode option presented in the keyboard (highlighted with the red box). They then tap "Scan Barcode". The camera opens and a yellow box shows that it detects a barcode, translates this to a text string and inputs into the field in TilliT.

<figure><img src="https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/6281dfa28bf21a2e2b6d44a0/file-Pv5zHWqQbY.png" alt=""><figcaption></figcaption></figure>

To parse a barcode, the Barcode data type requires you to configure two properties:

* Barcode field length
* Barcode fields

For this example, we will parse an EAN 13-digit barcode. First we must create the elements in TilliT in which we wish to parse the fields to:

![](https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/6281eac18c9b585083489dcd/file-4hbz41EYSh.png)

We set the field lengths as 2,5,5,1 and the Barcode fields set as CountryCode,ManufacturerCode,ProductCode,Checksum using the item keys from the above elements. So now we have 4 field lengths and their related fields defined:

![](https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/6281eb6a8c9b585083489dce/file-m78ouSk59J.png)

Now we enter the barcode in TilliT and the Barcode will Parse the fields across to each item:

![](https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/6281ebe88bf21a2e2b6d44eb/file-nDJbhbuJpK.png)

If we decide we only need some of the data from the barcode, we can leave fields blank and delete the elements we don't need. For example, if all we wanted was the Manufacturer and Product codes, we could delete the Country Code and Checksum elements. We leave the barcode length, but re-configure the Barcode fields:

<br>

<figure><img src="https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/6281ecaec01fce37d9b136ac/file-sKR6LNVuHJ.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/6281ed6968d51e7794440938/file-tXFYmhflaF.png" alt=""><figcaption></figcaption></figure>

Notice the Barcode field length is still defined to parse the barcode into 4 strings, which is still required to define where to break up the barcode. However, the Barcode fields only state the 2nd and 3rd field, leaving the other 2 as null. This allows us to define which fields we are parsing and which we are ignoring. In the activity, we see the field completing the elements as before.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.tillit.cloud/tillit/knowledge-base/setting-up-tillit/activity-templates/activity/elements/data-types/barcode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
