Setting up new printer
To setup a new printer, the ERP Printer application is required.
first-First-time setup,
For first-time setup, try to find the "ERP Printer Software" options in the "options" table. This options should have the software saved in its file manager.
If you can't find the option or its file manager is empty, you will have to contact Web team for assistance with acquiring ERP Printer application and setting up of the application ERP authentication.
First-time setup also requires the creation a "Printer User", that the ERP Printer application will use to listen for printing jobs.
This user's credentials are needed in printer software's setup, so it has to be created beforehand. The user also requires the "join-printers-presence-channel" permission.
Add a new printer in ERP
The first thing to do is to create a new printer entry invia the "printers" table create form..
OnceAfter the printer has been created, copy its "secret", it will be required for ERP Printer applicationsoftware issetup.
and
authenticationERP setupPrinter is finished,Setup setting up new printers can skip this step.
Connect the physical printer to the computer, where it will be located and perform the printersactual printer's setup, including installing correct drivers...
Open the "ERP Printer software" option and its file manager. The printer'file manager should contain 3 separate operating-system-named archives. Download the archive for your computer's operating system and extract it to a "safe" location.
Safe location - a folder on your computer that won't be deleted or moved.
Windows
Open the extracted folder and start the "ERP Printer Setup" program. This will needopen (ata least)windows Pythonand 3prompt installedyou to enter credentials , that will be used to authenticate the application with your ERP.
The entered credentials are saved into the "Windows credentials manager" and read from there during application runtime.
Once the credentials have been entered, the application will create a shortcut for the printer on your menu and add it to work.the computer's startup list.
After
# Run as a background service
RUN_AS_BACKGROUND_SERVICE=true
# ERP's API URL
ERP_API_URL=
# Printers secret from ERP
ERP_PRINTER_SECRET=
# Auto-select a printer by name instead of being prompted.
PRINTER_NAME=
Once all this information has been defined, you can perform a test run by opening the "ERP Printer" applicationfile. If all information has been correctly entered, you should get the following notification:
Printer 'Your-selected-printer' connected to ERP as 'Your-Printer-Name-In-ERP'. Waiting for trigger.
You can now attempt to print a document from the ERP to your selected printer.
Linux
Open the extracted folder and open it.the There.env file. Fill in the necessary credentials, which will be used to authenticate and connect the printer application with your ERP.
Your .env file should behave all of these filled out:
# Run as a background service
RUN_AS_BACKGROUND_SERVICE=true
# Printer User credentials
ERP_USERNAME=
ERP_PASSWORD=
# Authentication client credentials
ERP_CLIENT_ID=
ERP_CLIENT_SECRET=
# ERP's API URL
ERP_API_URL=
# Printers secret in ERP
ERP_PRINTER_SECRET=
# Auto-select a printer by name instead of being prompted.
PRINTER_NAME=
Once the authentication 3information fileshas inbeen directory:entered,

Opensave the environment.env file and copy into itstart the generated "secret"ERP Printer" ofapplication. After a successful connection to the newERP, printer,a whichnotification waswill created earlier. The contents of the file should be:appear:
ERP_PRINTER_SECRET=your-new-printer-secret-goes-herePrinter 'Your-selected-printer' connected to ERP as 'Your-Printer-Name-In-ERP'. Waiting for trigger.
After that, you can close the environmentterminal.
If you want to setup run-on-startup, this has beento created/updated,be startdone manually via the "main"operating printersystem software.tools.
After
Mac
The Mac install process is the commandsame lineas window opens, a list of available registered printers will be show.Linux.
Make sure that your new printer is listed, otherwise troubleshooting of drivers will be required.
Once you find your printer on the list, enter its corresponding number (e.g. 0) when prompted. This will select the printer (e.g. Showroom) and connect to it. A successful connection attempt will generate a "Websocket connected" response, like on the image below.

Printer Label Setup
When the printer software - ERP connection is established, the printer's use can be defined in the options table, in the "printer_buttons" option. Configure the new printer (for labels or normal prints) in the "data" field.
{
"printProductLabel": {
"title": "Printer desno",
"layout": "no-margin-label-printer",
"template": "label",
"printer_id": 1,
"background-color": "#FFFF00"
}
}
Additional
One started, the printing software will always prompt you to select a printer, to which it should connect and send printing jobs.
You can edit the environment file so that the "Available printers" selection gets skipped and a select printer is chosen automatically. toTo do this, copy the printer's name from the list and add it in the following line intoin the environment file(.env) andfile, then save it.
PRINTER_NAME="printer name"
If restarted, the mainERP Printer program shouldwill now automatically select the pre-configuredselected printer and attempt connection to the ERP.printer.


