Warehouse Apps
Contact

Setting up PackScan and Inventory

This guide walks you through everything that needs to be configured in Dolibarr and on the smartphone. Allow one to two hours for the technical part. Assigning storage locations takes longer depending on your range, and the inventory app helps with that.

Applies to PackScan and Inventory 1.2.1, tested with Dolibarr 24.0. Menu names are taken from the English Dolibarr interface and may differ slightly depending on version.

1Try first

Both apps run as a demo with test data, without installation. Best open them right on your smartphone, then you can test the scanner too.

Test with your own Dolibarr

You can also connect the demo to your Dolibarr: gear icon top right, switch off demo mode, enter API URL and token, “Test connection”. Dolibarr sends the required permissions (CORS) out of the box. Depending on server configuration, proxy or security module, the connection from another address may still be blocked. The most reliable test is with the self-hosted files from step 8.

Use a separate user for testing. Create a user for the test that may only read (permissions see step 7). You then see pick list, shipments and stock but cannot change anything. URL and token only stay in your smartphone's browser. In the settings, “Delete all settings on this device” removes them again.

2Requirements

  • Dolibarr version 24 or later (older versions on request)
  • Dolibarr is reachable via HTTPS. Without HTTPS the smartphone does not release the camera.
  • Products have a barcode (EAN) or a GTIN in the complementary attribute
  • Orders arrive in Dolibarr as sales orders, e.g. via import from eBay, WooCommerce or other marketplaces
  • A smartphone with camera: iPhone with iOS 16 or later (Safari) or Android 10 or later (Chrome)
  • Wi-Fi in the warehouse. Every scan queries Dolibarr live.

3Enable modules

Under Setup › Modules/Applications these modules must be enabled:

ModulePurpose
ProductsItems, images, storage location
Barcodes“Barcode” field on the product. Choose EAN13 as default type.
StocksWarehouses, stock, stock movements
Sales OrdersBasis of the pick list
ShipmentsPacking and completing shipments in PackScan
API / Web services (REST server)Interface through which the apps talk to Dolibarr

4Check stock booking

Stock may only be decreased in one place. Check under Setup › Modules › Stocks (gear icon) when Dolibarr decreases stock for you:

  • Decrease on validation of order or invoice (common with marketplace imports): then “Decrease real stocks on shipping validation” must be off . Otherwise completing the shipment in PackScan books a second time.
  • Decrease only on shipping: Then only this option stays on, and the other two are off. PackScan validates the shipment, and Dolibarr decreases the stock in the process.
Quick test: Run a test order completely and then check under stock movements that every item was decreased exactly once.

5Create complementary attributes

You create complementary attributes in the respective module: Setup › Modules › Products or Sales Orders, there the tab “Complementary attributes”. The attribute code must be lower case without spaces. If you use other codes, enter them in the app settings.

On the product

Attribute codeLabelTypeRequired?Purpose
lagerplatzStorage locationString, length 32yesSorting of the pick list, wall grid, suggestion in the inventory app
gtinGTINString, length 14noSecond barcode, e.g. manufacturer code if the barcode field contains your own code
letzte_inventurLast inventoryDate and timenoTime of the last count. You can filter by it in the product list.

On the sales order

Attribute codeLabelTypeRequired?Purpose
gepicktPickedDate and timeyesPackScan sets it on release after picking. Released orders disappear from the pick list.
umgebuchtTransferredDate and timeonly with shipping automationProtection against double transfer in the shipping run
dhl_shipment_numberTracking numberString, length 64only with shipping automationOrders with a tracking number count as shipped and no longer appear in the pick list

Tip: for “Visibility”, “only on detail view” is enough, then the list stays clear.

6Shipping methods

On completion PackScan enters the shipping method on the shipment if none is set yet. This is based on the tracking number: Internetmarke numbers start with A0 and get the letter shipping method, all others the parcel shipping method.

Under Setup › Dictionaries › Shipping methods:

CodeLabelTracking URL
DHLDHL Parcel (exists, only activate)https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?piececode={TRACKID}
DPAGDeutsche Post (create new)https://www.deutschepost.de/de/s/sendungsverfolgung.html?piececode={TRACKID}

