Blog

How to Merge Duplicate Deals in HubSpot Without Duplicating Line Items

Written by Jonas | December 30, 2025

Cleaning up duplicate deals in HubSpot is an important step toward accurate reporting and reliable revenue data. But if your deals include line items, there’s an important behavior to be aware of:

👉 When HubSpot merges deals, line items from both deals are retained.

That default behavior can cause real problems, especially when duplicate deals represent the same opportunity with identical products attached.

 

The challenge: merged deals keep all line items

By design, HubSpot treats line items as valuable historical data. When two deals are merged:

  • All line items from the primary deal are kept

  • All line items from the secondary deal are also kept

  • Identical products are not deduplicated

For teams managing large volumes of duplicate deals, this can result in:

  • Inflated deal values

  • Duplicate products on a single deal

  • Incorrect reporting

This is a common challenge for organizations that want to automate deal deduplication while keeping clean, trustworthy line item data.

 

What Koalify does (and doesn’t do) during deal merges

Koalify gives you granular control over how duplicate deals are identified and merged, including:

However, today:

  • HubSpot does not support selectively retaining line items during a merge

  • Koalify cannot modify line items as part of the merge action itself

That means a different approach is needed if your goal is to keep the line items from the primary deal only.

 

The solution: remove line items from secondary deals before merging

The safest and most reliable approach is to delete line items from non-primary deals before the merge happens.

Here’s how the process works.

 

Step 1: Use Koalify to identify primary and secondary deals

First, configure Koalify to:

  • Detect duplicate deals using your preferred criteria (e.g. deal name, amount, close date, company)

  • Mark one deal as the primary

  • Mark the others as non-primary (secondary)

Koalify automatically exposes these flags as properties, which you can then use directly in HubSpot workflows.

 

Step 2: Remove line items from secondary deals

Within the same workflow, you can first remove line items from secondary deals and then merge them into the primary deal using Koalify’s workflow action.

Before merging, you’ll need to clear line items from the secondary deals.

At the moment:

  • HubSpot does not offer a native workflow action to delete line items

  • This step requires either:

    • A custom-coded workflow action

    • Or a third-party line item management tool

Common tools used for this purpose include:

The workflow logic is straightforward:

  • Enroll deals where Koalify: Is Primary Deal = false

  • Remove all associated line items from those deals

 

Step 3: Merge the deals safely

Once the secondary deals no longer contain line items:

  • Trigger the Koalify merge action in the same workflow

  • Merge secondary deals into the primary deal

Because the secondary deals are now “empty,” the merged deal:

  • Retains only the primary deal’s line items

  • Avoids duplicate products

  • Preserves clean revenue data

All without manual intervention.

 

 

Why this approach works so well

This setup combines the strengths of both platforms:

  • Koalify handles accurate duplicate detection and controlled merging

  • HubSpot workflows orchestrate the process safely

  • Line item tools or scripts handle a limitation in native deal merges

The result:

  • Clean deal records

  • Accurate line items

  • Scalable automation, even for tens of thousands of duplicate deals

Most importantly, this approach lets you automate deal deduplication without compromising revenue integrity.

 

Final takeaway

HubSpot’s merge behavior is intentionally conservative and that’s a good thing. But when duplicate deals contain identical line items, a simple merge isn’t enough.

By removing line items from secondary deals before merging and letting Koalify handle the deduplication logic you can safely clean up your pipeline while keeping your deal data accurate and reliable.

If you’re managing deal duplicates at scale and want full control over how merges happen, Koalify gives you the flexibility to build a process that fits your data, not the other way around.