Case study: Kommo and FreshBooks integration — automatic invoices from the sales pipeline

A manager closes a deal in Kommo — and then manually opens FreshBooks, copies the client data, amount, service description, and creates an invoice. Each deal takes 10–15 minutes, and as the team grows, errors become the norm. A custom Kommo and FreshBooks integration eliminates this gap: an invoice is created automatically at the moment the deal moves to the required pipeline stage.

What the native integration can do — and where it falls short

There is no official FreshBooks connector in the Kommo marketplace. Solutions exist via Zapier or Make — they allow creating a basic trigger “new deal → new client in FreshBooks”. But this approach has hard limitations:

  • No mapping of custom deal fields to invoice line items
  • Cannot pass multiple line items from a single deal
  • No reverse synchronization: payment status from FreshBooks does not return to Kommo
  • No conditional logic: invoice is created at any stage, not at a specific one
  • Duplicate clients in FreshBooks on repeat deals

These are precisely the limitations that the custom integration solves.


What the Exceltic.dev custom integration solves

  • Pipeline stage trigger — an invoice is created only when moving to a specific stage, for example “Contract Signed” or “Issue Invoice”
  • Custom field mapping — data from Kommo deal fields (amount, description, currency, discount) is passed to the corresponding FreshBooks Invoice fields
  • Multiple line items — if the deal contains multiple products or services, each item is passed as a separate invoice line
  • Client deduplication — before creating an invoice, the system checks whether the client exists in FreshBooks by email and uses the existing profile instead of creating a duplicate
  • Reverse synchronization — when the invoice status changes in FreshBooks (Paid, Overdue, Sent), the corresponding field in the Kommo deal card is updated automatically
  • Link in the card — after the invoice is created, a direct link to it appears in the Kommo deal card

How the integration works — technical process

Connection architecture

The integration is built on the Kommo Webhooks → Exceltic middleware → FreshBooks REST API stack. Kommo sends a webhook event when a deal stage changes, the middleware processes the payload and forms a request to the FreshBooks API v1 via OAuth 2.0. Reverse synchronization is implemented via FreshBooks Webhooks, which listen for invoice.update events.

This approach was chosen deliberately: polling (periodic requests) would create API load and delays of up to several minutes. The webhook architecture ensures synchronization within 3–5 seconds.

Step-by-step workflow

  1. Manager moves the deal to the “Issue Invoice” stage in Kommo
  2. Kommo sends a webhook with payload: deal ID, contact ID, amount, custom fields
  3. Exceltic middleware receives the webhook and requests the full deal data via Kommo API (GET /api/v4/leads/{id})
  4. System checks whether the client exists in FreshBooks by email (GET /api/v1/clients?email=)
  5. If client found — existing client_id is used; if not — a new one is created (POST /api/v1/clients)
  6. Invoice is formed with line items from the deal (POST /api/v1/invoices)
  7. FreshBooks returns invoice_id and a public link
  8. Middleware writes the invoice link to a custom field of the Kommo deal card (PATCH /api/v4/leads/{id})
  9. Manager sees the invoice link directly in Kommo and sends it to the client in one click

What happens on error

If the FreshBooks API is unavailable or returns an error, the middleware saves the event to a queue and retries after 1, 5, and 30 minutes (exponential backoff). After three failed attempts, a task is created in Kommo for the responsible manager with an error description. All events are logged — this allows retroactive data recovery.


Real-world case

Digital agency, 8 sales managers, ~60 deals per month.

Before the integration, each manager spent an average of 12 minutes creating an invoice manually. With 60 deals per month — that is 12 hours of lost team time per month. Additionally, over 200 duplicate clients had accumulated in FreshBooks due to manual data entry.

After the integration launched, the invoice is created automatically within 5 seconds of the stage change. Payment status synchronizes back to Kommo, which enabled setting up automatic reminders to clients 3 days after sending an unpaid invoice. Duplicates in FreshBooks in the first two months: zero.

Result: 12 hours per month returned to the team, the invoicing cycle shortened from 1–2 days to a few seconds.


Which businesses benefit most

The integration is most in demand in service businesses with regular deals: digital agencies, consulting firms, legal and accounting firms, freelance studios. Anywhere a manager closes a deal and immediately needs to issue an invoice.

Also relevant for B2B companies with repeat clients — deduplication and invoice history by client become especially valuable when working with long-term contracts.

Less relevant for e-commerce and retail sales where invoices are generated automatically by the payment system.


Frequently asked questions

Can the Kommo and FreshBooks integration be set up without a developer?
A basic trigger via Zapier can be set up independently in 30 minutes, but it covers only the simplest scenario. As soon as custom fields, multiple line items, client deduplication, or reverse status synchronization are needed — a developer is required. These scenarios require direct work with the FreshBooks API and Kommo Webhooks.

What does a custom Kommo and FreshBooks integration cost?
The cost depends on the complexity of the business logic: number of mappings, presence of reverse synchronization, custom conditions, and logging requirements. A typical integration with a basic feature set is developed in 2–5 business days. Exceltic.dev calculates the exact cost after a brief.

What happens to data if FreshBooks is temporarily unavailable?
The middleware uses a retry mechanism with an event queue. No event is lost — all are processed after service availability is restored. Maximum delay during a failure — 30 minutes.

Can the integration logic be changed after launch?
Yes. For example, add a new trigger stage, change field mapping, or connect additional object types. The middleware is built in a modular way, so changes are made without reworking the entire integration.

Does the integration support multi-currency?
FreshBooks supports multi-currency invoices via the currency_code field. If the Kommo deal stores the deal currency (custom field), the integration passes it to the invoice automatically. This is especially important for companies working with clients in different countries.

If you want to eliminate manual data entry between Kommo and FreshBooks — describe your task to the Exceltic.dev team. We will review the scenario and propose an architecture suited to your pipeline.

More articles

All →