Skip to content
Accounting

Generate the Intrastat file for Intr@Web in SamBooks

Reading time

8 min read

Download PDF

From confirmed lines to an XML file ready to upload — and what's already final before you even generate it.

What it's for

This guide covers the step after Compute an Intrastat period and complete the lines: once a period's lines are Confirmed, SamBooks builds the ADM-format XML file for Intr@Web and downloads it for you. From here on SamBooks steps back: the file is material ready for your accountant or an authorized intermediary, who uploads it to Intr@Web and files it with the Customs Agency. SamBooks never connects directly to Customs and doesn't submit anything on your behalf.

Before you start

  • You need lines that are already confirmed — covered in Compute an Intrastat period — for the exact combination of year, frequency, period number and list type you want to generate. Draft lines don't go into the file.
  • Who can generate it: the Gestore (manager) or Amministrativo role, same as computing and confirming.
  • A line's data is already final from the moment you confirm it, not just from the moment you generate the XML: if you have doubts about a line, sort them out before you get to this page, not after.

Step by step

1. Check you have confirmed lines for the period

Open Intrastat and filter by Status → Confirmed, along with year, frequency and list type: make sure there's at least one line with those exact values before continuing. The period number isn't one of the filters — you read it in the Period column, in the year/number (frequency) format. If even one of the four values doesn't match, generation finds nothing and stops with an error (see "If something's wrong").

2. Generate Intr@Web XML

Top right on the page, press Generate Intr@Web XML: the matching dialog opens, explaining: "Generates the ADM electronic file from the period's confirmed lines and downloads it. Lines move to «sent». Submission to ADM is done by your accountant." Fill in the same four fields as computing the period — Year, Frequency, Period, List type — with exactly the combination of the lines you want to include, and press Generate and download. Here too the Year field defaults to the previous year: check it, because a different year means no lines found.

3. What happens right after

Two things happen at once:

  1. The XML file downloads automatically to your computer.
  2. All confirmed lines in that year/frequency/period/list-type combination move from Confirmed to Sent status.

The confirmation toast tells you how many lines were included, e.g. "12 lines sent — XML downloaded."

4. Recognize the downloaded file

The filename always follows the same pattern: intrastat_<year>_<frequency><period>_<list type>.xml — for example intrastat_2026_M6_intra1bis.xml for June 2026 goods sales, or intrastat_2026_T2_intra2quater.xml for second-quarter services received. The name alone tells you which period and list it covers, without opening it.

5. Check the file before handing it over

Before passing it to your accountant, open the XML (it's plain text) and check at least:

  • the row count matches what the toast reported and what you expected to include;
  • the CN codes match what you had in the table, and so do the statistical values — bearing in mind that the XML rounds them to whole euros (no decimals), just as the net mass is rounded to whole kilograms;
  • the header carries the year, period and frequency you set in the dialog.

If something's off, it's still material to work through with your accountant: there's no way to "fix" an XML you've already downloaded from inside SamBooks.

6. Hand off the file: who submits what

The file you downloaded hasn't been sent to anyone: it's ready to be uploaded to Intr@Web, but it's your accountant or the authorized intermediary who does that, from their own channel. The same notice is already printed on the page, above the list filters, every time you open Intrastat.

What's already final, and what changes with "Sent"

There's an important detail to understand before you press the button: a line's data stops being editable at the previous step, when you confirm it — not when you generate the file. The Complete dialog only works on draft lines, so a Confirmed line arrives on this page already locked: you're not unlocking a new risk here, you're closing a path that was already one-way.

What changes specifically with Generate Intr@Web XML is that the line also drops out of the recomputation cycle: if you re-run Compute period on the same combination later, already-Sent lines are skipped, not updated — recomputation is only meant to pick up new invoices for that period, never to touch ones already included in a generated file. And there is no "back to draft" or "undo send" button for an Intrastat row today, neither in SamBooks nor by asking Sam.

In practice, the moment you can still fix a value from SamBooks is before pressing Confirm row, in the previous guide. After that, whether a line is only Confirmed or you've already generated the XML, the correction goes through your accountant: for a merely confirmed line, by checking the source invoice with them; for an already-sent line, through the procedure they know for amending an Intrastat list that's already been filed.

If something's wrong

  • SamBooks says there are no confirmed lines for the period. — The message repeats the year, period, frequency and list type you entered: for that exact combination there is no line in Confirmed status. Check all four values, one field being off (say, the list type) is enough to find nothing. If the lines exist but are still drafts, confirm them first.
  • I generated the XML for the same period a second time and it finds nothing. — That's expected: after the first generation, that combination's lines already moved to Sent, so there are no more Confirmed lines left to include. If new invoices came in for the same period, run Compute period first — the new lines start as drafts, complete and confirm them, then generate a second file for just those.
  • I made a mistake on a line but haven't generated the XML yet. — If the line is still a draft, fix it from the Complete dialog (previous guide). If it's already Confirmed, it can no longer be edited from SamBooks: talk to your accountant before generating the file anyway.
  • I made a mistake on a line that's already sent. — It can't be corrected inside SamBooks: talk to your accountant, who knows how to amend an Intrastat list that's already been filed.
  • The downloaded file has a different name than I expected. — The name always reflects the four parameters chosen in the dialog (year, frequency+period, list type): if it doesn't match, you likely picked different values than intended.

Ask Sam

Generating the XML is also available from chat: "generate the Intrastat file for June 2026 goods sales." Sam applies the same check — confirmed lines are required for that combination — and the file shows up as a downloadable attachment in the reply, with exactly the same effect as the manual button: the included lines move to Sent. It's an action you can't undo: for the same reason explained above, there's no way to bring an already-sent row back, whether from chat or from the interface.

Frequently asked questions

How do I generate the Intrastat file to send to Customs? From Intrastat, with lines already confirmed for a period, press Generate Intr@Web XML with year, frequency, period and list type: the file downloads and the lines move to Sent.

Where do I download the Intr@Web XML? It downloads automatically to your computer the moment you generate it — there's no separate download step.

Does SamBooks file the Intrastat lists for me? No. SamBooks prepares the file and hands it to you; submitting it on Intr@Web to the Customs Agency is done by your accountant or an authorized intermediary.

Who uploads the file to Intr@Web? Not SamBooks: the file has to be uploaded to Intr@Web by whoever is authorized on the electronic channel — in practice your accountant or an intermediary. SamBooks never connects to Customs.

I generated the XML, can I no longer edit the lines? The lines were already locked when you confirmed them, before you even generated the file; generating the XML additionally takes them out of the recomputation cycle and moves them to Sent.

It says there are no confirmed lines. Check that year, frequency, period and list type in the dialog exactly match the lines you confirmed: one different value is enough to find none.

Is the Intrastat file already valid for Customs? It hasn't been submitted to anyone. SamBooks prepares it in the format expected for the Intr@Web upload, but it's still material to hand to your accountant, who checks it and files it through their own channel.

How do I check the Intrastat file is correct? Open it and compare the row count, CN codes and statistical values with what you had in the table before generating it, bearing in mind that the XML rounds the amounts to whole euros.

Can I regenerate the XML for the same period? Only if there are new confirmed lines for that combination: lines already sent before don't become available again, so a second generation for the same period only includes the new material.

I made a mistake on a line that's already been sent, what do I do? SamBooks doesn't offer a way to fix it: contact your accountant for the procedure to amend a list that's already been filed.

Ready to try SamBooks?

7-day free trial, no credit card required.

Start for free