Other codes, e.g. for Hermes or GLS, are entered in PackScan under settings.

7API user and permissions

Create a separate user for the apps, not an administrator. That way you can see exactly in Dolibarr which bookings come from the apps and can block access at any time.

  1. Users & Groups › New user, e.g. login lager-app. Not an administrator, not an external user.
  2. In the tab “Permissions” set the permissions from the table.
  3. In the user card click “Modify” and generate a token in the field “Token for API”. Depending on version this is in its own tab “Tokens for API”.
  4. Copy the token. It is entered in the apps under “API key (DOLAPIKEY)”.
ModulePermissionTest onlyPackScanInventory
ProductsRead products✓✓✓
ProductsCreate/modify products✓ storage location, last inventory
StocksRead warehouses and stocks✓✓✓
StocksRead stock movements✓✓✓
StocksCreate/modify stock movements✓ stock correction
Sales OrdersRead customers orders✓✓
Sales OrdersCreate/modify customers orders✓ field “picked”
Sales OrdersClose customers orders✓
ShipmentsRead shipments✓✓
ShipmentsCreate/modify shipments✓ tracking number, shipping method
ShipmentsValidate shipments✓
Third partiesRead third parties✓✓ customer name

The app reads product images and shipping methods with the same permissions, nothing extra is needed.

8Install the apps

The apps are simple files; they need no installation on the server and no database. The easiest way is to put them into the customfolder of your Dolibarr installation. The app then detects the API URL by itself.

  1. Download PackScan-Inventur_v1.2.1.zip and unzip it. Alternatively clone the repository from GitHub .
  2. Create folder: htdocs/custom/lager/
  3. Copy the contents of the folder lager-apps into it: index.html, packscan.html, inventur.html, the two *.manifest.json and the icons *-192.png, *-512.png, *-maskable-512.png.
  4. Open in the browser: https://your-dolibarr.com/custom/lager/. The start page links both apps.

The apps can also be on another web server. Then you enter the API URL manually; it is always https://your-dolibarr.com/api/index.php.

9Set up the smartphone

PackScan and Inventory are web apps. They run in the browser but can be added to the home screen like a normal app and then start full screen. No app store is needed.

iPhone (iOS)

  1. Open the app address in Safari
  2. Share icon › “Add to Home Screen”
  3. Start the app via the new icon
  4. Allow camera access once

Android

  1. Open the app address in Chrome
  2. Menu ⋮ › “Install app” or “Add to Home screen”
  3. Start the app via the new icon
  4. Allow camera access once

Then open the gear icon in each app once, enter API URL and token and tap “Test connection”. Both apps share URL and token if they are at the same address.

10App settings

You reach all settings via the gear icon top right. They apply per device, so each smartphone is set up once.

Shared by both apps

SettingDefaultMeaning
Dolibarr API URLautomatic in the customfolderAddress of the REST API
API key (DOLAPIKEY)emptyToken of the API user
Extra field code storage locationlagerplatzAttribute code on the product
Extra field code GTIN/EANgtinSecond barcode, searched if the barcode does not match
Demo modeoff (on in the public demo)Test data instead of Dolibarr
LanguageBrowser language24 languages: German, English, French, Spanish, Italian, Portuguese, Dutch, Polish, Czech, Slovak, Hungarian, Romanian, Bulgarian, Croatian, Slovenian, Greek, Swedish, Danish, Norwegian, Finnish, Estonian, Latvian, Lithuanian, Ukrainian. If the browser language is not supported, the app starts in English.
FlashlightoffStays on until you switch it off, even after restarting the app

PackScan only

