Factorial - Sage 100 France | Absences: Setting up the interface

Factorial - Sage 100 France | Absences: Setting up the interface

📌 This guide is for: Absences template 2.x · BrynQ Agent 3.10 or newer · Sage 100 France v9. Another version? See Start here – choose your version.

What it is

The Factorial - Sage 100 France | Congés & Absences Payés template sends approved leave and absences from Factorial to Sage 100 France (v9) automatically. BrynQ reads the approved absences in Factorial, compares them with what is already in Sage, and sends only the changes in an import file per Sage company, <dossier>_ABSENCES.xlsx. The BrynQ Agent on your Sage server imports it with ConnectImport.

How it works

Sage can only add events through an import. It cannot change or delete one. So BrynQ never edits Sage: on every run it counts each absence in Factorial and in Sage, and sends only the events needed to make the two counts equal. To take an absence away, it sends a cancellation event.

1. What BrynQ compares

  • Factorial: all approved absences, whatever their dates. Requests that are still pending, and leave types that are not in the mapping, are left out.
  • Sage: all absence events of the employees who have at least one approved absence in Factorial. Both the events BrynQ imported and the events entered by hand count. Events marked as cancelled in Sage are ignored.
  • One absence is: the same matricule, Code nature événement, Motif d'absence, start date and end date. The half day, Nombre and the date of validity are not compared. If Sage stored an event without a motif, the motif is ignored for that absence.

2. The tally

