Setup an automated data interface between Factorial and Sage (Agent 3.9 · Sage v8)
Setup an automated data interface between Factorial and Sage (Agent 3.9 · Sage v8)
📌 This guide is for: BrynQ Agent 3.9 or older · Sage 100 France v8. This is an older version. Using a newer version? See Start here – choose your version.
What you will achieve
By the end of this guide, employee master data flows automatically from Factorial into Sage 100 France (v8). No manual exports and no copy-pasting.
How it works
It helps to picture the flow before you start. Every run goes through four steps:
BrynQ reads the employee data from Factorial.
BrynQ converts that data into an Excel import file that Sage understands.
The BrynQ Agent, a small program on your Sage server, receives the file.
ConnectImport imports the file into the right Sage company (PRH file).
So you set up two things: the Agent on the Sage server (Part 1) and the interface in BrynQ (Part 2).
Know where you are
This guide switches between several places. Each step starts with a 📍 Where label so you always know where to work:
📍 Label
What it is
Windows server
The computer (machine) on which Sage 100 France is installed. You install the BrynQ Agent here.
SQL Server
The database software that stores the Sage data. It usually runs on the same Windows server, but it can also run on a separate machine. In the installer you only enter its name.
Sage 100 France
The Sage application itself, opened on the Windows server.
BrynQ
The BrynQ platform in your browser (https://your-slug.app.brynq.com).
Factorial
Factorial in your browser.
The route at a glance
Part
What you do
📍 Where
Who
1.A
Download the BrynQ Agent
BrynQ, opened on the Windows server
Server administrator
1.B
Install and configure the Agent
Windows server + Sage 100 France
Server and Sage administrator
1.C
Check that the Agent is running
Windows server
Server administrator
2
Create, configure and connect the interface
BrynQ (+ Factorial and Sage for look-ups)
BrynQ and Factorial administrator
Before you start
Tick off this checklist first. Each item prevents a common reason for getting stuck halfway.
☐ Access to BrynQ with permission to create or edit interfaces.
☐ A Factorial administrator account with access to all employee data (see the box below).
☐ A Sage 100 France administrator, plus a payroll user who can review import results.
☐ Administrator access to the Windows server that runs Sage, including the Sage PRH files and the programFiles and programData folders.
☐ Database access: the account the Agent uses to connect to SQL Server (your Windows account, or a SQL Server login) must have access to the Sage company databases. If you are not sure, check this with your IT administrator before you start.
☐ A BrynQ API token for this customer, at hand. Create it in BrynQ under Admin Portal > API Access > Add API token and select exactly one customer, or ask BrynQ support. Why: you need it in both Part 1 and Part 2.
⚠ Use a Factorial ADMINISTRATOR account BrynQ only syncs the employees that the connecting Factorial user can see. A non-admin account means missing employees in Sage.
⚠ Save often in Sage. Sage does not always autosave reliably. Save after every few changes so you never have to redo steps.
ℹ Steps marked OPTIONAL can be skipped safely. Only do them if your situation needs it.
Watch first: video walkthrough of Part 1
Prefer to see it before you do it? This video shows the complete Agent installation from Part 1. Watch it once, then follow the written steps below at your own pace.
Part 1.A) Download the BrynQ Agent on the Windows server
📍 Where: BrynQ, opened in a browser on the Windows server where Sage runs. Goal: get the Agent installer onto that server.
Log in to BrynQ and go to Organization > Agent.
Download the latest BrynQ Agent installer.
ℹ Security warning? The files are signed and published under 'Salure ICT BV'. Your browser or Windows may still flag them as untrusted. That is expected and you can continue.
Part 1.B) Install and configure the Agent
📍 Where: the Windows server (installer), plus Sage 100 France for step 4. Goal: install the Agent and connect it to SQL Server and your Sage companies.
ℹ About "default": when this guide says default, it means the value the installer has already filled in for you. If a step says to keep the default, leave that value as it is. ℹ Not every installer screen is shown. On a screen this guide does not mention, keep the pre-filled values and click Next.
⚠ Check the Windows permissions first Run the installer with a Windows account that has administrator rights on the server (right-click the installer and choose Run as administrator). The Windows account the Agent runs under also needs permission to read and write the Sage folders and PRH files, and the programFiles and programData folders. If these Windows permissions are missing, parts of the installation, or of the Agent once it is running, can fail. This does not always show a clear error.
Step 1: Run the installer
Start the installer and select your preferred language. The screenshots below are in English.
Read and accept the agreement.
Keep the default (pre-filled) installation path. It works for most setups, but you can choose another folder if you prefer.
Enter the BrynQ API token (see "Before you start"). You only need to do this during the first (complete) installation.
Select the following modules:
🔍 The installer detects most values for you In Steps 2 and 3 the installer searches your server for the PRH files, the SQL Server and the installed ODBC drivers, and offers what it finds in the dropdowns. Usually you can simply pick the suggested value. Only look things up yourself if something is missing or you don't recognise it.
Step 2: Choose your Sage companies
Key idea: each PRH file is the database of one company in Sage. Selecting a PRH file means "BrynQ may import into this company".
Select the detected PRH files that you want to connect to the interface. Only if a company is missing: add its PRH file manually with the 'Add PRH File...' button.
Step 3: Connect to SQL Server
Remember: here you connect the Agent to the SQL Server (the database software), not to the Windows server itself.
ODBC driver: use the driver suggested in the dropdown. If the list offers several, choose the one with the highest number, for example ODBC Driver 18 for SQL Server rather than ODBC Driver 17 for SQL Server. Only if no suitable driver is listed: in Windows, search for ODBC Data Sources (64-bit) and open the Drivers tab to see what is installed, or ask your IT administrator.
Server name: use the SQL Server suggested in the dropdown. It often looks like SERVERNAME or SERVERNAME\INSTANCE. Only if it is missing or you don't recognise it: open SQL Server Management Studio on the server. The Server name field in the "Connect to Server" window shows the right name. Or ask your IT administrator.
Authentication: choose Windows Authentication, unless your setup requires SQL Server Authentication. In that case, also enter the username and password of the SQL Server login. Whichever you choose, that account needs access to the Sage databases (see "Before you start").
Step 4: Create a Sage service user
📍 Where: Sage 100 France. Why: the Agent needs its own Sage account so imports are not tied to a person's login.
Open Sage 100 France, connect to a PRH file, and go to Fichier > Droits d'accès > Utilisateurs.
Create a dedicated service user. The code and description are optional, but you must enable 'Compte de service' and generate a Token. Copy this token. Example:
📍 Back in the installer, paste the service user code and the token.
🔍 Import definition (the IMP files) Next, the installer looks for the Sage ConnectImport.exe and the Sage import definition by itself. If it shows a confirmed import definition, just click Next. Only if nothing is detected: in Sage 100 Paie & RH, create a new empty import definition and save it without mapping any fields. Sage then creates a matching pair of files, for example IMP00001.TGA and IMP00001.TXT, in C:\ProgramData\Sage\SagePaie\SagePaie\AppData\GA. Go back to the installer and click Detect Import Definition. BrynQ fills these files with its own import definition. ConnectImport.exe not found? Select it manually. It is usually in C:\Program Files (x86)\Sage\SagePaie\ConnectImport.exe.
Step 5: Finish the installation
OPTIONAL: skip unless needed.ConnectImport is already set up for you. Only change it if you know how the ConnectImport module works, or if BrynQ support asks you to.
OPTIONAL (recommended). Create a desktop shortcut. It takes you straight to the Agent dashboard later.
OPTIONAL: skip unless needed. Custom local network settings are only needed in special network setups. Not sure? Skip this step.
OPTIONAL. Review the Agent configuration on the local admin dashboard. Use the desktop shortcut, or open 127.0.0.1:7071/admin (the default listen IP and admin port) in your browser on the Windows server.
Part 1.C) Check that the Agent is running
📍 Where: the Windows server.
✅ Checkpoint 1: confirm this before you move on to Part 2.
Open Task Manager and go to the Services tab.
Check that all three BrynQ services have the status Running.
✖ A service is not running?
Right-click the service and choose Start.
Wait a moment and check that the status changes to Running.
Does it not start, or does it stop again? Contact BrynQ support and include a screenshot of the Services tab and the files from C:\ProgramData\BrynQ\Agent\logs\agent.
💡 Remember: whenever BrynQ cannot reach the Agent later on, check these three services first.
Part 2) Create the interface in BrynQ
📍 Where: BrynQ (any computer). You only look up values in Factorial and Sage 100 France. Goal: tell BrynQ what to sync and where to send it.
Step 1: Create the interface from the template
Open BrynQ and go to Interfaces.
Click New interface and choose Use our templates.
Search for Sage and select Factorial - Sage 100 France Employees.
Click Use template.
Step 2: Fill in the Configuration tab
Open the Configuration tab.
Set the company's payment frequency.
OPTIONAL (recommended). Enter a few employee IDs. The first runs then only process these employees, so you can test safely.
Answer the question Is the DPAE sent outside Sage? with yes or no (oui/non, ja/nee, ja/nein and 1/0 also work). This answer is required: without a valid answer the run stops.
Step 3: Complete the value mappings in the Scenarios tab
Key idea: a value mapping translates a value in Factorial into the matching value in Sage. Every item marked with an exclamation mark (!) still needs your input.
Check in Factorial before the first run
Every contract has a French contract type. It sets the contract nature in Sage; if it is missing, that field stays empty and the run log shows a warning.
Working hours and their frequency are filled in. BrynQ uses them for the monthly working time (for example 35 h/week = 151.67).
Most value mappings, such as countries (3-letter codes like FRA) and civility, are already prefilled. You only need to check them.
Open the Scenarios tab and find the items marked with an exclamation mark.
Worked example: 'Legal Entity -> Paying Establishment and Dossier' You find this mapping in the scenario Registration. It is the most important mapping: it decides which Factorial legal entity syncs to which Sage company. We walk through it step by step; the other mappings work the same way.
Left side (📍 Factorial): find the legal entity ID and name under Settings > Company details.
📍 BrynQ: enter this value on the left side of the mapping. Syncing several entities? Add one row per entity.
Right side (📍 Sage 100 France): find the matching Raison sociale / dossier of the Sage PRH file. In this example the dossier is 'BRYNQ.PRH'.
📍 Sage 100 France: also find the matching 'Etablissement principal'.
📍 BrynQ: enter these values on the right side of the mapping. The result looks like this:
Confirm the mapping and save it.
Now you try: complete the other non-standard mappings in the same way (look up the value on each side, enter it, confirm, save):
Finally, check that the standard value mappings are correct for your company:
Step 4: Connect Factorial and Sage (Authorization tab)
Open the Authorization tab.
Factorial first: click Add authorization (TEST and LIVE), enter a recognisable name and click Connect to app.
Sign in with your Factorial ADMINISTRATOR account.
Make sure the TEST version is active before your first test run.
⚡ Heads-up: this can connect automatically! Are you already signed in to Factorial in this browser, with an active login (session cookie)? Then Connect to app connects straight away with that account, without asking you to sign in. So before you click: check that you are signed in to Factorial with the administrator account. If not, sign out of Factorial first, or use a private/incognito window.
Approve the requested access and save the connection.
Then Sage: add the Sage authorization.
Enter the BrynQ Agent URL in this format: https://[your-customer-slug].brynq-agent.com Where to find your slug: it is the first part of your BrynQ web address. The exact address is also in C:\ProgramData\BrynQ\Agent\config\public_url.txt on the Windows server. If you log in at https://acme.app.brynq.com, your slug is acme and the Agent URL is https://acme.brynq-agent.com.
Enter the BrynQ Agent Token: the same token you received earlier and entered in the installer.
Check the first run
✅ Checkpoint 2: after a controlled test run:
📍 Windows server: a new Excel import file appears in the configured import folder. There is one file per Sage company, named <dossier>.xlsx.
📍 Sage 100 France: the employee records were created or updated correctly. Start with the test employee IDs you entered in Step 2.
✖ Something went wrong?
No import file on the server: BrynQ could not deliver the file to the Agent. Check the three BrynQ services (Part 1.C) and test the Sage authorization again.
Import file is there, but Sage has no or wrong records: check the value mappings in the Scenarios tab, especially Registration.
Some employees are missing: the Factorial authorization is probably not an administrator account. Reconnect it with an admin account.
Still stuck? See the troubleshooting section below, or contact BrynQ support and attach the log files from C:\ProgramData\BrynQ\Agent\logs\sage.
Troubleshooting
What you see
What to do
Any error you can't explain
Check the Agent log files on the Windows server (see Find the Agent log files below) and share them with BrynQ support.
Parts of the installation fail, or the Agent runs but cannot read or write files
Check the Windows permissions: run the installer as administrator, and make sure the Windows account of the Agent can read and write the Sage folders, PRH files, programFiles and programData. See the warning at the start of Part 1.B.
Not all employees are synced
The Factorial user in the authorization cannot see all employees. Reconnect with a Factorial administrator account.
'Erreur mot de passe' on the Sage server (this happens often)
Reinitialise the user or the dossier in Sage. See Fix 'Erreur mot de passe' below.
BrynQ cannot reach the Agent
Check that the three BrynQ services are running (Part 1.C), then open http://localhost:7071 on the Windows server. Next, test the Sage authorization again from the Authorization tab.
The installer cannot connect to SQL Server
Check that the suggested server name is right (Step 3), try the ODBC driver with the highest number, and confirm that the account has access to the Sage databases.
An app used by the template is inactive
Activate it in Settings > Interfaces > Apps.
A manual Sage import works, but the automated run does not
Verify the Agent at http://localhost:7071, then test the Sage authorization again from the Authorization tab.
You need to review or remove an authorization
Open Settings > Interfaces > Connections.
Find the Agent log files
📍 Where: the Windows server, in File Explorer. When something goes wrong, the Agent's log files usually tell you (and BrynQ support) why. There are two log folders. Which one you need depends on the problem:
Problem
Log folder
Importing data into Sage fails or gives wrong results
C:\ProgramData\BrynQ\Agent\logs\sage
General Agent issues, such as connection problems
C:\ProgramData\BrynQ\Agent\logs\agent
Sage import logs (for example connectimport and connectimport-error):
General Agent logs (for example application, requests and security):
💡 Contacting BrynQ support? Always attach the relevant log files. For Sage import problems, sharing the logs\sage files is highly recommended. For connection or other Agent problems, share the logs\agent files. This usually saves a lot of back-and-forth.
Can't see the ProgramData folder? It is hidden by default. Type C:\ProgramData\BrynQ\Agent\logs directly into the File Explorer address bar.
Fix 'Erreur mot de passe'
📍 Where: Sage 100 France, on the Windows server. The error 'Erreur mot de passe' occurs quite often on the Sage server. In most cases you solve it by reinitialising the user or the dossier. Start with option A. Only use option B if A does not help.
Option A: reinitialise from within the company (try this first)
Open Sage 100 France and connect to the company (PRH file).
Go to Fichier > Droits d'accès > Utilisateurs.
In the Liste des utilisateurs, click Réinitialisation.
Try the connection again.
Option B: global reinitialisation of the dossier (use at your own risk)
⚠ At your own risk.Réinitialiser le dossier signs out all users of the dossier. Make sure nobody is working in payroll before you use it.
Go to Fichier > Utilitaires > Réinitialisation. Don't see it? This option is sometimes only visible when you are not connected to a company. Close the company first (Fichier > Fermer) and look again.
The Assistant réinitialisation de dossier opens. Click Parcourir... and select the dossier (PRH file) to reinitialise.
Click Réinitialiser le dossier. To sign out one specific user only, select that user and click Réinitialiser l'utilisateur instead.
Click Terminer and try the connection again.
Recap
The Agent on the Windows server receives the import files and imports them into the PRH files you selected. It reaches the Sage data through SQL Server.
The value mappings decide which Factorial entity lands in which Sage company. Take extra care with 'Legal Entity -> Paying Establishment and Dossier' in Registration.
The authorizations connect BrynQ to Factorial (admin account!) and to the Agent.
Stuck? Check the three BrynQ services first. Then contact BrynQ support and attach the Agent log files (logs\sage for import problems, logs\agent for connection problems).