Skip to main content

Choose how to connect your accounting system to Flex

Compare Xero, QuickBooks, Sage Intacct, and a custom build, and plan what a custom integration must do on its own.

Written by Yasen Marinov

➤ Product: OfficeRnD Flex
➤ Who: Admins

➤ Where: On the Admin Portal, under Integration Hub and under Settings > Data & Extensibility > Developer Tools (webhooks)

Without an accounting integration, your finance team copies each Flex invoice and payment into the accounting system by hand. Each manual copy is a chance for a wrong amount or a missed payment. An accounting integration sends your invoices and payments from Flex to the accounting system, so the 2 systems show the same records.

Flex has native integrations with Xero and QuickBooks, and a partner integration with Sage Intacct. For any other accounting system, your developers can build a custom integration with the OfficeRnD API and webhooks.


In this article:

  • Which accounting systems connect to Flex without development work

  • What you must build that Xero and QuickBooks do for you

  • Why your bill run stays automatic with any type of integration

  • Which webhooks keep invoices, credit notes, and payments in sync

  • Not covered here: how to add a webhook endpoint in Flex. Set up webhooks to send Flex events to another system →


Before you begin

The type of integration that you can use depends on your accounting system. Check these items before you choose:

  • Confirm which accounting system your finance team uses.

  • For Sage Intacct, check the country list in the Sage Intacct overview. The partner integration is available only in some countries.

  • For Xero or QuickBooks, the person who connects the integration signs in to the accounting system and authorizes OfficeRnD. In Xero, this person needs at least Standard user permissions.

  • For a custom integration:

    • Get a developer who can work with the OfficeRnD API. The developer also needs a server that the public internet can reach, because Flex delivers webhooks only to a public address.

    • Check that your Flex plan includes the API and webhooks.

  • Agree with your accounting team which system numbers your invoices. If 2 systems number invoices, the same number can appear on 2 different invoices.

  • If local tax rules control your invoice numbers or invoice format, check those rules before you choose. Without Xero or QuickBooks, Flex numbers your invoices, and you cannot change that setting.


Find the integration type for your accounting system

Your accounting system decides the integration type. The integration type decides who builds the integration and who fixes a sync problem.

Accounting system

Integration type

Who builds and maintains it

Xero

Native

By OfficeRnD. Connect Xero →

QuickBooks

Native

Sage Intacct

Partner

By an OfficeRnD partner. The partner charges a separate fee. Learn about the Sage Intacct integration →

Any other accounting system

Custom

By your developers, with the OfficeRnD API and webhooks


Compare a native integration with a custom integration

A custom integration can connect any accounting system, but Flex gives it none of the built-in integration tools. Your developers must build and maintain each tool that Xero and QuickBooks get from Flex.

Task

Xero and QuickBooks

Custom integration

Send invoices and credit notes to the accounting system

Flex sends them automatically or when you click Sync, according to the Sync Behavior setting.

Your integration receives webhooks and reads each record through the API.

Find or create the customer

Flex matches the customer in the accounting system by email address and name, or creates a new customer.

Your integration must find or create the customer.

Map revenue accounts, tax rates, and payment accounts

You map them on the tabs of the integration in Integration Hub.

Your integration must store and apply the mappings.

Bring reconciled payments back into Flex

With Pull charges automatically selected, Flex pulls reconciled payments every 6 hours and sets the invoices to Paid.

You must configure your custom integration to record payments in Flex through the API.

Report sync errors

Flex reports each sync error on the Admin Portal.

Your integration must log each error and alert your team.

Send an invoice again after an error

Go to Billing > Invoices, select the invoice, and click Sync.

Your integration must have its own way to send the invoice again.

Number invoices in the accounting system

Clear the Generate invoice numbers in OfficeRnD checkbox.

You cannot clear the Generate invoice numbers in OfficeRnD checkbox. Flex numbers the invoices.


Choose how automatic your bill run is

Your choice of integration does not change how automatic your bill run is. Bill run automation comes from 3 settings on Settings > Billing > Invoicing, and these settings work with or without an accounting integration.

Setting

What Flex does

Automatically, for invoice generation

Flex generates the invoices on the schedule that you set.

Automatically, for invoice charging

Flex charges each invoice on its due date through your payment gateway.

Automated Invoice Sending

Flex emails each invoice when it generates the invoice.

