m2m.maCustoms and AI
Customs and AI

Preparing a Customs File from the Supplier's Invoice

From the supplier's invoice to the declaration: read the items, classify, validate, calculate, gather the documents and invoice the client, step by step.

by the m2m.ma team · Published on · 4 min read

Preparing a Customs File from the Supplier's Invoice

It all starts with the invoice

The supplier's commercial invoice is the raw material of every customs file. It gives the seller and the buyer, the list of items, the quantities, the prices, the currency, often the Incoterm and sometimes the origin, the weight, the freight and the insurance. Used well, it makes it possible to prepare most of the file before the goods even arrive at the port or airport.

The problem is that it arrives in every form: a clean PDF, a crooked scan, a photo taken on a phone, in every language and every currency. Copying each line by hand takes time and multiplies typing errors. That is precisely the step a tool can speed up without taking the decision away from the customs broker.

What to note from the invoice

Before any calculation, note the useful information: supplier name, invoice number and date, currency, Incoterm and agreed place, country of origin, freight and insurance amounts if shown. For each item, you need the description, quantity, unit, line amount, country of origin and weight when indicated.

Then compare the invoice with the packing list and the transport document. Quantities, weights and number of packages must match. A description that is too vague, such as "miscellaneous parts" or "accessories", must be clarified with the client before classification, otherwise the heading chosen may be challenged. Note any discrepancies found so you can report them to the client from the outset.

  • Supplier, invoice number and date
  • Currency and Incoterm
  • Country of origin
  • Any freight and insurance
  • Items: description, quantity, unit, amount, weight

AI invoice reading in douane.m2m.ma

In douane.m2m.ma, the customs broker creates the client's file, chooses import or export, then uploads the invoice as a PDF or photo. The AI reads the supplier, the number and date, the currency, the Incoterm, the origin, the freight and insurance when shown, then each item with its description, quantity, unit, amount, origin and net weight.

For each item, the AI suggests an HS code with a justification and a confidence level, and flags the documents or authorisations likely to be required. It never gives a rate. Information missing from the invoice is left blank rather than invented. Identical lines are added only once, and if reading fails, items can be entered manually.

Validate, complete and calculate

The items read arrive for validation. The customs broker checks each description and each amount, accepts or corrects the suggested HS code, starting with low-confidence items. For an item, they can launch a search of official sources. Only validated items are included in the calculation, and the history keeps a record of every decision.

They then complete the file: freight and insurance if they were not on the invoice, exchange rate, customs office. The calculation gives the customs value, CIF on import or FOB on export, then, on import, the import duty, parafiscal tax, any TIC and VAT, using the firm's rate table, dated and sourced.

Documents, declaration and invoicing

The document list is built from the firm's rules and the AI's suggestions. The customs broker ticks off the documents received and attaches the files. They add the file's charges, disbursements and fees. When everything is ready, the file is marked as declared with its DUM number, and the calculation is frozen as it was used for the declaration lodged in BADR.

The client's invoice is then created as a draft in the my.m2m.ma invoicing module, with disbursements without VAT and services with their VAT. The calculation can be exported to Excel for the client. Once the invoice is paid, the file is archived with all its documents and its history.

Save time without losing control

Preparing a file from the supplier's invoice means replacing re-keying with checking. The time saved on copying lines goes into what makes the customs broker valuable: classification, checking the value, collecting documents and advising the client. The file is also better documented, which makes handovers between colleagues and responses during inspections easier.

To turn your supplier invoices into files ready for checking, with a transparent calculation and a prepared client invoice, try douane.m2m.ma. The free trial is counted in files and lets you judge the tool on the invoices you handle every day, for import and export alike, before choosing a plan.

Frequently asked questions

Can the AI read an invoice from a photo?

Yes. douane.m2m.ma accepts the invoice as a PDF or an image. The AI reads its information and items, but a blurred or badly framed photo can reduce reading quality. The customs broker checks each line before validating it.

What happens if the invoice is read twice?

Identical lines, with the same description, quantity and value, are not added a second time. If duplicates remain in the file, the calculation stays blocked until they are deleted or it is confirmed that they are separate lines.

Is the HS code suggested by the AI used directly?

No. The suggested code remains a suggestion until the customs broker has validated or corrected it. An item that has not been validated is not included in the calculation. The confidence level helps identify the items to examine first.

Share this article

Put it into practice with m2m.ma

E-invoicing, accounting and business management services for Moroccan companies. 15-day free trial, no credit card.