> For the complete documentation index, see [llms.txt](https://www.neptune.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.neptune.tech/advanced-suite/barcode-management/product-barcode-scanning.md).

# Product barcode scanning

The Scanning pane - type, paste or import barcodes, scan with a scanner on your computer or the phone, and see every result in the log.

The **Scanning** pane handles barcodes in the form you are working in — for example it opens the product, or adds the quantity to the matching line of a sales order. Open it from the settings menu (gear icon › **Scanning**).

## See it in action

A six-minute walkthrough: a sales order, a purchase order from a list copied from Excel and a stock count from the file of a handheld scanner, then a barcode scanner on the computer scanning straight into an order, the barcode types, and what developers can build on it.

{% embed url="<https://980223628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBT7AhPDmzqW9GObzesdP%2Fuploads%2Fgit-blob-27e5bd6b9dd5247c46c665e329a7b9527285c786%2Fbarcode-scanning-demo.mp4?alt=media>" %}
Barcode scanning demo (6 min, Full HD)
{% endembed %}

{% file src="/files/wewMKRgyWOBBRZEzuFmG" %}
Download the video (MP4, 19 MB)
{% endfile %}

## License

| Part of the pane                                                                                                         | License                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| Context, **Action**, **Manual entry**, **Import** (**From file**, **From clipboard**), **Serial port scanning**, **Log** | Included in the Advanced Suite base license ([Pricing](/resources/pricing.md))                                                   |
| **Real-time scanning** (the phone camera)                                                                                | **Scanning - Real-time scanning (users)** — see [Real-time scanning](/mobile-workspace/mobile-application/real-time-scanning.md) |

The base license comes with the standard actions for sales orders, purchase orders and inventory journals, supported by Neptune Tech. Missing a scanning process, in picking or manufacturing? [Tell us](/company/contact-us.md) what to add. X++ developers get the Scanning pane, the Serial port control and the other development tools free in the [Developer edition](/resources/pricing.md#advanced-suite-developer-edition), to build the actions they need — see [For developers](#for-developers-your-own-forms-and-actions).

The **Real-time scanning** group is shown only when its license is imported ([Activate license](/advanced-suite/getting-started/activate-a-license.md)) and its configuration key is on (**Scanning › Real-time scanning** in *System administration › Setup › License configuration*).

## Context and action

* The **context** is the form you are working in, for example *Sales order 000886*, or *(no context)*.
* **Action** lists what the pane can do with a barcode in that context; the default is selected. For example **Add quantity to sales order line** on a sales order. The actions on orders and journals are described in [Scan items into orders and journals](/mobile-workspace/mobile-application/real-time-scanning.md#scan-items-into-orders-and-journals).

On every form:

| Action                   | What it does                                                                                                                                                                                                                                                           |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Open product details** | Opens the product of the barcode.                                                                                                                                                                                                                                      |
| **Open sales prices**    | Opens the sales prices of the item of the barcode (as *Released products › Sell › Sales prices*), showing only the prices of the barcode's product dimensions — for example the prices of size 6, color Black. The log shows *Sales prices of M0030, 6, Black opened*. |

Both find the barcode in the Advanced Suite **Product barcodes** first, then in the item bar codes of the company.

Every barcode — typed, pasted, imported or scanned — goes to the selected action and gets a line in the **Log**.

## Manual entry

Type a barcode in the field and select **Find**.

## Import

A list of barcodes, one per line:

* **From file** (the up arrow) — choose a **.csv** or **.txt** file with one barcode on each line. The file is imported as soon as it is selected. Files up to 5 MB; a larger one gives *codes.csv: the file is larger than 5 MB. Import a list of barcodes, one per line.*
* **From clipboard** (the clipboard) — copy barcodes, one per line (for example a column in Excel, or the lines of a text file or an email), and select **From clipboard**. The first time, the browser asks to allow the site to see the clipboard; select **Allow**. If the clipboard is blocked, the pane shows *The browser did not allow reading the clipboard. Allow the clipboard for this site in the browser settings.*; with no text on the clipboard, *The clipboard contains no text.*

For both:

* Empty lines are skipped; spaces and quotes around a barcode are removed.
* A barcode that fails does not stop the others.
* The last log line sums the list up, for example *codes.csv: 25 barcodes processed, 2 with errors* (for a paste: *Paste: …*). A file without barcodes gives *codes.csv: no barcodes found. Put one barcode on each line.*

{% hint style="info" %}
With the action **Open product details**, every barcode of a list opens a product page. For a list, use an action that adds quantities, for example on a sales order or an inventory journal.
{% endhint %}

## Serial port scanning

Use a barcode scanner connected to a serial (COM) port, or a USB scanner set to serial (USB CDC / virtual COM) mode. A USB scanner in keyboard mode needs nothing: it types into **Manual entry** like a keyboard.

1. Select **Connect**. The browser lists the serial ports; select the scanner and **Connect**. While the port is open, **Connect** is disabled and **Disconnect** is enabled.
2. The status line says *Connected. Scan a barcode.* Every barcode the scanner sends is handled and logged, and the status line shows the last one, for example *Connected. Last barcode: 4601234567890 (3 scanned)*.
3. When the scanning is done, select **Disconnect** — or close the pane — to release the port for other tabs and programs.

* The scanner ends each barcode with CR, LF or CR LF; a scanner without a suffix works too (the barcode ends when nothing more arrives for 300 ms). With a suffix, barcodes stay whole however fast they come: a barcode the port delivers in pieces waits for its end, and a burst of barcodes is handled one by one, in order.
* More than 1,000 characters without a line end are not a barcode (usually a scanner set to another speed): they are ignored and the status line says *Connected. Data without a line end ignored - check the settings of the scanner.*
* To read a scanner on a form of your own, see [Serial port control](/development-tools/scanning/serial-port-control.md).
* The port opens at 9600 baud, the default of serial scanners; a USB scanner in serial mode ignores the speed. A scanner on an RS-232 port set to another speed needs to be set back to 9600.
* Serial ports work in **Microsoft Edge** and **Google Chrome** on a computer. In other browsers the status line shows *This browser can't open serial ports. Use Microsoft Edge or Google Chrome on a computer.*

## Real-time scanning

Pair the Dynamics Express app on a phone with the pane and scan with the phone camera — see [Real-time scanning](/mobile-workspace/mobile-application/real-time-scanning.md).

## Log

The **Log** lists your barcodes, the newest first: a check mark when handled, a red cross with the reason when not, for example *Unable to find product by barcode 4601234567890*.

Every log line also keeps the type of a scanned barcode — QR Code, Data Matrix, EAN-13, Code 128 … — as the phone or the serial port scanner reported it; Unknown for a code typed, pasted or imported, or from a scanner that doesn't send its type (see [Barcode type](/development-tools/scanning/serial-port-control.md#barcode-type)). The pane doesn't show it: its **Barcode type** column is hidden, a developer can show it in a form extension of `ScanningPanel_AdvancedSuite` (the grid control `Symbology`, **Visible** = **Yes**); actions read it with `parmSymbology()`.

## Barcode types

The pane handles the **text** of a barcode: it finds the product whose barcode in Dynamics 365 is exactly that text (**Product information management › Products › Item - bar code**, and the Advanced Suite product barcodes). So any barcode type works, linear or 2D, as long as the text inside it is the product barcode:

* **A barcode scanner** (serial port, or keyboard mode in **Manual entry**) reads the types it supports — most read EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, ITF, and 2D scanners also QR Code, Data Matrix, PDF417.
* **The phone** ([Real-time scanning](/mobile-workspace/mobile-application/real-time-scanning.md#barcode-types)) reads QR Code, Data Matrix, Aztec, PDF417, EAN-13, EAN-8, UPC-A, Code 128 (GS1-128), Code 39, ITF and GS1 DataBar.

{% hint style="warning" %}
**GS1 codes with several values** — a GS1 DataMatrix or GS1-128 with a GTIN, a batch and an expiry date in one code — arrive as one text, for example `0105901234123457` `10ABC123`. The pane doesn't split them into their values: such a code is found only when that whole text is the barcode in Dynamics 365.
{% endhint %}

## For developers: your own forms and actions

The pane is built on the open [Scanning framework](/development-tools/scanning.md): add [actions](/development-tools/scanning/actions.md) of your own, give your forms a [context](/development-tools/scanning/contexts.md), and change how scanned items reach [order and journal lines](/development-tools/scanning/order-and-journal-line-actions.md). Whatever you add works with every input — Manual entry, Import from a file or the clipboard, the serial port and the phone.

For example, an action that opens the document behind a barcode — a fixed asset tag, a sales order, a purchase order: [Example: Open document by barcode](/development-tools/scanning/example-open-document-by-barcode.md). Barcodes with serial numbers, or another process of your own: your team builds it on the framework, or Neptune Tech does it for you.
