CRM connection: linking CRM with invoicing and accounting
A CRM connection links your CRM, such as HubSpot or Pipedrive, with your invoicing software or ERP. A won deal automatically produces a quote or an invoice, customers are created only once, and the payment status flows back to the CRM. We program this connection directly through the APIs of both systems.
The problem: sales works in the CRM, the invoice is created elsewhere
The CRM holds everything sales knows: contacts, company, line items, prices, agreed payment terms. Once the deal is won, the second entry begins in the office. Create the customer, copy the line items, create the invoice. Discounts get lost, addresses are taken over wrongly, and customers end up existing twice with slightly different spellings.
Conversely, sales cannot see whether a customer has paid. Anyone who wants to ask before the next quote has to call accounting. Reminders and follow-up orders run past each other.
How we connect CRM and invoicing software
The trigger is usually a change in the CRM, for example a deal moving to the "won" stage. CRM systems report such changes by webhook. Pipedrive, for instance, sends a message to a stored address when a deal changes. HubSpot offers webhooks for apps that are set up in your own portal.
The integration then checks whether the customer already exists in the invoicing software and creates it if not. After that it creates the quote or invoice with the line items from the deal. Whether the invoice is finalized directly or created as a draft for review is up to you. Many businesses choose the draft at the start.
Lexware Office, formerly lexoffice, offers a public API for this, which lets you create contacts, quotes and invoices. According to the vendor, it is available from the Lexware Office XL version. We check such requirements in the integration check so that there are no surprises later.
Webhooks can fail. According to its own documentation, Pipedrive retries a failed delivery three more times and deletes a webhook that could not be delivered successfully for three days. That is why our integration also reconciles regularly and monitors whether the webhooks are still active. Every transaction is logged, and errors trigger an alert.
- Organization and contact are created or matched when deal is won
- Deal with line items becomes quote or invoice on stage change
- Invoice number and payment status go back to the CRM daily
- Products and prices are reconciled on change
Typical data objects
| Object | Direction | What matters |
|---|---|---|
| Companies and contacts | CRM → Invoice | avoid duplicates, billing address separate from contact person |
| Deals and line items | CRM → Invoice | discounts, tax rates, recurring services |
| Invoices | Invoice → CRM | invoice number and link on the deal |
| Payment status | Invoice → CRM | open, paid, overdue |
When data flows in both directions, it is called a bidirectional integration. Then it must be clear for every field which system leads.
Recurring services and special cases
Not every deal ends with a single invoice. Maintenance contracts, licenses or consulting packages are billed monthly or annually. The integration can turn a deal into a billing schedule and create the follow-up invoices at the right date. When the contract ends in the CRM, billing ends too. Down payments and final invoices can also be modeled if your invoicing software supports it.
A clear approach to changes matters. If a deal is changed again after the invoice, the integration does not create a second invoice but reports the discrepancy. Whether that leads to a correction or credit note is decided by a person. This keeps accounting clean even when sales renegotiates.
When ready-made solutions are enough
For some combinations there are apps on the CRM vendors' marketplaces or partner solutions from the invoicing programs. Automation services such as Zapier have ready-made building blocks for HubSpot and Pipedrive. If you have few deals per month and a simple invoice without special cases is enough, that is often the faster solution. We describe the trade-off under Zapier alternative.
A custom connection is worthwhile when invoices have several line items with different tax rates, recurring services are billed, the payment status should reliably come back to the CRM or DATEV is involved alongside the invoicing software. In that case the DATEV integration helps too.
Matching connections
For common combinations we have dedicated pages: HubSpot and Lexware Office and Pipedrive and Lexware Office. What Lexware Office offers technically is under Lexware Office.
Process
In the free check (30 minutes) we walk through a real deal with you, from stage change to finished invoice. Within 3 working days you receive a fixed-price quote. Implementation usually takes 2 to 4 weeks. Testing is done with test customers before real invoices are created. More under process and pricing.
Frequently asked questions
Can a won deal automatically produce an invoice?
Yes. The integration reacts to the stage change in the CRM and creates the invoice with the line items from the deal. If you want, first as a draft that someone reviews and approves.
Does the payment status flow back to the CRM?
Yes, if the invoicing software provides the status via its API. The integration queries it regularly and writes it into a field on the deal or the company.
Which plans do I need for the API?
That depends on the vendor. For Lexware Office, the public API is available from the XL version according to the vendor. On the CRM side, plan and permissions can also play a role. We check this for your systems in the check.
What happens with customers that already exist in both systems?
Before the start, we match existing customers once, for example via customer number, email address or VAT ID. After that the integration works with this matching.
Sources
- Lexware: Public API von Lexware Office, retrieved on 20 Oct 2026
- Lexware Partner: Pipedrive von PD Experts, retrieved on 20 Oct 2026
- HubSpot Marketplace: sevdesk-Integration, retrieved on 20 Oct 2026
- Pipedrive Developers: Guide for Webhooks, retrieved on 20 Oct 2026
- Zapier: HubSpot integrations and Pipedrive integrations, retrieved on 20 Oct 2026
- HubSpot Developers: Webhooks API, retrieved on 20 Oct 2026
Related
HubSpot → Lexware Office
Won HubSpot deals become invoices in Lexware Office (formerly lexoffice): what apps can do, where the return path is missing and what custom code looks like.
Pipedrive → Lexware Office
Quote, order confirmation and invoice from Pipedrive deals in Lexware Office (formerly lexoffice): what the partner app does and when custom code helps.
Lexware Office (lexoffice)
lexoffice is now Lexware Office: Public API, webhooks, e-invoicing and limits at a glance.
Bidirectional integration
A bidirectional integration exchanges data in both directions between two systems. Explanation, example, conflict rules and how it differs from other terms.
Have an integration built
Direct connection between two systems, fixed price after a free check, the code is yours.
