Connect Fortnox

Connect your Fortnox company to bring your articles into job lines and match Fortnox customers to the organizations you install for.

3 min readEdit this page
On this page

Connect your Fortnox company to Flowion and your accounting data is there when you plan installation work:

  • Your Fortnox articles — chargers, cable, labour — are ready to pick when you add lines to a job.

  • Your Fortnox customers are matched to the customer organizations you install for, so each one is linked to the right Fortnox customer number.

Flowion keeps both up to date as they change in Fortnox. It reads from your Fortnox and does not write to it.

Before you start

  • You hold the connections.connection.manage permission in the Flowion organization, which the Owner and Admin policies include.

  • You are a system administrator in Fortnox.

  • Your Fortnox subscription includes the Integration add-on. Without it, Fortnox refuses the connection.

Connect

  1. In the console, open your organization's settings, then Connections.

  2. On Fortnox, choose Install.

  3. Review what the connection may do. In your organization on Flowion lists what it may read here; In your Fortnox lists what Fortnox will ask you to approve: company information, customers, articles, orders and invoices. Choose Connect.

  4. Sign in to Fortnox and approve. Fortnox sends you back to the console, where Fortnox now shows as connected, with your Fortnox company's name.

If you come back to a message instead, it says why: most often a missing Integration add-on, or the approval was declined in Fortnox. When you reconnect, sign in to the same Fortnox company as before; another company is refused.

What Flowion reads

From FortnoxWhat is kept
Company informationThe company's name and its Fortnox database number
CustomersName and organisation number — never email, phone, address or contact people
ArticlesArticle number, description, unit, sales price, the manufacturer's article number and EAN

Disconnecting deletes all of it from Flowion.

Use your articles in jobs

When you add a line to a job, the article picker lists your Fortnox articles. Search by description or article number. The line keeps the article's Fortnox number.

Over the API, the same list:

GET/v1/organizations/$ORG/connections/fortnox/articles?q=cablebash
curl "$API/organizations/$ORG/connections/fortnox/articles?q=cable" \
  -H "Authorization: Bearer $TOKEN"
200Response
{
  "articles": [
    {
      "externalId": "1042",
      "description": "Charging cable type 2, 7 m",
      "unit": "st",
      "salesPrice": "1490",
      "articleNumber": null,
      "ean": null
    }
  ]
}

It answers with an empty list while Fortnox is not connected. It needs an installer organization and the connections.connection.manage permission.

Match your customers

Flowion compares the organization number of each customer organization that has given you access with your Fortnox customers. Exactly one Fortnox customer with that number links them automatically.

When it cannot decide, it asks you. In the console, choose Link customers on the Fortnox connection: each customer is listed with the Fortnox customers it might be. Over the API, find the connection's id ($INSTALLATION) in GET /organizations/{organizationId}/connections, then:

bash
FORTNOX="$API/organizations/$ORG/connections/installations/$INSTALLATION"

curl "$FORTNOX/link-proposals" \
  -H "Authorization: Bearer $TOKEN"

Each proposal says why it needs you (reason):

reasonMeans
no_organization_numberThe customer organization has no organization number in Flowion
no_matchNo Fortnox customer has its number; the candidates are suggested by name
several_matchesMore than one Fortnox customer has its number
shared_numberTwo of your customers share this organization number

Confirm the right candidate, or dismiss the proposal:

bash
curl -X POST "$FORTNOX/links" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"recordKind": "customer_organization",
       "flowionId": "'"$CUSTOMER_ORG"'", "externalId": "10023"}'
bash
curl -X DELETE \
  "$FORTNOX/link-proposals/customer_organization/$CUSTOMER_ORG" \
  -H "Authorization: Bearer $TOKEN"

Keep the connection healthy

If Fortnox stops accepting Flowion's access, the connection shows as needing reconnection, and everyone in the organization who can manage connections gets an email. Choose Reconnect and approve in Fortnox again.

To narrow what the connection may read without disconnecting it, choose Manage access, or call PATCH /organizations/{organizationId}/connections/installations/{installationId} with the scopes to revoke. Required scopes cannot be revoked this way; that is a disconnect.

Disconnect

Choose Disconnect on the connection, or:

bash
curl -X DELETE "$FORTNOX" \
  -H "Authorization: Bearer $TOKEN"

Flowion stops reading at once and deletes the Fortnox credential, the copied customers and articles, and the customer links. It also revokes its access in Fortnox; when Fortnox cannot be reached, the response says "vendorRevokePending": true and Flowion retries.

Also remove Flowion in Fortnox, under Administrera integrationer.

Endpoints

Connections

In the API reference