With Xero or QuickBooks, 1 more setting applies. The Sync Behavior setting on the General tab of the integration decides when Flex sends invoices to the accounting system. Flex sends each new or updated invoice automatically, or only when you click Sync.

Flex has no setting called fully automated or semi-automated. These names describe 2 common combinations of the 3 bill run settings.

Run a fully automated bill run

In a fully automated bill run, Flex generates, sends, and charges your invoices with no action from you. To get this result, select Automatically for invoice generation, Automatically for invoice charging, and Automated Invoice Sending. With Xero or QuickBooks, also set Sync Behavior to Automatic.

Flex then does these steps on its own:

  1. On the generation date, Flex generates the invoices.

  2. Flex emails each invoice to the member or company, and sends each invoice to Xero or QuickBooks. With a custom integration, your integration receives the invoice.created webhook instead.

  3. On the due date, Flex charges each invoice through your payment gateway.

  4. Flex sends each successful payment to Xero or QuickBooks.

Nobody checks the invoices before members get them. Check your memberships and one-off fees before the generation date, because a wrong fee goes directly to the member.

After Flex charges an invoice, you cannot edit the invoice. To correct a paid invoice, open the invoice and issue a credit note.

Run a semi-automated bill run

In a semi-automated bill run, you start the bill run yourself and check the invoices before members get them. Clear Automatically for invoice generation, so that only your manual bill run generates invoices.

Important: If Automatically for invoice charging is selected, Flex still charges the invoices of a manual bill run on their due date. To charge each invoice yourself, clear Automatically for invoice charging.

To run a semi-automated bill run, do these steps:

  1. Go to Billing > Invoices and click Bill Run.

  2. Set the filters and click Preview Invoices. Check the invoices before you generate them, because the preview is your last review before members can see them.

  3. Click Generate Invoices. If Sync Behavior is set to Automatic, Flex sends the invoices to Xero or QuickBooks now.

  4. Send the invoices to your members. Automated Invoice Sending applies only to invoices from the automatic bill run, so Flex does not email these invoices.

Sync invoices with Xero or QuickBooks by hand

With Sync Behavior set to manual, Flex does not send invoices to Xero or QuickBooks on its own. You decide when each invoice goes to the accounting system. For example, you sync the invoices after your accountant checks them.

To set Sync Behavior, go to Integration Hub > All Integrations, click Configure next to Xero or QuickBooks, and open the General tab.

To sync invoices by hand, do these steps:

  1. Go to Billing > Invoices.

  2. Select the invoices that you want to send to the accounting system.

  3. Click Sync.

To sync 1 invoice, click the sync icon (a rotating arrow) next to the invoice.

With QuickBooks, the first manual sync can also complete the invoice in Flex. If Flex does not generate your invoice numbers and invoice documents, an invoice gets its number and PDF file only after its first manual sync.


Plan a custom integration

Without the Flex integration tools, a custom integration depends on decisions that your developers make before they write code. The first decision is which system numbers your invoices.

Decide who numbers your invoices

Without a Xero or QuickBooks integration, Flex numbers every invoice. On Settings > Billing > Invoicing, the Generate invoice numbers in OfficeRnD checkbox is selected, and you cannot clear it.

If your accounting system also invoices services outside Flex, the 2 systems can give the same number to 2 different invoices. To keep the 2 sequences apart, add fixed text to the Invoice number template field. For example, the template FLEX-{{number}} gives numbers such as FLEX-1043. Configure invoice numbering →

Choose how your integration finds changes

Your integration can learn about changes in Flex in 2 ways. Flex sends a webhook when a record changes. Your integration can also poll the API on a schedule and ask for the records that changed since the last poll.

Method

When to use it

Limit

Webhooks plus a scheduled poll

Use this method if your Flex plan includes webhooks.

None. The poll catches the changes that webhooks missed, so the poll can run less often. For example, every hour.

Scheduled poll only

Use this method if your Flex plan does not include webhooks.

Changes reach the accounting system only at the next poll. For example, with a poll every 10 minutes, a new invoice can take up to 10 minutes.

Webhooks only

Do not use this method.

Flex does not resend a failed webhook, so a missed request leaves the record out of the accounting system.

Poll for invoices, credit notes, overpayments, and payments. With webhooks, your integration sends fewer API requests, because it asks the API only after a record changes.

Sync invoices, credit notes, and payments with webhooks

