⚙ Operations Hub

DZgliński
Participant

Merge certain deals automatically?

Hi everyone,

 

I’m trying to merge certain deals automatically. Through regular workflows this is not possible but maybe through the custom code module that the operations hub offers. Maybe some more context:
  1. For easier tracking, I’m creating a deal for all outbound leads that our business dev team is reaching out to. The pipeline has different stages such as:
    - In progress
    - Opened
    - Replied
    - Meeting scheduled (closed won)
    - Not qualified (closed lost)

  2. The outreach is done via a third-party tool (lemlist).
  3. As soon as the lead replies i can see that in lemlist and the status there changes.
  4. It then creates a new deal (the native integration options of lemlist > hubspot are very limited) in hubspot
  5. Obviously I have 2 deals now in my pipeline. One is the original one I’ve created based on the upload and the other one is the one coming from lemlist (step 4). Ideally, i would merge the 2 deals
I’m aware that the main challenge would be to identify the right deals as the unique ID in hubspot for a deal is the deal ID as far as I know. So how would we map the 2 deals together? I thought that we maybe could use the deal name as an identifier and establish a token based naming convention (company url f.e.) and use a “merge IF” function (if deal name is “...“, merge).

Best,
Dominik
3 Replies 3
JRyan-Leela
Participant

Merge certain deals automatically?

I'm having the same problem. Lemlist through its native connection to HubSpot is creating duplicate deals every time a contact clicks on a link.

Can I create a workflow in HubSpot that merges deals where the stage, pipeline and name are the same?

tfoston01
Participant | Elite Partner
Participant | Elite Partner

Merge certain deals automatically?

The best long-term solution would be to...

1) Not rely on the native connector.

 

2) When you create your deal, collect the resulting deal_id and pass this as a custom property on the lead object that's sent to Lemlist. 

 

3) Create a new HubSpot lambda. This is a function/script that can accept data passed to it and process things in HubSpot. When you create it, HubSpot will give you a URL for where this lives. When this lambda accepts data, from Lemlist ( see step 4), you'll look at the event, and deal_id that was passed in as part the lead information. Now that you have the deal_id, you'll update the deal by changing the deal stage.

 

4) In lemlist, create a webhook (https://developer.lemlist.com/#list-all-hooks). When a Lemlist event occurs, it will send the event and associated data to the webhook URL specified. Use the URL of the lambda you made above as this webhook URL

LMeert
Guide | Platinum Partner
Guide | Platinum Partner

Merge certain deals automatically?

Hi Dominik,

 

How do you send your contacts to lemlist ?
Lemlist can leverage custom variables for contacts, maybe that's how you want to pass a deal_id to lemlist, so you can get it back later on once the other deal is created by Lemlist on Hubspot.

 

Also, I found this option : 

LMeert_0-1649166266601.png

I'm no Lemlist expert but this looks like an opportunity to create a deal pipeline dedicated for all the deals that come back from lemlist (and will have to be merged to an existing deal).

 

I think your idea of using a naming convention to merge both deals together should work if there's no human input inbetween, and if you have a security based on the deal stage that would help you secure your workflow even more.

You'd make a search on the deals filtering on a specific pipeline as well as a specific name (using the search endpoint and filtergroups), and then merge both together.

Also, I don't have access to this feature but you can apparently make an API call with lemlist as part of a sequence. This could make it easier to sync data back to Hubspot if you make a custom call rather than relying on the native integration with Hubspot.

Hope this helps,

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes