Skip to content
← Skills

Control the DSN against payroll

Each month's DSN is read back per social body and set against the payroll's charges table, and every gap or missing return is listed for the payroll team.

Silae→Slack
Starts
When you ask
Steps
8
Checks and gates
2
A person decides
1

Control the October DSN of every dossier against its charges table.

Request in chat after payroll close

See it in a demo

Claude runs the rest autonomously

  1. 1

    AI lists the month's DSN per dossier.

    Silae

    Silae

    Each dossier's declarations of the month come back with their establishment, social body, type and fraction, after a check that the contract opens them.

  2. 2

    AI reads the charges and contributions.

    Silae

    Silae

    The charges table and the contributions detail per social body give what the payroll owes each body, without any per-employee detail.

  3. 3

    AI reads the contributions each DSN declares.

    Silae

    Silae

    Only the payment and contribution blocks of each declaration are read, fractions summed, never the blocks that carry identities.

  4. 4

    AI compares each social body, flags the gaps.check

    Each dossier, establishment and body gets the two amounts side by side, and anything over the tolerance or present on one side only is flagged.

  5. 5

    AI checks each declaration's returns.check

    Silae

    Silae

    A declaration with no deposit number or with a return still to process is flagged next to its gaps.

  6. 6

    AI logs one row per dossier and body.

    One restricted row per dossier, establishment and body holds both amounts, the gap and the return status, merged on every re-run.

  7. 7

    AI posts the totals to the payroll channel.

    Slack

    Slack

    The channel gets the count of dossiers, gaps and pending returns, with no name, social security number or individual pay.

  8. Correct the gaps in payroll. A person takes it from here.handover

    The payroll team explains or corrects each gap and handles each return in the payroll software.

Once the payroll is closed, someone still has to check that the DSN says what the payroll says. In a firm running dozens of dossiers, that means opening each one, exporting the charges table, opening the declaration, and comparing the URSSAF, pension and provident totals by hand, then going back to see which declarations got their deposit number and which ones came back with a return to process. It is the same comparison every month, and the dossier nobody had time to open is the one where a social body went missing.

Both sides already sit in the payroll software. The charges table and the contributions detail say what each social body is owed. The DSN says what was declared to it, and the declaration states say whether it was received. The work is the comparison, run the same way on every dossier, with a table that keeps the result and a channel that gets the totals.

What you get

Every dossier's DSN for the month is reconciled against its charges table body by body, each gap and each declaration still waiting for its return sits in one table, and the payroll channel gets the totals without a single name or salary in it.

What each DSN is checked against

The run starts in Silae: the dossiers your access reaches, then for each one the month's DSN list (establishment, social body, affiliation, type, fraction, send date) and the social bodies set up in the dossier. It generates the month's charges table and the contributions detail grouped by social body, then reads back each DSN, asking only for the payment and contribution blocks of the norm.

Each social body of each establishment ends up with two amounts: what the payroll owes it and what the DSN declares. The declaration states for the month add the deposit (ADS) number and the returns recorded against each declaration. The totals go to your payroll channel in Slack; the lines go to a table only the payroll team reads.

What makes a DSN control hold up

The comparison is per social body, not per dossier. A dossier whose grand total matches can still hide a provident contribution declared to the wrong body and a pension line missing from the other side. Several fractions for one establishment and one body are summed before comparing, and a body present on only one side is its own case, flagged even when the amounts are small.

A gap is reported, not judged. A regularisation on an earlier month or a body paid on a different schedule can explain one, so each line carries what both sides say and the explanation stays with the payroll team. Nothing is corrected or resent from here: the connector reads Silae and never writes to it.

Personal data stays where it was. The run leaves out the per-employee detail of the contributions, reads the contribution blocks of each DSN rather than the individual ones, writes amounts per social body to a restricted table and posts only totals to the chat. A re-run on the same month merges onto the same rows, keyed on dossier, month, establishment and body.

What the DSN control needs from your Silae access

Two conditions decide whether this process runs at all, and the run checks both before doing anything.

  • The contract. Declarations and social bodies are opened by the internal-use API contracts (model 1A for payroll, 1B for HR). The client-provision contract (model 2) opens neither, and a dossier under it is listed as skipped.
  • No masking. The charges table, the contributions detail and the DSN content are files, which a field-filter policy cannot read inside. While your org masks any Silae field, they are refused, so the control only runs where nothing is masked. The run never lifts a policy to get through.

Where either condition fails, the payroll variance review works from the payslip totals, on any contract and with masking on.

Every call reads one dossier, the contributions detail covers 12 months at most, and the run avoids 1am to 5am, when Silae refreshes its platforms.

The prompt

The real prompt behind the steps above, detailed enough that an agent with the same tools can run it as written. The Run buttons copy the full version, which also carries the steps for connecting those tools.

# Control the DSN against payroll

You have access to a French payroll software (read-only), a team
chat and a table you can read and write. Run this for **[the pay
month to control, e.g. 2026-10]** and **[the dossiers to cover, or
every dossier your access reaches]**.


## 1. List the month's DSN per dossier

- **Check what your access opens before anything else.** Reading
  declarations and social bodies needs an internal-use payroll API
  contract (model 1A, payroll, or 1B, HR). A client-provision contract
  (model 2) opens neither: if the dossier's declarations or social
  bodies are refused, stop for that dossier, list it as *contract does
  not open the DSN*, and move on. The sibling process
  https://tulina.ai/skills/payroll-variance-review runs on any
  contract.
- **Check that nothing is masked.** The charges table, the
  contributions detail and the DSN content are files, and a
  field-filter policy cannot see inside a file, so they are refused
  while your org masks any payroll field. Do not remove the policy to
  get through: stop and report it. Whoever owns the policy decides.
- List the dossiers your access reaches (number, company name, SIRET,
  state) and keep **[your dossiers]**. Every call targets one dossier.
  If your workspace holds several payroll accounts, no call walks
  them for you: run each account in turn.
- For each dossier, list the month's DSN, the month written
  `AAAA-MM`. Each entry gives the establishment, the body code, the
  affiliation, the DSN type, the SIRET, the fraction and the send
  date. Keep every one of those values: step 3 needs them to address
  each DSN.
- Read the dossier's social bodies (URSSAF, pension, provident and the
  rest) with their affiliations. They are the rows the comparison is
  built on.
- Avoid running between 1am and 5am: the payroll platform refreshes
  then.

## 2. Read the charges and contributions

- Generate the month's **charges table** as a spreadsheet (one-month
  range). It comes back as CSV to read, with a temporary link to the
  original file.
- Generate the **contributions detail** for the same month, grouped
  by social body, **without the per-employee detail**. The run needs
  totals per body, and leaving the detail out keeps individual pay
  out of everything that follows. The detail covers 12 months at
  most.
- A report can be heavy on a large dossier. Start it, keep the task
  id, and poll its status until it is finished rather than waiting on
  a call that may time out.

## 3. Read the contributions each DSN declares

- For each DSN of step 1, read its content with the establishment,
  the DSN type and the fraction the list gave, plus the body code and
  affiliation when the list gave them. Ask only for the payment and
  aggregated-contribution blocks of the norm, never the whole file:
  the individual blocks carry identities and pay the comparison does
  not need.
- Several fractions for one establishment and one body are summed
  before comparing.

## 4. Compare each social body, flag the gaps

- Build one line per dossier, establishment and social body: the
  amount the charges table and the contributions detail give, the
  amount the DSN declares, and the difference.
- Under **[your tolerance, e.g. €1 per body]** the line is *matched*.
  Above it, the line is a *gap*. Also flag, each as its own case:
  a social body set up in the payroll with no DSN entry for the
  month; a DSN entry for a body with nothing in the charges table; an
  establishment with a DSN and no payroll that month.
- **A gap is a question, not a verdict.** A regularisation on an
  earlier month, a body paid on a different schedule or a fraction
  sent later can each explain one. Write what the two sides say and
  leave the explanation to the payroll team.

