Get started with Fortnox ↔ HubSpot
This guide describes how to set up and install the integration.
Setup in HubSpot
Note that you also need to buy the Fortnox app on HubSpot marketplace to have the full integration working.
- Search for the Fortnox app in HubSpot Marketplace or click here
- Click on the installation button.
- Select the account you want to use for installing the Fortnox app and click on Choose account.
- Click on Connect app to give the app permission to install the Fortnox app in your account.
- You will then be redirected to the authentication window for Fortnox.
Setup in Fortnox
Important
Note that you also need to buy the Fortnox to HubSpot app on Fortnox marketplace to have the full integration working.
To set up the integration in Fortnox, you need to have SysAdmin rights.
- Enter the username for the Fortnox account to use.
- Enter the password for the Fortnox account to use.
- Click on Godkänn behörighet to give the app permission to install the Fortnox app in your account.
Finish setup
- You have now installed the Fortnox app in your HubSpot account and added it to your Fortnox account.
- A sync will be made within the next 2 hours for the Customer registry from Fortnox into HubSpot Company entities. If it is activated in the App settings
Syncing
Here are the information that are synced for the different entities.
Fortnox to HubSpot
Syncing companies
- Once every second (2) hour a sync is being made for Companies from Fortnox to HubSpot. It includes both creating and updating Companies.
- The check-up for if a Customer exists is the following order name, fortnox_id and then last domain
- To reduce the risk of duplicated companies, make sure your customers are properly named in HubSpot.
| Field HubSpot | Direction | Field Fortnox | Description |
|---|---|---|---|
| Company: fortnox_id | <- | CustomerNumber | Field created by the Fortnox app to keep track of which customer it is related to |
| Company: organization_number_from_fortnox | <- | OrganisationNumber | Field created by the Fortnox app. Swedish organisation number, or for international companies: DUNS number or EU VAT number |
| Company: name | <- | Name | |
| Company: address | <- | Address1 | |
| Company: address2 | <- | Address2 | |
| Company: city | <- | City | |
| Company: country | <- | CountryCode (fallback: Country) | Standard HubSpot Country/Region. Stored as ISO 3166-1 alpha-2 (e.g. SE). Uses Fortnox CountryCode when set; otherwise a 2-letter Country value or an English country name. Existing companies are updated on the next company sync. |
| Company: zip | <- | ZipCode | |
| Company: phone | <- | Phone | |
| Company: billing_email | <- | EmailInvoice (fallback to Email) | Custom field created by the app for storing a single billing email address. Synced from Fortnox customer's EmailInvoice field (or Email field if EmailInvoice is not available). Used when creating invoices in Fortnox from HubSpot deals. |
| Company: fortnox_cost_center | <- | CostCenter | Cost center code. Synced from Fortnox. Used when creating customers and invoices in Fortnox. Input is normalized to uppercase. |
| Company: fortnox_customer_type | <- | Type | COMPANY or PRIVATE from Fortnox; shown in HubSpot as Company or Private person. When PRIVATE, the company domain is cleared on sync. |
Private person customers (optional HubSpot contact)
Fortnox customers with Type = PRIVATE are included in the regular company sync above. Turn on the nested setting Create contact for private persons (under Sync Companies) to also create or update a HubSpot contact and associate it with the company. The integration uses Fortnox Email as the unique key for the contact (not EmailInvoice); if Email is blank, only the company is synced.
| Field HubSpot | Direction | Field Fortnox | Description |
|---|---|---|---|
| Contact: email | <- | Required for this step; EmailInvoice is not used for the contact |
|
| Contact: firstname / lastname | <- | Name | Full name split into first and last (last word = last name) |
| Contact: phone | <- | Phone1 | |
| Contact: address | <- | Address1 | |
| Contact: city | <- | City | |
| Contact: zip | <- | ZipCode |
Syncing products
- Once every 30 minutes a sync is being made for Products from Fortnox to HubSpot. It includes both creating and updating Products.
- The check-up for if a Products exists is the by checking the SKU (hs_sku)
| Field HubSpot | Direction | Field Fortnox |
|---|---|---|
| Product: SKU (hs_sku) | <- | ArticleNumber |
| Product: name | <- | Description |
| Product: description | <- | Description |
| Product: price | <- | SalesPrice (fallback); Fortnox price list for the HubSpot company currency when mapped — details |
| Product: Cost of goods sold (hs_cost_of_goods_sold) | <- | PurchasePrice |
| Product: tax | <- | VAT |
| Product: Status (hs_status) | <- | Active, Expired |
Product Status: The HubSpot Status property (hs_status) uses internal values "active" and "inactive". It is derived from Fortnox article flags: when Active is true and Expired is false, the product is set to active. Otherwise it is set to inactive.
Product pricing (multi-currency)
Besides the article Sales price in Fortnox, the integration can use Fortnox price lists so HubSpot products get correct amounts in your portal company currency and, when applicable, extra HubSpot multi-currency price fields (hs_price_sek, hs_price_eur, etc.).
Fortnox permission
Reading price lists requires the Fortnox Pris (Price) permission on the integration. After your Fortnox app provider enables it, reconnect Fortnox from the HubSpot app so the connection is renewed. Until then, product prices follow the same behavior as before (primary price from Sales price).
If your Fortnox lists use short codes (e.g. A, B) without the currency in the name, your integration team maps each list code to an ISO currency (for example SEK, EUR). Only mapped lists are used; the main HubSpot Price for your company currency uses the matching list when configured, otherwise it falls back to Fortnox Sales price.
Release notes — Fortnox price lists & multi-currency product prices
Syncing invoices to HubSpot (deals or Invoices)
This feature imports invoices from Fortnox into HubSpot. By default each Fortnox invoice becomes a Deal in the Fortnox invoice deal pipeline. Optionally, enable Import as HubSpot Invoice under Syncing invoices to HubSpot Invoices to create native Invoice records instead.
Deal import (default)
This path lets you import invoices from Fortnox to deals in HubSpot.
First time setup:
If you enable this feature, a new sales pipeline named "Fortnox Invoices" will be created in HubSpot specifically for these invoices.
This pipeline will have four stages: Unpaid, Paid in Full, Unpaid Overdue, and Credited.
While import to deals is enabled in the app, each import run checks that this pipeline still exists. If the pipeline is missing, the app can create it again (same as turning the setting on) so imports can continue, without a separate step.
Important:
Invoices can only be imported if these conditions are met:
- The "Fortnox Invoices" pipeline and its stages must exist in HubSpot and match the app’s stored configuration. If the pipeline was deleted, the next import (with import still enabled) can recreate the default pipeline—see Release notes (Fortnox pipelines on sync).
- The currency used on the invoice must be part of the current effective currency codes for the HubSpot portal.
- The company listed on the invoice must already be imported as a company in HubSpot (exactly one HubSpot company with matching
fortnox_idfor the Fortnox customer number). - If optional invoice import filters are enabled, the Fortnox invoice must pass all configured rules (e.g. cost center on header or line rows).
- Fortnox Booked (bokförd) status does not gate import — unbooked invoices can sync if they pass filters and other checks.
Invoice import filters & options
Under app settings → Fortnox invoice to HubSpot → nested accordion Invoice import filters & options, you can limit which Fortnox invoices are imported and adjust amount/link behaviour. Filters are off by default; with no rules enabled, behaviour matches earlier releases.
Filter fields
| Field | Fortnox source | Notes |
|---|---|---|
| Cost center (Kostnadsställe) | CostCenter |
Matches header value or any invoice row cost center (useful when the header is empty but rows carry the cost center). |
| Your order number | YourOrderNumber |
WooCommerce / web order reference. |
| Customer number | CustomerNumber |
Fortnox customer id. |
| Currency | Currency |
ISO currency code on the invoice. |
| Invoice type | InvoiceType |
Fortnox invoice type. |
Operators include equals, not equals, in list, not in list, contains, starts with, is empty, and is not empty. Combine rules with match all (AND) or any (OR). Skipped invoices are logged in the fetch queue job (visible in Bull Board job logs).
Options
- Amount includes VAT (default off): when off, deal
amountand HubSpot Invoicehs_amount_billeduse the ex-VAT total (TotalToPay - (TotalVAT + RoundOff)) — same as before this feature. When on, the payable total including VAT is used. - Update existing deal (deal import only, default off): when on, the app finds a deal whose selected match property equals Fortnox
YourOrderNumberand updates it (amount, status, line items, PDF, etc.) instead of creating a deal in the Fortnox invoice pipeline. Requires a unique matching deal; if none or multiple matches, the import stops with a logged error. Pipeline and stage on the matched deal are unchanged. - Link HubSpot Invoice to existing deal (HubSpot Invoice import only, default off): creates/updates the HubSpot Invoice and associates it with a deal matched by the selected match property. By default the matched deal's fields (amount, invoice number, status, currency, final pay date) are also updated.
- Deal property to match on (shown when either link toggle is on, default
order_number): choose which HubSpot deal property the FortnoxYourOrderNumberis compared against. The dropdown lists your portal's visible text, number, and dropdown deal properties — including custom ones. The comparison is an exact match and requires a unique hit, so pick a property that is unique per deal. - Link only (don't update deal fields) (HubSpot Invoice import only, default off): when on, the synced HubSpot Invoice is only associated with the matched deal — no deal properties are changed. Use this when sales owns the deal amount and you only want the invoice connected to the deal.
Use Reset sync for entity invoices in app settings (or endpoint reset-fortnox-to-hubspot-sync) to re-fetch historical Fortnox invoices after changing filters. To queue one invoice manually: npm run cli:queue-invoice -- --hubId <portalId> --documentNumber <n>. Ops can search Bull jobs by portal at /admin/queue-search?portalId=<portalId>.
Mappings:
| Field HubSpot | Direction | Field Fortnox |
|---|---|---|
| Deal: invoice_number_in_fortnox | <- | DocumentNumber |
| Deal: final_pay_date_in_fortnox | <- | FinalPayDate |
| Deal: amount | <- | Calculation: TotalToPay - (TotalVAT + RoundOff) by default; or TotalToPay when Amount includes VAT is enabled in invoice import options |
| Deal: deal_currency_code | <- | Currency |
| Deal: closedate | <- | DueDate |
| Deal: createdate | <- | InvoiceDate |
| Deal: name | <- | InvoiceType DocumentNumber - CustomerName |
| Deal: description | <- | Comments |
| Deal: order_number | <- | YourOrderNumber |
| Deal: fortnox_invoice_status | <- | Derived: unpaid, paid, overdue, credited (from Fortnox invoice payment state; independent of deal pipeline stage) |
| Line items: hs_sku | <- | InvoiceRow ArticleNumber |
| Line items: name | <- | InvoiceRow Description |
| Line items: quantity | <- | InvoiceRow DeliveredQuantity |
Invoice PDF attached to the deal
When a Fortnox invoice is synced into a HubSpot deal, the invoice PDF is also attached to the deal as a Note (visible in the deal's activity timeline).
- When: on first import, and again whenever the deal stage changes (e.g. Unpaid → Paid in Full, Unpaid → Credited, Unpaid → Overdue). If a re-sync doesn't change the stage, no new PDF is uploaded.
- Direction: Fortnox → HubSpot only. PDFs are not uploaded back to Fortnox when a deal triggers a HubSpot → Fortnox flow.
- File location: HubSpot Files under
/fortnox-invoices/<portalId>/, access set to Private (only authenticated CRM users can view). - Failure handling: if download or upload fails, the deal sync still succeeds and the error is logged.
print scope. Existing installations need to re-authenticate the Fortnox connection once to grant the new scope — otherwise PDF downloads fail with Fortnox error 1000030. The app's standard re-authentication flow surfaces this when a missing scope is detected.
Syncing invoices to HubSpot Invoices
When the nested app setting Import as HubSpot Invoice (instead of Deal) is enabled under Fortnox invoice to HubSpot, Fortnox invoices are created or updated as native HubSpot Invoice records instead of deals. The same scheduled Fortnox invoice fetch runs; jobs are routed to the patch-hubspot-invoice queue.
Setup
- Enable Fortnox invoice to HubSpot (main toggle).
- Re-authenticate HubSpot under Connection so the portal grants invoice OAuth scopes (
crm.objects.invoices.read/write,crm.schemas.invoices.read/write). Fortnox re-auth is unchanged. - Enable the nested toggle Import as HubSpot Invoice. The toggle stays disabled until scopes are present.
voided, fully paid → paid, unpaid (including overdue) → open. Use Due date and HubSpot’s Overdue view for overdue invoices — there is no separate mappable “overdue” status.
Import requirements (same as deal import)
- The currency on the Fortnox invoice must be enabled for the HubSpot portal (or auto-enabled when that setting is on).
- The Fortnox customer on the invoice must already exist as a HubSpot company with matching
fortnox_id. - No billing email or contact is required — behaviour matches deal import (company + line items only).
- The same optional invoice import filters & options apply (filters, VAT amount, link HubSpot Invoice to an existing deal via a configurable match property, optionally link-only).
Switching target
Toggling between deal and Invoice import does not migrate existing records. Invoices already imported as deals stay deals; new syncs follow the current toggle.
Custom properties and missing properties
Invoice import uses the HubSpot Invoice object. The app creates these custom properties on Invoice (group Fortnox / invoiceinformation) on install and HubSpot re-authentication:
- invoice_number_in_fortnox — Fortnox document number (deduplication; also copied to native
hs_number) - final_pay_date_in_fortnox — Fortnox
FinalPayDate
Line items use the shared custom property fortnox_line_cost_center (same as deal import).
Properties are also ensured automatically before each invoice sync when Import as HubSpot Invoice is enabled (fetch queue and patch-hubspot-invoice job).
Property "invoice_number_in_fortnox" does not exist) and the import fails.
Re-authenticate HubSpot under Connection — the status view lists custom properties for companies, deals, invoices, and quotes.
Ops can run npm run info:hubspot-info create-missing-properties to create missing properties for stored portals.
These Invoice-object properties are not the same as deal fields with similar names: deal import writes invoice_number_in_fortnox on Deals; invoice import writes it on Invoices.
Mappings (HubSpot Invoice)
| Field HubSpot | Direction | Field Fortnox |
|---|---|---|
| Invoice: invoice_number_in_fortnox (custom) | <- | DocumentNumber (deduplication) |
| Invoice: hs_number (native) | <- | DocumentNumber |
| Invoice: final_pay_date_in_fortnox (custom) | <- | FinalPayDate |
| Invoice: hs_amount_billed | <- | TotalToPay - (TotalVAT + RoundOff) |
| Invoice: hs_currency | <- | Currency |
| Invoice: hs_due_date | <- | DueDate |
| Invoice: hs_invoice_date | <- | InvoiceDate |
| Invoice: hs_title (native) | <- | InvoiceType DocumentNumber - CustomerName |
| Invoice: hs_invoice_status (native) | <- | Credited → voided; paid → paid; otherwise open |
| Invoice: hs_purchase_order_number (native) | <- | YourOrderNumber |
| Invoice: hs_comments (native) | <- | Comments |
| Line items (same as deal import) | <- | InvoiceRow ArticleNumber, Description, DeliveredQuantity, Price, VAT, CostCenter |
Fortnox DocumentNumber is stored in invoice_number_in_fortnox and native hs_number for search and deduplication. HubSpot may also show its own invoice number (e.g. INV-1001) separately in the UI.
Invoice PDF attached to the HubSpot Invoice
When importing as a HubSpot Invoice, the Fortnox invoice PDF is attached as a Note on first import and when invoice status changes. If the portal supports note→invoice associations, the note appears on the Invoice; otherwise it is attached to the linked company. Requires Fortnox print scope; see Invoice PDF on deals.
Syncing Fortnox Orders to HubSpot Orders
When Fortnox orders to HubSpot orders is enabled in App settings, the app can create or update HubSpot Order records from Fortnox orders discovered via the scheduled fetch job (optional env REPEATABLE_JOB_ORDERS_TO_HUBSPOT_PATTERN).
Orders that are makulerade in Fortnox (Cancelled) are still synced with hs_external_canceled_date set (which drives Is Canceled in HubSpot); the sync does not add deal, quote, or company associations for those orders.
If the Fortnox order Remarks contain HUBSPOT_DEAL_ID:<dealId> (this marker is added when a Fortnox offer is created from a HubSpot Quote, and may carry over when the offer becomes an order in Fortnox), the app also links the HubSpot Order to that Deal and adds the same Contact, Company, and Line item associations as the Deal (so the Order mirrors the Deal’s CRM relationships).
If Fortnox OfferReference is set (the offer’s document number when the order was created from an offert), the app finds the HubSpot Quote whose fortnox_offer_document_number matches; that quote is associated to the Order. If the deal was not already taken from Remarks, the app uses that quote’s single associated deal for the same contact/company/line item associations.
If no deal is resolved that way, the HubSpot Order is still created or updated from Fortnox (name, currency, total, external id). If the order has a CustomerNumber and a HubSpot Company exists with fortnox_id equal to that customer number (same linking as for invoices), the Order is associated to that company; otherwise it may stay unlinked from deals and companies.
Fortnox order pipeline (optional)
As with the Fortnox invoice deal pipeline, you can optionally enable a separate HubSpot Order pipeline named Fortnox order with stages Open, Processed, Shipped, Delivered, and Cancelled. On sync, the app sets hs_pipeline and hs_pipeline_stage from Fortnox: Cancelled → Cancelled; not Sent → Open; Sent and not NotCompleted → Delivered; Sent, NotCompleted, and WarehouseReady → Shipped; otherwise (still NotCompleted) → Processed. While the order pipeline is enabled in the app, each order sync can recreate the default pipeline in HubSpot if it is missing. If you turn off the order-pipeline feature in the app but old pipeline/stage IDs are still stored, the app does not auto-recreate until you re-enable the feature or clear that state. Do not delete the pipeline or its stages in HubSpot on purpose, or the stored configuration may no longer match.
Mappings:
| Field HubSpot (Order) | Direction | Field Fortnox | Notes |
|---|---|---|---|
| Order: hs_order_name | <- | DocumentNumber | Format: Fortnox order {DocumentNumber} |
| Order: hs_currency_code | <- | Currency | Defaults to SEK if missing |
| Order: hs_external_order_id | <- | DocumentNumber | Used to find or upsert the HubSpot order |
| Order: hs_total_price | <- | Total | Set when Total is present on the Fortnox order |
| Order: hs_external_canceled_date | <- | Cancelled | Yesterday’s date (UTC YYYY-MM-DD) when makulerad; cleared when not cancelled — HubSpot sets Is Canceled from this field |
| Association: Order ↔ Deal | <- | Remarks | When present: deal id parsed from HUBSPOT_DEAL_ID:<id> in Remarks (takes precedence) |
| Association: Order ↔ Quote | <- | OfferReference | Search Quote by fortnox_offer_document_number = OfferReference; associate Order ↔ that Quote when found |
| Association: Order ↔ Deal | <- | OfferReference | If no deal from Remarks: use that quote’s single quote_to_deal association |
| Associations: Order ↔ Contacts, Companies, Line items | <- | (via Deal) | Same records associated to the Deal are associated to the Order |
| Association: Order ↔ Company | <- | CustomerNumber | When no deal is linked: company search by fortnox_id = CustomerNumber |
| Order: fortnox_labels | <- | Labels[].Description | Multi-select; only values internal, external, warranty, order are stored |
| Order: fortnox_terms_of_payment | <- | TermsOfPayment | Betalningsvillkor (e.g. 30, 10, Z) |
| Order: fortnox_your_order_number | <- | YourOrderNumber | Customer purchase order number (PO Number) |
| Order: fortnox_invoice_email | <- | EmailInformation.EmailAddressTo | Invoice email |
| Order: fortnox_delivery_date | <- | DeliveryDate | Leveransdatum (YYYY-MM-DD) |
| Order: fortnox_way_of_delivery | <- | WayOfDelivery | Leveranssätt (Fortnox code, e.g. POST, BUDBIL) |
| Order: fortnox_terms_of_delivery | <- | TermsOfDelivery | Leveransvillkor (Fortnox code, e.g. FRITT, EXW) |
| Order: fortnox_your_reference | <- | YourReference | Er referens |
| Order: fortnox_billing_address_street / city / postal_code / country | <- | Address1 / City / ZipCode / Country | Faktureringsadress (custom HubSpot order properties; HubSpot has no native billing address on Order) |
| Order: hs_shipping_address_street / city / postal_code / country | <- | DeliveryAddress1 / DeliveryCity / DeliveryZipCode / DeliveryCountry | Leveransadress (HubSpot Order standard shipping address fields) |
HubSpot to Fortnox
Create an Invoice
When an Invoice is created in Fortnox based on a HubSpot Deal, following fields are mapped. Only a few Fortnox fields are populated to use Fortnox default handling of invoices.
| Field HubSpot | Direction | Field Fortnox |
|---|---|---|
| Deal: deal_currency_code | -> | Currency |
| Company: fortnox_id | -> | CustomerNumber |
| Contact: firstname lastname | -> | YourReference |
| Deal: hubspot_owner_id (firstname lastname) | -> | OurReference |
| Deal: agreement_start_date, agreement_end_date | -> | Remarks (appended before description, localized based on currency) |
| Deal: description | -> | Remarks (appended after agreement dates if they exist) |
| Line item: hs_sku | -> | ArticleNumber |
| Line item: name | -> | Description |
| Line item: quantity | -> | DeliveredQuantity |
| Line item: price | -> | Price |
| Line item: discount or hs_discount_percentage | -> | Discount |
| Line item: calculated (hs_total_discount or hs_discount_percentage) | -> | DiscountType ('AMOUNT' or 'PERCENT') |
| Line item: tax | -> | VAT |
| Company: billing_email | -> | EmailInformation.EmailAddressTo |
| Company: fortnox_cost_center | -> | CostCenter |
| Deal: order_number | -> | YourOrderNumber |
| Deal: fortnox_print_template | -> | PrintTemplate (only when set to delivery note) |
| Deal: fortnox_invoice_type | -> | InvoiceType (only when set to CASHINVOICE) |
| Deal: fortnox_payment_way | -> | PaymentWay (CASH, CARD, AUTOGIRO; default: omitted) |
| Deal: fortnox_way_of_delivery | -> | Before invoice: for PRINT / EMAIL / PRINTSERVICE, PUT customer DefaultDeliveryTypes.Invoice (+ EmailInvoice when EMAIL). After POST /3/invoices: GET …/print, …/email, …/eprint, or …/einvoice (before optional bookkeep). E-INVOICE only runs the send step. |
| Deal: amounts_include_vat | -> | VATIncluded (only when Yes: true; default: omitted) |
| Deal: fortnox_bookkeep_after_create | -> | After successful new invoice (and after optional send from fortnox_way_of_delivery): PUT …/bookkeep (optional; default: no booking) |
| Deal: fortnox_kreditfaktura + fortnox_credit_invoice_reference | -> | When kreditfaktura is JA: PUT …/credit on the debit document number in fortnox_credit_invoice_reference (no line-item POST for this path) |
Fortnox Way of Delivery (customer defaults + send)
The deal property Fortnox Way of Delivery (fortnox_way_of_delivery) does two things when set: (1) before POST /3/invoices, for PRINT, EMAIL, or PRINTSERVICE, it updates the linked Fortnox customer with DefaultDeliveryTypes.Invoice (and EmailInvoice from billing email when EMAIL). (2) after the invoice is created, it calls Fortnox send for this document, before optional bookkeep.
- PRINT → customer defaults, then
GET …/print - EMAIL → customer defaults +
EmailInformationon the invoice, thenGET …/email - PRINTSERVICE → customer defaults, then
GET …/eprint - E-INVOICE → only
GET …/einvoice(noDefaultDeliveryTypesupdate via this field) - Empty — create invoice only; no customer update or send call from this property.
E-invoice may require booking first in some Fortnox setups; see Release notes (April 21, 2026).
Bookkeep after create & kreditfaktura
Three optional deal fields control booking and credit invoices:
- Fortnox bookkeep after invoice create (
fortnox_bookkeep_after_create) — When Yes, after the app successfully creates a new Fortnox invoice from the deal (and after any optional send fromfortnox_way_of_delivery), it calls Fortnox to bookkeep that document. When No, behavior is unchanged (invoice created but not booked via this step). - Fortnox kreditfaktura (
fortnox_kreditfaktura, values NEJ / JA) — NEJ: create a normal invoice from deal line items. JA: create a credit invoice in Fortnox by crediting an existing debit invoice; deal line items are not used for this run. - Fortnox document to credit (invoice number) (
fortnox_credit_invoice_reference) — The Fortnox document number of the debit invoice to credit. Required when kreditfaktura is JA. After success, the new document number is stored in Invoice number in Fortnox (invoice_number_in_fortnox).
See Release notes (April 8, 2026) for API details and the bookkeep/credit fix.
Sync Fortnox invoice row values to line items (optional)
When the nested app setting Sync Fortnox invoice row values to line items is enabled under HubSpot deal to Fortnox invoice, the app writes Fortnox-calculated row VAT and totals back to the deal's line items after a successful invoice create. This is off by default.
When it runs: after Fortnox accepts the invoice (and after any optional send from
fortnox_way_of_delivery and optional bookkeep), and before
Invoice number in Fortnox (invoice_number_in_fortnox) is set on the deal.
Applies to normal invoice create and to kreditfaktura (credit invoice) create.
Line item properties written (Fortnox → HubSpot):
| HubSpot line item property | Source |
|---|---|
fortnox_invoice_document_number |
Fortnox invoice document number |
fortnox_invoice_row_number |
1-based row index on the Fortnox invoice |
fortnox_invoice_row_vat_percent |
Fortnox row VAT |
fortnox_invoice_row_vat_amount |
Derived from Fortnox row totals (respects VATIncluded on the invoice) |
fortnox_invoice_row_total_incl_vat |
Derived line total including VAT from the Fortnox row |
Matching and safety:
- Rows are matched by index (first Fortnox row ↔ first line item, and so on).
- Each pair is verified against SKU, quantity, and line total before update. Credit rows compare absolute line totals; signed VAT amounts from Fortnox are preserved.
- Line items already linked to a different Fortnox invoice are skipped (re-invoicing guard). Credit sync allows rows linked to the debited invoice.
- Line item
priceandtaxare not changed — downstream exports (e.g. card integrations) can read the Fortnox properties as authoritative VAT. - Sync-back is best-effort: failures are logged and surfaced in the activity message; invoice create still succeeds.
- HubSpot batch updates are sent in chunks of up to 100 line items per request.
Custom properties are created on line items at install and HubSpot re-authentication (group Line item information).
Amounts Include VAT
The app includes a deal property "Amounts include VAT" (amounts_include_vat)
that controls whether HubSpot deal and line item amounts are treated as VAT-inclusive or VAT-exclusive when creating Fortnox invoices.
- Default (empty or No) – The app does not send
VATIncluded; Fortnox uses its default (amounts treated as VAT-exclusive, VAT added on top). This preserves the original behavior. - Yes – HubSpot amounts include VAT. The app sends
VATIncluded: trueso Fortnox does not add VAT on top. Use this when your HubSpot deal amounts already include VAT to avoid double VAT.
Set to Yes only when your HubSpot amounts are VAT-inclusive and you want Fortnox to treat them as such. See Release Notes (March 10, 2026) for more details.
Invoice vs Delivery Note (Print Template)
The app includes a deal property "Fortnox document type" (fortnox_print_template)
that controls whether Fortnox creates a regular invoice or a delivery note when you trigger
"Create invoice in Fortnox".
- Faktura (value:
st) – standard invoice. The app does not sendPrintTemplate; Fortnox uses its default (normally invoice). - Följesedel (value:
ps) – delivery note. The app sendsPrintTemplate = "ps"on the invoice. - If the field is empty or has any other value,
PrintTemplateis omitted and Fortnox applies its own default template.
This means you only explicitly override the template when you select Följesedel; otherwise the invoice follows your Fortnox default configuration.
Standard invoice vs Cash invoice (InvoiceType)
The app also includes a deal property "Fortnox invoice type" (fortnox_invoice_type)
that controls whether Fortnox creates a standard invoice or a cash invoice (kontantfaktura).
- Standard invoice (Fortnox default) (value:
INVOICE) – normal invoice type. The app does not sendInvoiceType; Fortnox uses its configured default. - Kontantfaktura (cash invoice) (value:
CASHINVOICE) – the app sendsInvoiceType = "CASHINVOICE"so Fortnox creates a cash invoice. - If the field is empty or has any other value,
InvoiceTypeis omitted and Fortnox applies its own default type.
Combined with the print template setting, this gives you fine-grained control per deal while still respecting Fortnox defaults when you do not explicitly override them.
Betalsätt (PaymentWay)
The optional deal field Fortnox betalsätt (PaymentWay) (fortnox_payment_way) maps to Fortnox PaymentWay when creating an invoice from a deal:
- Kontant, Kort, or Autogiro sends the matching Fortnox API code (
CASH,CARD,AUTOGIRO). Choose Kort for card payments (for example Diners). Default leavesPaymentWayunset.
⚠️ VAT Configuration Requirement
Important: The VAT percentage sent to Fortnox must match a VAT rate that is configured in your Fortnox account.
How it works:
- The tax property on line items contains the VAT percentage (e.g., "25" for 25%)
- This percentage is sent to Fortnox when creating invoice rows
- Fortnox matches this percentage to a configured VAT rate in your account
- If the percentage doesn't match a configured rate, Fortnox may reject the invoice or use a default rate
To configure VAT rates in Fortnox:
- Go to Settings → Accounting → Predefined Accounts
- Scroll to the VAT section
- Ensure all VAT percentages you use (e.g., 25%, 12%, 6%) are configured
- Common VAT account codes: 2611 (25%), 2621 (12%), 2631 (6%)
Invoice Email Feature
Automatic Email Configuration: When creating invoices in Fortnox from HubSpot deals, the app can automatically configure the invoice to be sent to a specific billing email address.
Syncing from Fortnox:
- The Billing Email field is automatically synced from Fortnox customers to HubSpot companies every 2 hours
- The app prioritizes the EmailInvoice field from Fortnox, falling back to the Email field if EmailInvoice is not available
- Email addresses are automatically trimmed of whitespace during sync
- If both email fields are empty or null in Fortnox, the billing_email field will not be set in HubSpot
Manual Configuration:
- You can also manually add a single billing email address to the Billing Email field on the associated company in HubSpot
- When creating an invoice from a deal, the app validates the email format before adding it to the invoice
- If the email format is invalid, a warning is logged and the invoice is created without email information
- If no billing email is provided, the invoice is created without email information (normal behavior)
- The billing email is set directly on the invoice, not on the customer record in Fortnox
- Only one email address is supported per invoice
Note: The Billing Email field is automatically created during app installation and can be found in the Company Information section. The app validates email format when creating invoices to ensure only valid addresses are sent to Fortnox.
Remarks Field Structure
Remarks Field Ordering: When creating invoices in Fortnox from HubSpot deals, the Remarks field is built in the following order:
- Agreement Dates (if provided, localized based on currency)
- Deal Description (if provided)
Agreement Dates Localization:
- Swedish (SEK currency): "Avtalsstartdatum {date} och slutdatum {date}" - Dates formatted as YYYY-MM-DD
- English (other currencies): "Agreement start date {date} and end date {date}" - Dates formatted as MM/DD/YYYY
- If only start date is provided, only that date is included
- If only end date is provided, only that date is included
- If both dates are provided, they appear together in one text string
Line Item Descriptions
Product Name Only: When creating invoices in Fortnox from HubSpot deals, the app uses only the line item name field for the description in Fortnox.
Behavior:
- If name exists → Uses name only
- If name is missing → No description field sent
Works for both: Existing products (with SKU) and custom line items (without SKU)
Create a Company
The Fortnox to HubSpot sync app allows you to create a company in Fortnox based on a HubSpot company. This feature can be enabled or disabled from the app settings in HubSpot.
| Field HubSpot | Direction | Field Fortnox | Description |
|---|---|---|---|
| Company: address | -> | Address1 | |
| Company: address2 | -> | Address2 | |
| Company: city | -> | City | |
| Company: fortnox_id | -> | CustomerNumber | Field created by the Fortnox app to keep track of which customer it is related to |
| Company: name | -> | Name | |
| Company: organization_number_from_fortnox | -> | OrganisationNumber | Field created by the Fortnox app for getting the Organization Number for easier identification |
| Company: phone | -> | Phone1 | |
| Company: zip | -> | ZipCode | |
| Company: fortnox_cost_center | -> | CostCenter | Cost center code. Normalized to uppercase. Created in Fortnox if it does not exist. Requires costcenter scope. |
Cost Center (fortnox_cost_center)
The Fortnox Cost Center field on companies is used when creating customers and invoices in Fortnox.
Fortnox expects cost center codes in uppercase (e.g. AVD1).
- Case-insensitive input: You can enter values in any case (e.g. "avd1", "Avd1") – the app normalizes them to uppercase for Fortnox.
- Auto-creation: If the cost center does not exist in Fortnox, the app creates it before creating the customer.
- Scope: Requires the
costcenterscope – re-authenticate if you get errors.
Create a Fortnox Offer from a Quote
When a Fortnox offer (offert) is created from a HubSpot Quote, the app maps Quote line items and related deal/company data to Fortnox (same line-row logic as Create an Invoice from a deal).
Enable HubSpot quote to Fortnox offer in App settings, and use the Quote properties Create offer in Fortnox (create_offer_in_fortnox) and Fortnox offer document number (fortnox_offer_document_number) after a successful create.
Fortnox Offers
Your Fortnox account must allow offers (offert). The Fortnox integration uses the Offers API (offer OAuth scope).
Triggering is done via a CRM subscription to POST /hubspot_event_subscriptions when create_offer_in_fortnox becomes Yes (see CRM subscriptions & webhooks). HubSpot may send subscriptionType: "object.propertyChange" with objectTypeId 0-14 for Quotes — the app supports that format as well as legacy quote.propertyChange.
Field mappings (HubSpot → Fortnox Offer)
| Field HubSpot | Direction | Field Fortnox | Notes |
|---|---|---|---|
| Company: fortnox_id | -> | Offer.CustomerNumber | Primary company on the associated Deal |
| Quote: hs_currency | -> | Offer.Currency | |
| Quote: hs_expiration_date | -> | Offer.OfferDate | YYYY-MM-DD; if missing or invalid, today’s date is used |
| Deal: amounts_include_vat | -> | Offer.VATIncluded | Sent as true only when set to Yes/true; otherwise omitted |
| (Deal id) | -> | Offer.Remarks | Prefix HUBSPOT_DEAL_ID:<dealId> (traceability for Fortnox order → HubSpot Order sync) |
| Quote or Deal: description | -> | Offer.Remarks | Appended after the deal-id line when present (Quote description preferred) |
| Contact (from Deal) | -> | Offer.YourReference | First associated contact name when available |
| Deal owner | -> | Offer.OurReference | From hubspot_owner_id |
| Company: fortnox_cost_center | -> | Offer.CostCenter | Uppercased; requires costcenter Fortnox scope |
| Line item: hs_sku | -> | OfferRow.ArticleNumber | When set; article must exist in Fortnox when SKU is used |
| Line item: name | -> | OfferRow.Description | Product name only (same as invoice rows) |
| Line item: quantity | -> | OfferRow.Quantity | |
| Line item: price, discount, hs_discount_percentage, hs_total_discount | -> | OfferRow.Price, Discount, DiscountType | Same rules as invoice rows (amount vs percent discount) |
| Line item: tax | -> | OfferRow.VAT | VAT percentage; may be enriched from Fortnox article when missing |
| Quote: fortnox_offer_document_number | <- | Offer.DocumentNumber | Written on the Quote after Fortnox returns the created offer |
Typical requirements
- App setting: HubSpot quote to Fortnox offer is enabled.
- Quote: Associated to exactly one Deal; has line items; currencies consistent; no recurring billing on line items (where applicable).
- Company: Associated company has Fortnox ID (
fortnox_id) set. - Optional: Import Fortnox orders into HubSpot Order records is a separate toggle; scheduled polling uses
REPEATABLE_JOB_ORDERS_TO_HUBSPOT_PATTERN— see Release notes (April 22, 2026 — overview) and Release notes (March 20, 2026 — webhooks).
Create a Fortnox Order from a HubSpot Order
When a Fortnox order is created from a HubSpot Order, the app maps Order line items and the associated company to Fortnox using the same row logic as the deal → invoice and quote → offer flows.
Enable HubSpot order to Fortnox order in App settings, and use the Order properties Create order in Fortnox (create_order_in_fortnox) and Order number in Fortnox (order_number_in_fortnox) — the latter is written after a successful create and is used to make the create idempotent.
Triggering is done via a CRM subscription to POST /hubspot_event_subscriptions when create_order_in_fortnox becomes Yes (see CRM subscriptions & webhooks). HubSpot may send subscriptionType: "object.propertyChange" with the order objectTypeId — the app supports that format alongside legacy order.propertyChange.
Line items on HubSpot Orders
HubSpot does not allow adding line items to orders created manually in the Orders UI; line items can only be set when an order is created via integration/API or rolled up from a Deal. To make this flow usable for manually created orders, the integration falls back to the order's associated Deal: if the order has no line items but is associated with exactly one Deal, the app uses that Deal's line items (and its company, if the order has none associated). If 0 or more than 1 Deals are associated, the run fails with “Order has no line items.”
Typical requirements
- App setting: HubSpot order to Fortnox order is enabled.
- Order: Has line items or is associated to exactly one Deal that has line items; currencies consistent; no recurring billing on line items.
- Company: Order's associated company (or, via the deal-fallback, the Deal's company) has Fortnox ID (
fortnox_id) set. - Idempotency: If
order_number_in_fortnoxis already set on the Order, the create is skipped.
Mappings:
| Field HubSpot | Direction | Field Fortnox | Notes |
|---|---|---|---|
| Order: hs_currency_code | -> | Currency | Must exist in Fortnox |
| Company: fortnox_id | -> | CustomerNumber | From the Order's associated primary company (or the fallback Deal's company) |
| Order: description | -> | Remarks | Optional |
| Contact: firstname lastname | -> | YourReference | Default; first associated contact. Overridden by Order: fortnox_your_reference when set. |
| Order: hubspot_owner_id (firstname lastname) | -> | OurReference | |
| Company: fortnox_cost_center | -> | CostCenter | Stripped when the Fortnox token lacks the costcenter scope |
| Order: fortnox_invoice_email (else Company: billing_email) | -> | EmailInformation.EmailAddressTo | Subject defaults to Order {no} bifogas. Skipped if neither is set or value is not a valid email. |
| Order: fortnox_terms_of_payment | -> | TermsOfPayment | Optional (Betalningsvillkor) |
| Order: fortnox_your_order_number | -> | YourOrderNumber | Optional (PO Number) |
| Order: fortnox_way_of_delivery | -> | WayOfDelivery | Optional (Leveranssätt) |
| Order: fortnox_terms_of_delivery | -> | TermsOfDelivery | Optional (Leveransvillkor) |
| Order: fortnox_delivery_date | -> | DeliveryDate | Optional (Leveransdatum, YYYY-MM-DD) |
| Order: fortnox_billing_address_street / city / postal_code / country (else Company: address / city / zip / country) | -> | Address1 / City / ZipCode / Country | Faktureringsadress. Empty fields are omitted so Fortnox copies from the customer record. |
| Order: hs_shipping_address_street / city / postal_code / country | -> | DeliveryAddress1 / DeliveryCity / DeliveryZipCode / DeliveryCountry | Leveransadress. Empty fields are omitted. |
| Line item: hs_sku | -> | OrderRows[].ArticleNumber | |
| Line item: name | -> | OrderRows[].Description | |
| Line item: quantity | -> | OrderRows[].DeliveredQuantity | |
| Line item: price | -> | OrderRows[].Price | |
| Line item: discount or hs_discount_percentage | -> | OrderRows[].Discount + DiscountType | |
| Line item: tax | -> | OrderRows[].VAT | Falls back to the Fortnox article's VAT when missing on the line item |
| Order: order_number_in_fortnox | <- | Order.DocumentNumber | Written on the HubSpot Order after Fortnox returns the created order |
App settings
Within HubSpot there is a few options related to the App.