SettingDefaultMeaning
Only invoiced orders in the pick listonOn: only validated orders with status “billed”, i.e. paid marketplace orders. Off: all validated orders.
Hidden productsDE_*, eBayPlus, DUMMYReferences that are never picked, e.g. postage lines. * stands for any characters.
EAN: highlighted last digits44, 5 or 6 final digits large next to every item
Grid: row 1 is at thetopCounting direction of the rows in the wall grid
Extra field code “picked”gepicktDate field on the sales order
Shipping method code parcel / letterDHL / DPAGEntered if the shipment has no shipping method yet
Close order after packingonSets the sales order to “Delivered”
Also close shipmentoffCloses the shipment after validation. Only switch on if you need closed shipments.
Reset counted quantities to 0Resets the pick progress on this device

Inventory only

SettingDefaultMeaning
Extra field code last inventoryletzte_inventurDate and time field on the product
Select warehouses and orderall warehousesWhich warehouses appear when counting and in which order
Clear “Recently counted”Clears the list of recently counted items
Export inventory listOn the inventory start screen: count sheet (sorted by storage location, expected stock per warehouse, field for actual) or inventory log (booked corrections of a period) as PDF or CSV. The selected warehouses apply.

11Where the data is stored

The apps have no server and no database of their own. There are only two places:

In your Dolibarr

  • Storage location, GTIN and last inventory on the product
  • Stock corrections as stock movements with inventory code
  • “picked” on the sales order
  • Tracking number, shipping method and status of the shipment
  • Status of the sales order

In the smartphone browser

  • API URL and token
  • All settings from step 10
  • Pick progress and started shipments, in case the app is closed in between
  • Last assigned storage location and the list of recently counted items

The data in the browser is kept in the website's local storage; all keys start with ps_. Both apps share this storage if they are at the same address. Camera images are only processed on the device and neither stored nor transmitted.

To delete: tap “Delete all settings on this device” in the settings or delete the website data in the browser settings. Everything in Dolibarr is kept.

If an employee loses their smartphone, simply delete or renew the token of the API user in Dolibarr. The device then has no access.

12Assign storage locations

A storage location is text with dots and describes the way from front to back: room, wall or shelf, row, column. The last two parts are always row and column.

ExampleMeaning
2.LW1.3.12Room 2, pegboard 1, row 3, column 12
1.R4.2.5Room 1, shelf 4, level 2, slot 5
2.SLW.E1.2.11Room 2, cabinet pegboard, level 1, row 2, column 11
  • Row and column must be numbers. The pick list sorts numerically, so 2 before 10.
  • All items with the same beginning, e.g. 2.LW1, form one wall. PackScan draws it as a grid.
  • The quickest way is with the inventory app: walk along the wall from left to right, scan, save. If an item has no location yet, the app suggests the last saved one plus one column. With + and − you change each part individually.

13Daily workflow

  1. Picking: PackScan, tab “Pick list”. Scan items in order or type the quantity. At the end “Release picked orders”.
  2. Create shipments: with the shipping automation via shipping run, otherwise in Dolibarr on the order “Create shipment” and enter the tracking number.
  3. Packing: PackScan, tab “Shipments”. Scan the label or Internetmarke, then every item. After the last item the app closes shipment and order.
  4. Inventory: on the side, whenever there is time. Scan the item, check location and quantity, save.

14Troubleshooting

MessageCause and solution
Camera does not start, NotAllowedErrorThe page is not served via HTTPS, or camera access was denied. Allow it in iOS under Settings › Safari › Camera or in Chrome via the lock icon next to the address.
HTTP 401Token wrong or expired. Generate a new one in Dolibarr and enter it in the app.
HTTP 403The API user lacks a permission. Check the table in step 7.
Failed to fetch / Load failedWrong address, Dolibarr not reachable or only via HTTP. Open the API URL in the browser: …/api/index.php/status must return a response.
Pick list emptyOrders must be validated. If “Only invoiced orders” is on, they must also be marked as billed. Orders already picked and orders with a tracking number do not appear.
No shipmentsThe tab only shows draft shipments. Validated shipments count as shipped.
Product not foundBarcode missing on the product or different. The app searches the barcode field first, then the GTIN attribute.
No wall gridThe storage location does not end with two numbers, or the attribute code in the settings is wrong.
Stock decreased twiceCheck step 4: switch off decrease on shipment if stock is already decreased on order or invoice.

Help with the setup is available in the setup package, or write to me.