## 5. Check each declaration's returns

- Read the declaration states for the month (type DECLARATION): each
  declaration with its state, its deposit (ADS) number, its recipient
  and the returns recorded against it.
- Flag a DSN of step 1 that has no deposit number, a declaration
  whose returns include one still to process, and a DSN in the list
  with no matching declaration state. Do not interpret a return's
  content beyond what its state says: a person opens it.

## 6. Log one row per dossier and body

- One batch write to **[your DSN control table]**, keyed on dossier,
  month, establishment and social body, so a re-run merges onto the
  same rows instead of appending: charges table amount, DSN amount,
  gap, status (*matched*, *gap*, *missing in DSN*, *missing in
  payroll*, *contract does not open the DSN*, *masked, not run*),
  deposit number, returns to process, and the run date read at run
  time.
- Keep this table restricted to the payroll team. It holds amounts
  per social body, never a name, a social security number or one
  person's pay.

## 7. Post the totals to the payroll channel

- One post to **[your payroll channel]**: dossiers controlled, dossiers
  with a gap and the total of the gaps, declarations still waiting for
  a deposit number or with a return to process, dossiers skipped and
  why. Company names and dossier numbers are fine; employee names,
  social security numbers and individual pay never go in a chat.

## 8. Correct the gaps in payroll

The payroll team reads the table, explains or corrects each gap in
the payroll software, and handles the returns. Nothing in this
process changes the payroll or the declaration.

## Rules

- The payroll side is read-only: never correct, cancel or resend a
  DSN, never enter a variable or confirm anything.
- Never post personal data to the chat: totals per dossier and per
  body only.
- Never lift a masking policy to make a report readable.

## Output

A short report: dossiers controlled, lines matched, gaps (count and
total, largest first, by dossier and body), bodies missing on one
side, declarations without a deposit number or with a return to
process, and the dossiers skipped (contract or masking) with the
reason.

Why run it with Tulina

A prompt helps one person. A process moves a team.

Pasted into a chat, the prompt above works once, for whoever pasted it. In Tulina, "Control the DSN against payroll" becomes a process the team shares, that keeps its history, runs on its own, and stays inside the same security perimeter as the tools it calls.

  • The whole team works on the same one

    PersonalTeamOrganisation

    A process lives where it belongs: yours, your team's or the whole organisation's. Whoever runs it can improve it, and everyone starts from the best version instead of explaining the job again.

  • Every edit is a version

    v1v2v3

    Each change is a new version with the previous one kept, so a bad edit is undone by restoring an earlier one. Every run records the version it followed, and what a run teaches goes back into the process.

  • It runs without you

    schedulewebhookon demand

    A hosted agent runs the process on Tulina's own infrastructure, on a schedule or when an event arrives, and keeps going when you close the chat. Nothing to host. Every run is tracked to its outcome.

  • Inside the same security perimeter

    vaultrolesrun log

    Credentials stay in the vault, never in the prompt. Roles decide who may run what, every call is logged, and a step a person has to approve waits for that person.

Questions about DSN reconciliation

Body by body. The month's charges table and contributions detail give what the payroll owes each social body, the DSN content gives what was declared, and the two totals are set side by side per dossier, establishment and body. Anything over your tolerance, and any body present on one side only, is listed for the payroll team.

It can do the reading and the arithmetic every month for every dossier, and leave the judgement to people. Each gap comes back with what both sides say, because a regularisation or a late fraction can explain it. Nothing is corrected or resent: the payroll software stays read-only.

Each declaration carries a state, a deposit (ADS) number and the returns recorded against it. The control flags any DSN of the month with no deposit number and any declaration with a return still to process, so nobody has to open each dossier to find the one that is stuck.

Only with the output kept to totals. This control reads files that a masking policy cannot filter, so it only runs where nothing is masked; it asks for the contribution blocks rather than the individual ones, logs amounts per social body in a restricted table and posts totals to the chat, never a name or a salary.

Skills that share tools with this one. The shared tools are lit.

See Tulina in a 30-minute demo.

Book a demo