For each absence, BrynQ counts how many times it is in Sage. Every event counts +1. Every cancellation event of the same code (the code in its Nature d'annulation field, for example 9950 for 0950) counts −1. An absence that was imported and later cancelled therefore counts 0: for BrynQ it is no longer in Sage. Then:

  • New absences to send = the number in Factorial minus the number in Sage, counting events of every date of validity. BrynQ never sends an absence that is already in Sage, not even one from an earlier month.
  • Cancellations to send = the number in Sage minus the number in Factorial, counting only events with the date of validity of this run (see 3). BrynQ never cancels an event of an earlier payroll cycle.

Examples, for one employee and one absence:

SituationFactorialSageBrynQ sends
A new absence is approved10The absence
The next run, nothing changed11Nothing
The absence is deleted or refused in Factorial. It was imported in this cycle01 (this cycle)A cancellation event (for example 9950)
The same, but it was imported in an earlier cycle01 (earlier cycle)Nothing. See Day to day.
The dates, leave type or motif change. The old version was imported in this cyclenew 1, old 0new 0, old 1The new absence and a cancellation of the old one, in the same file
The same change, but the old version is from an earlier cyclenew 1, old 0new 0, old 1 (earlier cycle)Only the new absence. See Day to day.
Only the half day changes11Nothing. See Day to day.
An absence that BrynQ cancelled earlier is approved again11 − 1 = 0The absence again
The absence is in Sage twice, both in this cycle12One cancellation event
The absence was entered by hand in Sage (same matricule, code, motif and dates)11Nothing: no duplicate
An event entered by hand in Sage with this run's date of validity is not in Factorial01 (this cycle)A cancellation event. If that event's code has no Nature d'annulation, the run stops instead.
The deleted absence was the employee's last approved absence in Factorial01Nothing: BrynQ no longer checks this employee. See Day to day.

3. What "this cycle" means

Every event BrynQ sends gets a date of validity: your answer in the Configuration tab, counted from the day of the run. Events with the date of validity of the current run are this cycle. Example with Premier jour du mois suivant: every run in October uses 01/11, so in October BrynQ can still cancel and correct what it sent in October. From 1 November the runs use 01/12. What was sent in October is then an earlier cycle, and BrynQ no longer cancels it.

4. The cancellation codes

  • A cancellation event uses the cancellation code of the original code: the code selected in the Nature d'annulation field of that code in Sage. It is a copy of the original with the opposite Sens, so it takes the days off again. By convention its number starts with 9 (0950 → 9950) and its title ends with [N].
  • At the start of every run, BrynQ checks that every event code in your mapping has a Nature d'annulation. If one is missing, the run stops before anything is sent, and lists the codes. See Step 5.
  • A cancellation event also needs Nombre. BrynQ takes it from your mapping, for that event code and motif. If the mapping no longer has it, for example because you removed a leave type, the run stops. See Day to day.

What to do

Know where you are

The steps switch between several places. Each step starts with a 📍 Where label:

📍 LabelWhat it is
BrynQThe BrynQ platform in your browser (https://your-slug.app.brynq.com).
FactorialFactorial in your browser.
Sage 100 FranceThe Sage application, opened on the Windows server, in the dossier (PRH file) the absences go to.
Windows serverThe computer on which Sage 100 France and the BrynQ Agent are installed.

The route at a glance

StepWhat you do📍 WhereWho
1Create the interface from the templateBrynQBrynQ administrator
2Fill in the configurationBrynQ, Configuration tabBrynQ administrator, with payroll for the date of validity
3Start in dry modeBrynQ, interface > SettingsBrynQ administrator
4Complete the scenarioBrynQ, Scenarios tab, with Sage 100 France open to look up the codesBrynQ administrator, with payroll
5Create the cancellation codes in SageSage 100 FrancePayroll (Sage administrator)
6Add the authorizationsBrynQ, AuthorizationsBrynQ administrator and Factorial administrator
7Run and checkBrynQ, then the Windows server and Sage 100 FranceBrynQ administrator and payroll

Before you start

  • ☐ The employees are in Sage. Absences are linked to an employee by the matricule: the employee number (company identifier) in Factorial must be the same as the matricule in Sage. Set up the Factorial - Sage 100 France | Employees template first. New employees must be hired in Sage (no longer under Salariés en attente) before their absences can be imported.
  • ☐ BrynQ Agent 3.10 or newer with the Sage 100 France module, and the empty import model BrynQ Absences in Sage. See Step 5 of Setup an automated data interface between Factorial and Sage.
  • ☐ A cancellation code for every Sage event code you use. In Sage, each nature d'événement you map (for example 0950) needs a matching cancellation nature, entered in its Nature d'annulation field. Without it, BrynQ cannot cancel or correct an absence in Sage, and the run stops with instructions. See Step 5.
  • ☐ A Factorial administrator account. BrynQ only sees the absences of the employees this account can see.

Step 1: Create the interface from the template

📍 Where: BrynQ.
Goal: Create the interface from the template.
Who: BrynQ administrator.

  1. In BrynQ, go to Interfaces > New interface > Use our templates.
  2. Search for Sage and select Factorial - Sage 100 France | Congés & Absences Payés.
  3. Make sure the Factorial and Sage apps are active.

Step 2: Fill in the configuration

📍 Where: BrynQ, Configuration tab.
Goal: Choose your test employees and the date of validity.
Who: BrynQ administrator, with payroll for the date of validity.

Open the Configuration tab:

  1. OPTIONAL (recommended). Pendant les tests : quels sont les numéros de matricule des employés test ? Enter a few matricules, separated by commas. Your first runs then only process the absences of these employees. Remove them when you are done testing.
  2. Required. Quelle est la date de validation ? Choose the date of validity that Sage gives to the imported events, counted from the moment the interface runs: Premier jour du mois suivant, Premier jour du mois en cours or Dernier jour du mois en cours. Pick the option that matches how your payroll processes absences. Without an answer, the run stops.

Step 3: Start in dry mode

📍 Where: BrynQ, interface > Settings.
Goal: Make your first runs safe test runs.
Who: BrynQ administrator.

In BrynQ, go to Interfaces, click the interface and open the Settings tab. Dry mode decides whether BrynQ really sends files to Sage:

Dry modeWhat happens
OnTest run. BrynQ compares Factorial with Sage and writes in the run log how many absences and cancellations it would send, but sends nothing.
OffBrynQ sends the changes to Sage.
💡 Tip: turn dry mode on for your first run and check the run log. When the numbers look right, turn it off.

Step 4: Complete the scenario

📍 Where: BrynQ, Scenarios tab, with Sage 100 France open to look up the codes.
Goal: Tell BrynQ which Sage codes each Factorial leave type uses.
Who: BrynQ administrator, with payroll.

Open the Scenarios tab and the scenario Congés & Absences Payés. Complete every item marked with an exclamation mark (!):

MappingWhat to do
Legal entity → DossierMap each Factorial legal entity to its Sage company (dossier). The dossier must match the company folder in the Sage import folder, which is the company name of the PRH file.
Legal entity + leave type → Sage codesFor each Factorial leave type, per legal entity, enter three Sage values: the Code nature événement (event code), the Motif d'absence (reason code for DSN reporting) and Nombre (the Sage constant that counts the duration, for example in working days or calendar days). Enter the leave type name exactly as it is in Factorial.
Employee number → MatriculePrefilled. The Factorial company identifier is used as the Sage matricule.
Start and end datePrefilled.
Date of validityFilled in automatically from your answer in the Configuration tab.
Half dayPrefilled. A half day at the end of the first day becomes an afternoon absence on the first day in Sage; a half day at the start of the last day becomes a morning absence on the last day. Check only.

Example of the leave type mapping (use the codes of your own Sage file):

Factorial legal entityFactorial leave typeCode nature événementMotif d'absenceNombre
Your legal entityPaid leave0950CPSTOTJRSOUV
Your legal entitySick leave2000MAMAL_NBH
⚠ A leave type without a mapping is not sent. When you add a new leave type in Factorial, add it to this mapping too. And check that the event code has a Nature d'annulation in Sage (see Step 5).

Step 5: Create the cancellation codes in Sage

📍 Where: Sage 100 France.
Goal: A cancellation code for every event code in your mapping.
Who: Payroll (Sage administrator).

BrynQ cancels and corrects absences with cancellation codes (see How it works). Every Code nature événement in your mapping needs its own cancellation code in Sage. You do this once per code, in every Sage dossier the absences go to. The example below creates the cancellation code for 0950 Absence congés.

🎬 Video: watch the steps below once, then follow the text for the details.
  1. In BrynQ, look at the Sage columns of your mapping (Step 4) and note every different Code nature événement. In this example that is 0950, 0955 and 2000: three codes, so three cancellation codes.
  2. In Sage 100 France, open the dossier (the PRH file of the company). Go to Listes > Natures d'évènements.
  3. The list shows every event nature with its code and title. Select the code, here 0950 Absence congés, and click the copy button.
  4. A copy opens with an empty Code. Enter the new code. Rule of thumb: the same code with the first digit changed to 9, so 0950 becomes 9950. Only if that code is not already used by another event nature. If it is, choose another free code.
  5. Add [N] (for negation) to the Intitulé: Absence congés [N].
  6. Important: under A cumuler dans les constantes, set every Sens to the opposite sign. A (+) in the original code becomes (−), a (−) becomes (+).
  7. Compare both codes side by side: the same constants, with the opposite Sens. Original on the left, cancellation code on the right.
  8. On the Bulletin tab of the new code, check that Nature d'annulation is empty. Click Ok.
  9. Important, or the interface stops: open the original code (0950), go to the Bulletin tab and select the new code (9950) in Nature d'annulation. Do this only on the original code, never on the cancellation code. Click Ok.
  10. Repeat steps 3 to 9 for every other code from step 1.
✅ Checkpoint: every code from your mapping has a cancellation code with the opposite Sens, and the original code points to it in Nature d'annulation. The next run log confirms that all mapped codes have a cancellation code.

⚠ If a step is skipped or done wrong, this is what you can expect:

What went wrongWhat you seeWhat to do
The original code has no Nature d'annulation, or a code from the mapping was skippedThe run stops before anything is sent, and lists the codes.Do step 9 for each listed code, then run again.
The Sens was not reversed on the cancellation codeNothing in BrynQ: the run reports that Sage is up to date. But in Sage a cancellation adds the days again instead of removing them, so balances such as congés pris are wrong.Correct the Sens on the cancellation code. Then check and correct the balances of the employees with cancelled absences in Sage by hand.
Nature d'annulation is also filled in on the cancellation code (for example when you copied a code that already had one)As soon as the first cancellation is in Sage, BrynQ mixes up the two codes and sends the same absences again on every run.Empty Nature d'annulation on the cancellation code, then cancel the duplicate absences in Sage by hand.
The new code was already used by another event natureEvents of that other nature count as cancellations: absences are sent twice, or not cancelled.Create a cancellation code with a free number, select it in Nature d'annulation of the original code, and check the absences of the affected employees in Sage.

Step 6: Add the authorizations

📍 Where: BrynQ, Authorizations.
Goal: Connect Factorial and Sage.
Who: BrynQ administrator and Factorial administrator.

  • Factorial: connect with a Factorial administrator account.
  • Sage: enter the BrynQ Agent URL (https://[your-customer-slug].brynq-agent.com) and the Agent token, the same as for the employees interface.

Step 7: Run and check

📍 Where: BrynQ, then the Windows server and Sage 100 France.
Goal: Check that the first absences arrive correctly.
Who: BrynQ administrator and payroll.

  1. Run the interface with dry mode on and read the run log. It shows how many new absences and cancellations would be sent, or that Sage is already up to date.
  2. Turn dry mode off and run again.
  3. 📍 Windows server: a file <dossier>_ABSENCES.xlsx appears in the company's import folder. The Agent imports it at its next cycle (every 15 minutes by default) and then moves it to a subfolder named importe le <date and time>.
  4. 📍 Sage 100 France: check the absence events of your test employees.
✅ Checkpoint: the absences of your test employees are in Sage, and a second run reports that there is nothing new to send.

Day to day: keeping Factorial and Sage aligned

Once the interface runs, HR works in Factorial and BrynQ updates Sage. A few situations need a hand correction in Sage (see How it works for why). Make corrections in Factorial before the cycle changes where you can.

SituationWhat to do📍 WhereWho
A leave request comes inApprove it. Only approved absences are sent.FactorialManager or HR
An absence must change or be cancelled, and it was sent in the current cycleChange or delete it in Factorial. The next run corrects Sage.FactorialHR
The same, but it was sent in an earlier cycleChange or delete it in Factorial, and cancel the old event in Sage by hand. BrynQ sends the new version, but does not cancel the old one.Factorial and Sage 100 FranceHR and payroll
Only the half day changesChange it in Factorial and correct the event in Sage by hand. BrynQ does not compare half days.Factorial and Sage 100 FranceHR and payroll
An employee's last approved absence in Factorial is deletedCancel the event in Sage by hand. BrynQ no longer checks this employee.Sage 100 FrancePayroll
You want to enter an absence directly in SageEnter it in Factorial instead. An event entered by hand in Sage with the current date of validity, and not in Factorial, is cancelled by the next run.FactorialHR
A new leave type is added in FactorialAdd it to the mapping (Step 4). If it uses a new Code nature événement, create its cancellation code first (Step 5).BrynQ and Sage 100 FranceBrynQ administrator and payroll
A leave type is removed from the mappingFirst check that Sage has no events of that type in the current cycle. Otherwise the next run stops, because it cannot cancel them without the mapping.Sage 100 France, then BrynQPayroll and BrynQ administrator

Need help?