> 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-integration.md).

# Product barcode integration

Import and export order, journal and invoice lines by product barcode instead of item number and product dimensions.

Warehouse systems, scanners and partners often know a product only by its barcode. **Product barcode integration** adds a **Product barcode** column to the line data entities of Dynamics 365: a file or an integration can then send the barcode alone, and Dynamics 365 finds the item number and the product dimensions (configuration, size, color, style, version) of the line from it. On export, the column carries the barcode of each line.

The barcodes come from the Advanced Suite [Shared product barcodes](/advanced-suite/barcode-management/shared-product-barcodes.md) (**Product barcodes**): one barcode per product and combination of product dimensions, shared by all legal entities.

## See it in action

A three-and-a-half-minute walkthrough: the product barcodes, a Data management export of a sales order with the barcode of every line, OData calls that read the barcodes and create a line by barcode, and a marketplace file imported by barcode alone.

{% embed url="<https://980223628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBT7AhPDmzqW9GObzesdP%2Fuploads%2Fgit-blob-adf7ffde084ce8a8e10f34da423c4257573a8573%2Fproduct-barcode-integration-demo.mp4?alt=media>" %}
Product barcode integration demo (3.5 min, Full HD)
{% endembed %}

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

|                   |                                                                                                                                                                               |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| License           | **Product barcode integration** add-on ([Pricing](/resources/pricing.md)), imported as described in [Activate license](/advanced-suite/getting-started/activate-a-license.md) |
| Configuration key | **Sales and marketing › Barcode › Product barcode integration** (*System administration › Setup › License configuration*)                                                     |

## Data entities

| Data entity                                       | Import              | Export |
| ------------------------------------------------- | ------------------- | ------ |
| Sales order lines V2, Sales order lines V3        | ✓                   | ✓      |
| Purchase order lines V2                           | ✓                   | ✓      |
| Inventory movement journal headers and lines V4   | ✓                   | ✓      |
| Inventory adjustment journal headers and lines V2 | ✓                   | ✓      |
| Inventory transfer journal headers and lines      | ✓                   | ✓      |
| Inventory counting journal lines                  | ✓                   | ✓      |
| Vendor invoice line                               | ✓                   | ✓      |
| Sales invoice lines V3, Sales invoice lines V4    | — (posted invoices) | ✓      |

Use the latest version of an entity — for sales order lines **Sales order lines V3**; the older versions are extended for the integrations already built on them.

The column is named **PRODUCTBARCODE\_ADVANCEDSUITE** in the data management files and **ProductBarcode\_AdvancedSuite** in OData. Data management maps it automatically when the source file has a column with that name.

## Import

When **Product barcode** is filled on a line:

1. The barcode is looked up in **Product barcodes**.
2. The product of the barcode gives the **Item number** — the item of that product released in the legal entity of the import — and the barcode's dimensions give the product dimensions of the line. In a transfer journal, the source and the destination product dimensions are both set.
3. Then the line is imported as if the item number and the product dimensions had been in the file: prices, units, costs and the other defaults of the item are filled as usual.

So the **Item number** and the product dimension columns may be left empty or out of the file. When the file has an **Item number** too, it must be the item of the barcode.

{% hint style="info" %}
**New sales order lines in Data management.** The key of **Sales order lines V2** and **V3** is the **Lot ID**, which is empty for a new line. In the mapping of the import project (**View map › Mapping details**), add a line with the staging field **InventoryLotId** and select **Auto-generated**, so every new line gets its own lot ID. OData doesn't need this.
{% endhint %}

A line is not imported, with one of these messages in the execution log, when:

| Message                                                                                       | Why                                                                      |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| Product barcode %1 is not found in Product barcodes.                                          | No product has this barcode in **Product barcodes**                      |
| Product %2 of product barcode %1 is not released in company %3.                               | The product exists but is not released in the legal entity of the import |
| Product barcode %1 is the barcode of item %2, not of item %3.                                 | The line names another item number than the item of the barcode          |
| Product barcode %1: the Product barcode column needs the Product barcode integration license. | The add-on license is not imported                                       |

Lines without a product barcode are imported exactly as before.

## Export

Each exported line carries in **Product barcode** the barcode of its item's product and its product dimensions, or nothing when **Product barcodes** has none for that combination.

## Example

A sales order line file that names only the barcode and the quantity:

```
SALESORDERNUMBER,LINENUMBER,PRODUCTBARCODE_ADVANCEDSUITE,ORDEREDSALESQUANTITY
000729,1,5012345678900,5
```

With the barcode 5012345678900 of product M0030, color White, size 4 in **Product barcodes**, the line is created for item M0030, color White, size 4, with its sales price and unit, as if these had been in the file.
