Where the agent gets its configuration
For the settings in
appsettings.json, the order of precedence is, highest first:
- Command-line arguments.
- Environment variables, named
<Section>__<Setting>, for exampleErpSync__PollingIntervalSecondsorUpdates__Channel. appsettings.jsonin the install folder.- The built-in defaults listed below.
credentials.dat, that value wins. Each setting below
says so.
ApiKey and ConnectionId in appsettings.json and in environment variables are ignored. The agent takes the API
key and connection only from credentials.dat. Configure them with the setup wizard.Change a setting
Set the value as a machine environment variable, in PowerShell as Administrator, then restart the service. The service reads these settings only when it starts:appsettings.json in the install folder, by default
C:\Program Files\Omnilinker\ErpSync\current, as an administrator, and restart the service.
The shipped file looks like this (its Logging section is left out):
appsettings.json
Settings
“Default” is the value the agent uses when the setting is missing fromappsettings.json.
Cloud connection
Local API
Change detection
Sending to Omnilinker
The agent queues every change in a local outbox and sends it to Omnilinker in batches.Plugins
Updates
How the agent updates itself.AutoUpdateEnabled is in the ErpSync
section. The others are in the Updates section, so their environment variables start with Updates__.
A version is installed only inside the window and only when no sync is running. If installing fails, the agent tries
again the next night.
Fixed values
The agent has these settings internally, but does not read them fromappsettings.json or environment variables.
They always have the values shown. They are listed so you can interpret the agent’s logs.
Logging
The service writes one log file per day to%ProgramData%\Omnilinker\ErpSync\logs (see
Local files) and keeps the last 30 files. Each line has a timestamp, the level, the component and the
message.
Setup, updates and uninstalling add to setup.log in the same folder: done, or one line for each step they could
not complete.
The log level is fixed: Information for the agent, Warning for framework components. The Logging section in
appsettings.json has no effect on the log files.
Local files
The agent keeps three folders on the machine. Install folder:C:\Program Files\Omnilinker\ErpSync\current when you install as described in
Install the agent. Setup replaces its contents on every update.
Data folder:
%ProgramData%\Omnilinker\ErpSync, usually C:\ProgramData\Omnilinker\ErpSync. The service and
everyone who uses the tray app see the same folder. Setup lets only SYSTEM and administrators change it. Other users
can read it.
Service profile folder:
C:\Windows\System32\config\systemprofile\AppData\Local\Omnilinker\ErpSync, the local
application data folder of Local System, which the service runs as.