API Fails to Find Deal and Contact

For context, this is our use case of the Hubspot API.

1. Leads fill in info on Typeform, then we put them into Hubspot as a contact, and create a deal record.
2. When the lead books a call on calendly, we use their email from calendly to look up their contact, and then update the deal record to move the deal from new lead to demo booked in our sales pipeline.

This is connected via Zapier.
However, more than 60% of the time, it fails completely, meaning our sales team doesn’t know who booked a call, which rep is assigned and it causes a massive headache because sales calls get missed!

Our issue has persisted after 4 support ticket requests and Hubspot has indicated that the API is unreliable. Such poor support makes us question our usage of the platform, even after paying thousands a month.
We need development support asap.
One reason we can’t find the contacts could be that leads use one email when the submit the lead form, and then they use a different email when booking the meeting. In this case, what info can we use to better look-up the deals


?

Hi @swillzla,

Thanks for reaching out to the Community!

I would like to invite some members of our community who may offer valuable insights.— hey @evaldas , @Teun, @nickdeckerdevs1 - Could you share your advice with @swillzla ?

Thanks for taking a look!

Diana

As you mentioned, it could be that the email they use in Calendly is a secondary email for them (eg, work email vs personal email which might result in two different contacts) or even for you (Hubspot assigned it as a secondary email instead of a primary email). Hubspot has a field called “hs_additional_emails” which is a comma delimited list of all the emails that Hubspot has associated with the contact. You may need to adjust your Contact Search to include this field.

I’m not 100% familar with Zapier’s integration with Hubspot but one of the first things you should start looking at is the API logs in Hubspot. If there is an error in the request, you should be able see the payload that is being sent. Once you have the payload, it’s much easier to figure out what’s going on.

According to these posts:

The “Second Search Property Name” acts as an AND condition instead of an OR condition. So perhaps the Contact search is failing if the First Name is not exactly the same as the contact record. If you have the email, do you need to search for First Name?

You may need to do a branch in Zapier to search for email address field and then if that is empty, hs_additional_emails to get the contact id.

As for the multiple Deal IDs, in Step 8, do you have multiple deals associated with the contact? Is that what is being returned in Step 8 and then used in Step 11.

Hi, thanks for the input.

If they use a different email for scheudling there isn’t much I can do on that front.
How can we still make sure we find the contact with this information?
There is only one deal created, which is why this makes no sense to me.

You need to start investigating the Zapier requests/payload and see what it returns and how it is processed. Everything you can do through Zapier you should be able to replicate manually (eg, through Postman).

Let’s say you start with why a contact isn’t being found.

1. Check what data is available to Zapier (eg, email address, first name and last name sent by Calendly).

2. Go to your Hubspot portal and search for that email address.

Is it found? If it is, is it the primary email address or secondary email address?

If it’s found as a primary but Zapier/Hubspot is returning nothing, investigate the payload. In your screenshot, you’re using the First Name as an additional property. Does the Calendly data for first name match up with the contact First Name? Do you need this as part of your Contact search? Seems unnecessary as you have the email address which should be unique.

So if Hubspot has johndoe@hubspot.com as the primary email with a first name of John but Calendly is sending johndoe@hubspot.com with a first name of Jim, then your contact search will fail because of the AND condition (email AND first name).

If it’s found as a additional/secondary email address, then it looks like you need to add branching to your Zapier to first search for primary email address and then if nothing is returned, search for additional email address.

For the Deal returning multiple IDs, again, you need to walk through your Zap. You got your Contact ID, what is your Find Deal Association request? If you go to that Contact in Hubspot, do you see 1 Deal Associated or multiple? If you view the Deals in Hubspot, is there some association from Deal → Contact? Or Maybe Deal → Company → Contact? What payload is Zapier sending to Hubspot?

I’ve only had two main issues with Hubspot API: rolling 10 limit (how many requests you can make in a short period of time) and caching (might take a few minutes for the API to see new records).

Thanks for the context.

I spent some time diving in with our team. We found two main errors.
1. If a lead provides one email on the initial lead-form, and then uses a different email later on we can’t find the contact, and therefore the contact and deal can not be found.
2. When leads come through multiple times from ads, multiple deal cards are created for them. When they decide to book an appointment, there are multiple deals that are associated with that contact. Therefore, the zap breaks as we don’t know which deal to move to “demo-booked” in the pipeline.
The question is how to fix this.
1. Don’t have a good way to fix this. If leads do this, it breaks.
2. How can we make sure there are no duplicate deals? Either way, with hundreds of deals a month, the team misses these duplicates very often. Does Hubspot have an auto-merging function? This would help to solve the multiple deal issue.

For 1, this wouldn’t solve it 100% but depending on HOW they access the Calendly link, maybe you can have the email address prefilled?

Eg, if you’re doing a marketing email, you can prefill the email field with the email it’s being sent to.

For #2, this would be a business process but some potential solutions. Since I don’t know how the deals are created (manually, automation, etc), I’ll just list some potential suggestions.

A. If you have Sales Hub Professional then when it comes in from Typeform and a deal is created, you can potentially use a specific Association label and limit it to 1 Contact to 1 Deal. This would mean that the person/automation creating the deal should stop/fail when it sees that it can’t apply the association label if one already exists.

I don’t know if Zapier let’s you search by an Association Label but if it does, that would be perfect.

B1. If you have workflows, you can potentially have it just check if a Deal is associated with the Contact before creating a new one.

B2. Have some process that deassociates Deals if a contact has more than one? This could be a branch off your current zap before it updates the Deal.

C. Just reprocess the Deal IDs data you received and trim it down to just 1 ID before going to update the Deal. It can ignore the other ones.