Skip to main content

Buyer and Invoice Import FAQ

Frequently asked questions about importing buyer and invoice data into Afakto.

Updated today

Buyer and Invoice Import FAQ

Frequently asked questions about importing buyer and invoice data into Afakto.

Table of Contents


Quick Reference Tables

Supported ID Types

ID_TYPE

Use Case

SIREN

French companies (9-digit)

SIRET

French establishments (14-digit)

VAT

European companies

DUNS_BRADSTREET

International businesses

NATIONAL_REGISTRATION_NUMBER

Other national registrations

COMMERCIAL_REGISTER

Commercial registry numbers

Supported Invoice Types

INV_TYPE

Description

Expected Sign

INVOICE

Standard invoice

Positive

CREDIT_NOTE

Credit note/refund

Negative

PAYMENT

Unallocated or rejected payment

Either

OTHER

Miscellaneous operations

Either

Supported Payment Methods

PAYMENT_METHOD

BANK_CHECK

BANK_TRANSFER

BAO

DRAFT

DRAFT_NOT_ACCEPTED

POSTAL_TRANSFER

STANDING_ORDER

OTHERS

Supported Date Formats

Format

Example

Recommended

YYYY-MM-DD

2023-05-15

✓ Yes

DD/MM/YYYY

15/05/2023

ISO datetime

2023-05-15T10:30:00


File Format & Preparation

What file format should I use?

CSV format with headers in the first row. Both comma (,) and semicolon (;) separators are supported.

flowchart LR
    subgraph "Choose Your Format"
        A["Period decimal<br/>1000.50"] -->|use| B["Comma separator<br/>amount,tax"]
        C["Comma decimal<br/>1000,50"] -->|use| D["Semicolon separator<br/>amount;tax"]
    end

What are the file requirements?

  • Encoding: UTF-8

  • Headers: First row must match documented column names exactly

  • Line endings: Windows (CRLF), Unix (LF), or Mac (CR) all supported

  • Extra columns: Ignored by the system

How do I convert Excel to CSV?

In Excel: File → Save As → CSV (Comma delimited) (*.csv)

Recommended file naming?

Use format yyyymmdd_companyCode_type.csv:

  • 20230515_ACME01_buyers.csv

  • 20230515_ACME01_invoices.csv


Buyer Import

Do I need to import buyers before invoices?

Yes. Buyers must exist before invoices can reference them.

What is BUYER_CODE?

Your unique identifier for each buyer. Keep it ≤15 characters for factor compatibility. The combination of COMPANY_CODE + BUYER_CODE must be unique.

How does buyer code matching work?

The system uses flexible matching when looking up buyers by code:

  1. Exact match: First tries to match the code exactly as provided

  2. Normalized match: Also matches codes with leading zeros and whitespace removed

For example, if your buyer has code 001234, the system will find it when searching for:

  • 001234 (exact match)

  • 1234 (leading zeros removed)

When multiple matches are possible, the system prefers the longest matching code (i.e., exact matches over normalized ones).

What about PAYMENT_TERMS?

Optional. Enter standard payment terms in days (e.g., 30, 45, 60).

Are address and contact fields required?

Technically optional, but required for buyers reported to insurers/factors. Include in initial import to avoid manual data entry later.

Address fields: ADDRESS_STREET_NAME, ADDRESS_STREET_NUMBER, ADDRESS_POSTAL_CODE, ADDRESS_CITY, ADDRESS_STATE, ADDRESS_COUNTRY

Contact fields: CONTACT_NAME, CONTACT_EMAIL, CONTACT_PHONE


Invoice Import

AMOUNT vs BALANCE?

  • AMOUNT: Original invoice total

  • BALANCE: Current outstanding amount (after partial payments)

How do I import credit notes?

Set INV_TYPE to CREDIT_NOTE with negative values for AMOUNT and BALANCE.

What is RECONCILIATION_JOURNAL?

Optional field to specify the accounting journal where fully paid invoices (BALANCE = 0) were reconciled.

What currencies are supported?

All standard ISO 4217 three-letter codes (USD, EUR, GBP, etc.).

How do I handle multi-currency buyers?

Create separate buyer records per currency:

  • ACME-USD for USD invoices

  • ACME-EUR for EUR invoices


Updates & Deletions

Can I update existing records?

Yes. Re-import with the same key fields and updated values:

  • Buyers: Same COMPANY_CODE + BUYER_CODE

  • Invoices: Same COMPANY_CODE + BUYER_CODE + INV_TYPE + INV_NUMBER

Can I delete data after import?

Yes, through the Afakto web interface. For bulk deletions, contact your administrator.


Troubleshooting

"Buyer not found" error

Ensure all buyers referenced in invoice imports were previously imported. The system uses flexible buyer code matching (see How does buyer code matching work?), but COMPANY_CODE must still match exactly (case-sensitive).

Date format errors

Use YYYY-MM-DD format for best compatibility.

How do I validate files before importing?

Check in Excel or Google Sheets for:

  • Missing required fields

  • Inconsistent formatting

  • Duplicate keys

  • Invalid data types

"Duplicate buyer/invoice found in file" error

Each record must appear only once per import file. The system blocks duplicates across the entire file based on:

  • Buyers: COMPANY_CODE + BUYER_CODE

  • Invoices: COMPANY_CODE + BUYER_CODE + INV_TYPE + INV_NUMBER

Remove duplicate rows before re-importing.


Automation & Advanced Topics

How often should I import?

Daily imports recommended, or at minimum before each cession.

Can I automate imports?

Yes, via:

  • SFTP Transfer: Push files to Afakto

  • Azure Blob Storage: Transfer files via Azure integration

  • API Integration: Programmatic uploads

  • Scheduled Imports: Afakto pulls from your systems

The Afakto technical team is also available to integrate data through other mechanisms tailored to your needs. Contact your implementation team for setup.

How do I handle large volumes?

  • Schedule imports during off-peak hours

  • Remove unnecessary columns

⚠️ Important: Do NOT split invoice files by company. Each file must contain ALL invoices for each company included—missing invoices will have their balance reset to 0.

Can I include multiple companies in one file?

Yes. The system processes each company independently based on COMPANY_CODE.

How do I import historical data?

Same format—just use the correct historical dates for INV_DATE and DUE_DATE.


Getting Help

  1. Buyer and Invoice Import Guide — detailed instructions

  2. Buyer and Invoice Import Examples — templates and examples

  3. Contact your system administrator or Afakto support

Did this answer your question?