SG Finans (export)

Modified on Thu, 5 Nov at 12:03 PM

How the export works

With the SG Finans export, Project Flow creates files with your finalized invoices and credit notes, and the customers on them, in SG Finans' fixed-width factoring format. You send the files to SG Finans, by download, e-mail or FTP. It is a file export, not a live connection.

  • Two files per export: FAKTURA.sgf with the invoices and credit notes, and KUNDE.sgk with the customers (debtors) on them.
  • One direction. Nothing comes back from SG Finans, neither payments nor status.
  • No PDF. The invoice PDF and EHF aren't included. Send the invoices to your customers as usual.



Set up the export

Step 1: Add the integration

  1. Go to Setup → Settings → Integrations (Oppsett → Innstillinger → Integrasjoner) and switch to the tab Export to file (Eksport til fil). You need administrator access.
  2. Click + Create integration and choose SG Finans.
  3. Fill in the fields below, tick Enabled and save.

Project Flow plan. The export isn't available on the Start plan. If it has a monthly cost, the form shows it.


Step 2: SG Finans settings

Field (EN / NB)Description
Customer number / KundenummerYour customer number at SG Finans, which you get from them. At most 4 digits. Required.

Only 4 digits. Project Flow lets you type more, but only the first 4 digits are used in the files. Shorter numbers are filled with leading zeros, for example 65 becomes 0065.


Step 3: How and when the files are sent

Field (EN / NB)Description
Default invoice issue date limit / Standard sluttdato for fakturaeksportWhich invoices are included, by invoice date: Up to and including last day of previous month, Current date, or No limitations on date (everything that hasn't been exported yet) (default).
Send data to / Send data tilDownload folder (default), Email, FTP / FTPS (also SFTP) or HTTP / HTTPS.
Transfer filesOnly for FTP and HTTP. Manually (default), or Continuously (after each invoice finalization).
Define access / Definer tilgangOnly for manual transfer. Limit who may run the export, by access role or coworker.

Same file names every time. The files are always called FAKTURA.sgf and KUNDE.sgk. With FTP, a new export replaces the files from the last one in the folder, so make sure SG Finans has picked them up first.


Step 4: Prepare Project Flow

  • Numbers fit the fields. Customer numbers can have at most 9 digits and invoice numbers at most 8. Longer numbers are cut.
  • Customers: SG Finans requires an organization number, an address (first address line, postal code and place) and a country for each debtor. Project Flow doesn't check this, so fill them in on the customers.
  • Customer name: according to SG Finans, the company name can't start with AS or similar.
  • Short texts. The invoice text is cut to 25 characters and the order reference to 15.



Run the export

  1. When there are invoices to export, Export to accounting (N) (Eksport til regnskap) appears in the notifications menu (the bell). You need permission to edit invoices, and must be on the access list if one is defined.
  2. Click it, check the invoices to be exported, and choose a To date if your date limit allows it.
  3. Click Export. You get links to both files. With Download folder, they are downloaded right away.
  • What is included: finalized invoices and credit notes that haven't been exported yet, up to the date you choose.
  • Customers: the customers of the exported invoices are written to KUNDE.sgk in every export, also if they were sent before.
  • After the export: the invoices get the export status Has been transferred.
  • Export again: in the invoice overview, open the cog menu, choose Edit export status (Rediger eksportstatus), set the invoices back to To transfer, and run the export again.
  • Earlier files: in the invoice overview, open the cog menu and choose Exported files (Eksporterte filer).
  • Continuous transfer: with FTP or HTTP and Continuously, each invoice is sent when it is finalized, and the menu item doesn't appear.



The files

  • Fixed width: each field has a fixed position and length, without separators or a header row. One line per invoice or customer, with Windows line breaks.
  • Encoding UTF-8.
  • Dates as YYMMDD.
  • Amounts in øre, without decimal separator or sign, for example 00000618000 = 6,180.00.
  • Numbers are filled with leading zeros, texts with trailing spaces. Too long values are cut.


FAKTURA.sgf (invoices)

FieldPositionLengthContent
F1 Transaction code111 invoice, 9 credit note
F2 Customer no.2–54The Customer number from the integration
F3 Debtor no.6–149Customer number in Project Flow
F4 Invoice no.15–228Invoice or credit note number
F5 Invoice date23–286Invoice date
F6 Due date29–346Due date
F7 Amount35–4511Total including VAT, after rounding, in your company currency
F8 Reference to invoice46–538Credit notes: the number of the credited invoice. Invoices: empty (no discount terms)
F9 Not in use54–585Empty
F10 Order no.59–7315The invoice's order reference
F11 Comment74–9825The invoice text
F12 Sales person no.99–1024The first 4 letters of your contact person's name on the invoice
F13 Project no.103–1097Project number
F14 Currency code110–1123Invoice currency, for example NOK or EUR
F15 Currency amount113–12311Total in the invoice currency

Not in the file: KID, VAT, invoice lines and accounts.


KUNDE.sgk (customers)

FieldLengthContent
K1 Control character1K
K2 Version number49409
K3 Customer no.4The Customer number from the integration
K4 Debtor no.9Customer number in Project Flow
K5 Organization no.11The customer's organization number
K6 Company name35Customer name
K7 First name20Empty
K8 Address30First address line
K9 Zip code4Postal code
K10 Post place23Postal place
K11 Contact person20Empty
K12 Telephone no.12Customer phone
K13 Country20Country name in English, for example Norway
K14 / K15 Country code2 + 3Country code as letters (NO) and number (578)
K16 Bank giro number11The customer's bank account number
K17, K184 + 35Empty
K19 Currency code3The customer's currency, or your company currency

The address is the customer's main address. If it has none, the invoice address, then the visiting address, is used.



Q&A

Q: "There are no invoices to export in the specified period."

A: All finalized invoices up to the date are already exported. Choose a later date, or set invoices back to To transfer with Edit export status.

Q: SG Finans says our customer number in the file is wrong.

A: Check the Customer number in the integration. Only the first 4 digits are used.

Q: SG Finans can't read a line, or the fields are shifted.

A: Check the customer and invoice on that line: customer number at most 9 digits, invoice number at most 8, and a postal code with 4 digits. Contact Project Flow support with the invoice number if it still fails.

Q: The KID isn't in the file.

A: No, the SG Finans format from Project Flow doesn't include KID.

Q: Why are the same customers in every file?

A: Project Flow always includes the customers of the exported invoices, also if they were sent before.

Q: I need to send an invoice again.

A: Set its export status back to To transfer with Edit export status, and run the export again. Or download the earlier files from Exported files.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article