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.
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.
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:
| Module | Purpose |
|---|---|
| Products | Items, images, storage location |
| Barcodes | “Barcode” field on the product. Choose EAN13 as default type. |
| Stocks | Warehouses, stock, stock movements |
| Sales Orders | Basis of the pick list |
| Shipments | Packing 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.
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 code | Label | Type | Required? | Purpose |
|---|---|---|---|---|
lagerplatz | Storage location | String, length 32 | yes | Sorting of the pick list, wall grid, suggestion in the inventory app |
gtin | GTIN | String, length 14 | no | Second barcode, e.g. manufacturer code if the barcode field contains your own code |
letzte_inventur | Last inventory | Date and time | no | Time of the last count. You can filter by it in the product list. |
On the sales order
| Attribute code | Label | Type | Required? | Purpose |
|---|---|---|---|---|
gepickt | Picked | Date and time | yes | PackScan sets it on release after picking. Released orders disappear from the pick list. |
umgebucht | Transferred | Date and time | only with shipping automation | Protection against double transfer in the shipping run |
dhl_shipment_number | Tracking number | String, length 64 | only with shipping automation | Orders 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:
| Code | Label | Tracking URL |
|---|---|---|
DHL | DHL Parcel (exists, only activate) | https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?piececode={TRACKID} |
DPAG | Deutsche 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.
- Users & Groups › New user, e.g. login
lager-app. Not an administrator, not an external user. - In the tab “Permissions” set the permissions from the table.
- 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”.
- Copy the token. It is entered in the apps under “API key (DOLAPIKEY)”.
| Module | Permission | Test only | PackScan | Inventory |
|---|---|---|---|---|
| Products | Read products | ✓ | ✓ | ✓ |
| Products | Create/modify products | ✓ storage location, last inventory | ||
| Stocks | Read warehouses and stocks | ✓ | ✓ | ✓ |
| Stocks | Read stock movements | ✓ | ✓ | ✓ |
| Stocks | Create/modify stock movements | ✓ stock correction | ||
| Sales Orders | Read customers orders | ✓ | ✓ | |
| Sales Orders | Create/modify customers orders | ✓ field “picked” | ||
| Sales Orders | Close customers orders | ✓ | ||
| Shipments | Read shipments | ✓ | ✓ | |
| Shipments | Create/modify shipments | ✓ tracking number, shipping method | ||
| Shipments | Validate shipments | ✓ | ||
| Third parties | Read 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.
- Download PackScan-Inventur_v1.2.1.zip and unzip it. Alternatively clone the repository from GitHub .
- Create folder:
htdocs/custom/lager/ - Copy the contents of the folder
lager-appsinto it:index.html,packscan.html,inventur.html, the two*.manifest.jsonand the icons*-192.png,*-512.png,*-maskable-512.png. - 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)
- Open the app address in Safari
- Share icon › “Add to Home Screen”
- Start the app via the new icon
- Allow camera access once
Android
- Open the app address in Chrome
- Menu ⋮ › “Install app” or “Add to Home screen”
- Start the app via the new icon
- 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
| Setting | Default | Meaning |
|---|---|---|
| Dolibarr API URL | automatic in the customfolder | Address of the REST API |
| API key (DOLAPIKEY) | empty | Token of the API user |
| Extra field code storage location | lagerplatz | Attribute code on the product |
| Extra field code GTIN/EAN | gtin | Second barcode, searched if the barcode does not match |
| Demo mode | off (on in the public demo) | Test data instead of Dolibarr |
| Language | Browser language | 24 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. |
| Flashlight | off | Stays on until you switch it off, even after restarting the app |
PackScan only
| Setting | Default | Meaning |
|---|---|---|
| Only invoiced orders in the pick list | on | On: only validated orders with status “billed”, i.e. paid marketplace orders. Off: all validated orders. |
| Hidden products | DE_*, eBayPlus, DUMMY | References that are never picked, e.g. postage lines. * stands for any characters. |
| EAN: highlighted last digits | 4 | 4, 5 or 6 final digits large next to every item |
| Grid: row 1 is at the | top | Counting direction of the rows in the wall grid |
| Extra field code “picked” | gepickt | Date field on the sales order |
| Shipping method code parcel / letter | DHL / DPAG | Entered if the shipment has no shipping method yet |
| Close order after packing | on | Sets the sales order to “Delivered” |
| Also close shipment | off | Closes the shipment after validation. Only switch on if you need closed shipments. |
| Reset counted quantities to 0 | Resets the pick progress on this device |
Inventory only
| Setting | Default | Meaning |
|---|---|---|
| Extra field code last inventory | letzte_inventur | Date and time field on the product |
| Select warehouses and order | all warehouses | Which warehouses appear when counting and in which order |
| Clear “Recently counted” | Clears the list of recently counted items | |
| Export inventory list | On 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.
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.
| Example | Meaning |
|---|---|
2.LW1.3.12 | Room 2, pegboard 1, row 3, column 12 |
1.R4.2.5 | Room 1, shelf 4, level 2, slot 5 |
2.SLW.E1.2.11 | Room 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
- Picking: PackScan, tab “Pick list”. Scan items in order or type the quantity. At the end “Release picked orders”.
- Create shipments: with the shipping automation via shipping run, otherwise in Dolibarr on the order “Create shipment” and enter the tracking number.
- Packing: PackScan, tab “Shipments”. Scan the label or Internetmarke, then every item. After the last item the app closes shipment and order.
- Inventory: on the side, whenever there is time. Scan the item, check location and quantity, save.
14Troubleshooting
| Message | Cause and solution |
|---|---|
| Camera does not start, NotAllowedError | The 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 401 | Token wrong or expired. Generate a new one in Dolibarr and enter it in the app. |
| HTTP 403 | The API user lacks a permission. Check the table in step 7. |
| Failed to fetch / Load failed | Wrong 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 empty | Orders 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 shipments | The tab only shows draft shipments. Validated shipments count as shipped. |
| Product not found | Barcode missing on the product or different. The app searches the barcode field first, then the GTIN attribute. |
| No wall grid | The storage location does not end with two numbers, or the attribute code in the settings is wrong. |
| Stock decreased twice | Check 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.