Your integration now has a numbering rule, but it does not track when a record changes in Flex and doesn't tell your accounting software about such changes. A webhook can fix that, as it tells your server about each change when the change happens.

The invoice events cover invoices, credit notes, and overpayments. The invoice charge events cover payments. The following table shows when your integration acts on each event and what it does.

Event

When your integration acts

What your integration does

invoice.created

Always

Read the full record through the API and create the record in the accounting system.

invoice.updated

Only when data.previousAttributes contains totalAmount, dueDate, number, periodStart, periodEnd, or date

Read the full record through the API and update the record in the accounting system. Ignore all other updates.

invoice.removed

When you want deletions in Flex to delete records in the accounting system

Delete the record in the accounting system.

invoice.charge.created, invoice.charge.updated

Only when data.object.status is success

Create or update the payment. The payload contains the invoice ID, payment method, currency, and amount, so no API call is necessary.

invoice.charge.removed

When you want deletions in Flex to delete payments in the accounting system

Delete the payment in the accounting system.

invoice.allocation.created, invoice.allocation.removed

When you sync credit notes or overpayments

Apply the credit to the invoice in the accounting system, or remove the credit.

Sync a payment only when its status is success, because a pending payment can still fail. For example, an ACH or SEPA bank debit can stay pending for some days.

Catch the events that your server misses

Webhooks report each change, but only 1 time.

Important: Flex sends each webhook request 1 time and waits 5 seconds for a response. If the delivery fails, Flex does not send the request again.

Without a backup, a missed request leaves the record out of your accounting system. Build these safeguards into your integration:

  • Reply to each request before you process the record. Flex waits only 5 seconds for the reply.

  • Put each record that fails to sync on a review list. Your finance team can then check the record and send the record again from your integration.

  • In your integration, give your team 2 ways to send records to the accounting system again: all records of a bill run at once, or 1 record on request. A bulk send helps after a failed bill run sync, and a single send helps after you fix 1 error.


Best practices

  • If you connect Xero or QuickBooks, then keep Sync Behavior set to manual until you finish your tests. Automatic sync sends every test invoice to your accounting system.

  • If you test with Xero, then set the default status of synced invoices to Draft. You can delete a draft invoice in Xero, but you can only void an approved invoice.

  • If you build a custom integration, then test it with a small number of invoices before you sync a full bill run. A small test shows mapping errors before they reach every member.


FAQs

When is a custom integration the better choice?
A custom integration is the better choice when Flex has no native or partner integration for your accounting system. A custom integration also helps when you must send the same invoices to more than 1 system, because each system can have its own webhook endpoint.

Can a custom integration be as automatic as Xero or QuickBooks?
A custom integration is as automatic as the code that your developers write. Your bill run settings work the same way with any integration. Flex generates, emails, and charges invoices on its own. Your integration must send each invoice and payment to the accounting system, and must catch the webhooks that it misses.

Can I use the Sync button in Flex with a custom integration?
You cannot use the Sync button or the Flex sync error reports with a custom integration. These tools work only with Xero and QuickBooks. Your integration must have its own way to send a record again and to report errors.

Can Flex charge invoices automatically if I use a custom accounting integration?
Flex can charge invoices automatically with a custom accounting integration, because automated charging uses your payment gateway, not your accounting system. Automated charging is not available with a custom payment integration. Set up automated invoice charging →

Does Flex send a webhook again if my server misses it?
Flex does not send a webhook again after a failed delivery. To get the data from a missed webhook, read the record through the API.

Can my accounting system number invoices with a custom integration?
You cannot clear the Generate invoice numbers in OfficeRnD checkbox without a Xero or QuickBooks integration, so Flex numbers the invoices.

How do I avoid duplicate invoice numbers with a custom integration?
To avoid duplicate invoice numbers, add fixed text to the Invoice number template field on Settings > Billing > Invoicing. Your accounting system then cannot give the same number to an invoice from Flex. For example, the template FLEX-{{number}} gives numbers such as FLEX-1043.

Can I connect Sage Intacct to Flex?
You can connect Sage Intacct to Flex through a partner integration. The partner builds and supports the integration and charges a separate fee. Contact your Customer Success Manager for an introduction to the partner.

Which integration is faster to set up?
A native integration is faster to set up, because it needs no development. You connect Xero or QuickBooks in Integration Hub and map your accounts and tax rates. A custom integration needs development and testing before the first sync.

Did this answer your question?