- Sync Companies
- Toggle if the sync of companies should be active. This is synced every second (2) hour.
- Create contact for private persons
-
Nested toggle under Sync Companies. Fortnox customers of Type = PRIVATE are always synced as HubSpot companies (
fortnox_customer_type=PRIVATE, shown as Private person;domainis cleared). When this toggle is enabled, an associated HubSpot contact is also upserted using Fortnox Email only (find → update or create), then associated with the company — name, phone, and address are synced to the contact; EmailInvoice is still used for companybilling_emailonly. If Fortnox Email is empty, no contact is created. Disabled by default. See Private person customers. - Sync Products
- Toggle if the sync of products should be active. This is synced every 30 minutes.
- Fortnox invoice to HubSpot
- Toggle if the scheduled import of Fortnox invoices into HubSpot should be active. By default imports create Deals (Fortnox invoice deal pipeline). A nested toggle can switch the target to HubSpot Invoice records — see Syncing invoices to HubSpot Invoices.
- Import as HubSpot Invoice (instead of Deal)
-
Nested under Fortnox invoice to HubSpot. When enabled (and HubSpot invoice OAuth scopes are granted via re-authentication), new Fortnox invoices sync to HubSpot Invoice objects with native status mapping. When off, imports create Deals as before. Switching does not migrate existing records. Deal pipeline stage mapping appears when this toggle is off; when on, settings show how Fortnox states map to
open/paid/voided. - Invoice import filters & options
-
Nested accordion under Fortnox invoice to HubSpot. Optional rules (e.g. CostCenter, YourOrderNumber) limit which Fortnox invoices are imported. With no rules, or filters disabled, behaviour is unchanged. Options: Amount includes VAT (default off = ex VAT on Deal
amountand Invoicehs_amount_billed); Update existing deal (Deal import) (default off; when on, updates the matched deal — no new Fortnox-pipeline deal); Link HubSpot Invoice to existing deal (default off; when on and importing as HubSpot Invoice, syncs the Invoice record and associates it with the matched deal, by default also updating deal fields); Deal property to match on (defaultorder_number; the deal property compared against FortnoxYourOrderNumberin both link modes); and Link only (don't update deal fields) (HubSpot Invoice import only, default off; association without deal updates). See Invoice import filters & options. - HubSpot deal to Fortnox invoice
-
Toggle to allow/disallow Fortnox invoices to be created based on HubSpot deal.
Important note!
A CRM subscription should callPOST /hubspot_event_subscriptionswhen deal property Create invoice in Fortnox changes (HubSpot may sendobject.propertyChangeordeal.propertyChange). If "HubSpot deal to Fortnox invoice" is enabled and that property equals Yes, an invoice will be created in Fortnox when requirements are met. The result can be viewed in deal record Activities if included in filters. - Sync Fortnox invoice row values to line items
-
Nested accordion under HubSpot deal to Fortnox invoice (default off). After a successful invoice create — including kreditfaktura — writes Fortnox row VAT and totals to line item properties (
fortnox_invoice_row_vat_percent,fortnox_invoice_row_vat_amount,fortnox_invoice_row_total_incl_vat,fortnox_invoice_row_number,fortnox_invoice_document_number). Does not change line item price or tax. See Sync Fortnox invoice row values to line items. - HubSpot company to Fortnox customer
- Toggle to allow/disallow Fortnox customers to be created based on HubSpot company.
- HubSpot quote to Fortnox offer
-
Toggle to allow Fortnox offers (offert) to be created from HubSpot quotes when quote property Create offer in Fortnox is set to Yes. Requires a CRM subscription to
/hubspot_event_subscriptions; see Create a Fortnox Offer from a Quote. - HubSpot order to Fortnox order
-
Toggle to allow Fortnox orders to be created from HubSpot Orders when order property Create order in Fortnox is set to Yes. Requires a CRM subscription to
/hubspot_event_subscriptions; see Create a Fortnox Order from a HubSpot Order. If the Order has no line items but is associated with exactly one Deal, the Deal's line items are used as a fallback. - Fortnox orders to HubSpot orders
-
Toggle to sync Fortnox orders into HubSpot Order records (associate to deals from Remarks, or from Fortnox OfferReference via the HubSpot quote’s
fortnox_offer_document_number). See Syncing Fortnox Orders to HubSpot Orders. Optional scheduled polling usesREPEATABLE_JOB_ORDERS_TO_HUBSPOT_PATTERN; see Release notes (April 22, 2026 — overview) and Release notes (March 20, 2026 — webhooks). - Fortnox order pipeline (HubSpot Orders)
-
Separate toggle (same pattern as Fortnox invoice to Deal pipeline): creates the Fortnox order pipeline and stages in HubSpot, then sets each synced order’s pipeline stage from Fortnox. See Fortnox order pipeline under Syncing Fortnox Orders to HubSpot Orders. App endpoints:
/fetch-import-fortnox-orders-to-pipeline-settingand/update-import-fortnox-orders-to-pipeline-setting. - Re-authenticate HubSpot and Fortnox
- Option to re-authenticate HubSpot and Fortnox option if e.g. scopes have changed. Opens a popup with a button that opens the authentication process in a new window. The status view lists custom properties for companies, deals, invoices, and quotes. Once finished the popup can be closed.

CRM subscriptions & webhooks
Property-based automations use HubSpot CRM subscriptions with a single target URL on this app:
POST https://<your-app-domain>/hubspot_event_subscriptions
Subscribe to property changes for:
- Company —
create_customer_in_fortnox - Deal —
create_invoice_in_fortnox - Quote —
create_offer_in_fortnox
HubSpot’s payload may use "subscriptionType": "object.propertyChange" and "objectTypeId" (e.g. 0-14 for quotes) instead of older types like quote.propertyChange. The integration accepts both. Responses: 204 when a job was queued, 200 with { "message": "No event was triggered." } when nothing matched (e.g. wrong property or value not Yes).
Release notes (March 20, 2026) describe this in detail.
Customer and invoice actions use HubSpot app cards (the current sidebar extension type). On companies, add the Fortnox customer card from the Apps section when customizing the record view. On deals, add Fortnox invoice the same way.
If your portal still has an older “classic” Fortnox CRM card on the layout, remove it after adding the new card so users are not confused by duplicates. Admins may see in-app messaging from HubSpot prompting them to update cards during a migration.
See Release notes (May 11, 2026) for rollout notes and links to HubSpot’s feature-flag documentation for marketplace apps.
In the right sidebar of company records, the Fortnox customer card shows the "Organization number from Fortnox" and "Fortnox ID" for the connected Fortnox customer.
If the company isn't linked to a Fortnox customer, you can create one by clicking the "Create as customer in Fortnox" button, provided following conditions are met.
1. App Setting
- Ensure that the "HubSpot company to Fortnox customer" app setting is enabled.
2. Company Information
- The "Organization number from Fortnox" field for the HubSpot company is known.
- The "Fortnox ID" field for the HubSpot company must be unknown.
- There should be no existing customer in Fortnox with the same organization number.
On the right sidebar of deal records, the Fortnox invoice card shows the "Invoice number in Fortnox" for the connected Fortnox invoice.
If the deal isn't linked to a Fortnox invoice, you can create one by clicking the "Create as invoice in Fortnox" button, provided following conditions are met.
For a kreditfaktura, set Fortnox kreditfaktura to JA and Fortnox document to credit (invoice number) to the Fortnox document number of the debit invoice to credit. The same “no invoice number yet” rule applies to Invoice number in Fortnox before the run. Fortnox bookkeep after invoice create applies only when creating a new invoice from line items (not the credit path).
1. App Setting
- Ensure that the "HubSpot deal to Fortnox invoice" app setting is enabled.
2. Deal Information
- The "Invoice number in Fortnox" field for the HubSpot deal must be unknown.
- The deal's currency must exist in Fortnox.
- The deal must be associated with a company.
3. Company Information
- The associated company's "Organization number from Fortnox" is known.
4. Line Items
- The deal must have at least one line item.
- All line items must use the same currency.
- None of the line items can have recurring billing frequency.
- Line items with SKUs must correspond to articles existing in Fortnox.
- Allowed characters for SKUs include letters, underscores, hyphens, and slashes.
- If line items have VAT (tax property), the VAT percentage must match a configured VAT rate in Fortnox (see VAT Configuration Requirement below).