Marketing Integrations

elee
Participant

Excessive number of Salesforce API calls being used up in email sends

SOLVE

When we send email blasts, we typically set up a workflow to send the email and then set a Salesforce campaign right after. In a recent send that went out to around 12k contacts (with 14k enrolled in the workflow), more than 300k API calls were used up. Is this common?

 

I've been told that a sync with Salesforce uses around 3 API calls, which means for a send of 12-14k, less than 100k API calls should be used. Outside of these email blasts, HubSpot usually doesn't take up more than 10k calls daily for us.

 

Would love any suggestions to bring our API call usage down and insight into what the API call situation is for others.

1 Accepted solution
bradmin
Solution
Key Advisor

Excessive number of Salesforce API calls being used up in email sends

SOLVE

Hi, @elee. You're correct that, when syncing email sends to Salesforce, wide-range sends have the potential to consume lots of calls. I strongly urge against syncing these, for just this reason.

 

First, about the API calls themselves: there's no realistic way to calculate these, because it's a function of all of the stuff that's happening, and how quickly. In a vacuum, syncing a singular record could take anywhere from 1 to several API calls, and it's a function of how many Salesforce objects the connector talks to, independent of the data. HubSpot talking to a lead and just a lead would be 1 call; HubSpot creating a task against a lead would take a call to the lead, and a call to tasks. 

 

That's what would happen if every record were to be synced, one-at-a-time, ad infinitum. That's not an efficient process, and the connector improves on that by trying to batch together contacts as efficiently as possible. That way, instead of spending 1 or 2 calls updating a singular record, the connector's still spending that same 1 or 2 calls across a batch of X records. 

 

Unfortunately, that batch size number is variable, and it's a function of how many contacts are updated around the exact same time. I can't remember what the maximum batch size is, but I want to say it can support at least a couple of dozen in a batch. 

 

When contacts are batched efficiently, you can update the same universe of records with fewer calls than one-at-a-time syncs. But there's still going to be an API hit.

 

Instead of syncing sends - which are high-volume and low-value - you may want to consider syncing only the opens and clicks from the sends. This way, you get the most actionable parts of the send, without the API hit (or Salesforce data storage hit, which is just as important as the API call usage here).

 

To make syncing email sends as SF tasks work effectively, you really need to design to both minimize the API calls (i.e., sending to big lists frequently, minimizing singular syncs), as well as come up with a scheme for routinely archiving and deleting old tasks out of Salesforce. In practice, this kind of maintenance and upkeep is not worth the value of knowing that sends have been sent from HubSpot, in a list of tasks.


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.

View solution in original post

1 Reply 1
bradmin
Solution
Key Advisor

Excessive number of Salesforce API calls being used up in email sends

SOLVE

Hi, @elee. You're correct that, when syncing email sends to Salesforce, wide-range sends have the potential to consume lots of calls. I strongly urge against syncing these, for just this reason.

 

First, about the API calls themselves: there's no realistic way to calculate these, because it's a function of all of the stuff that's happening, and how quickly. In a vacuum, syncing a singular record could take anywhere from 1 to several API calls, and it's a function of how many Salesforce objects the connector talks to, independent of the data. HubSpot talking to a lead and just a lead would be 1 call; HubSpot creating a task against a lead would take a call to the lead, and a call to tasks. 

 

That's what would happen if every record were to be synced, one-at-a-time, ad infinitum. That's not an efficient process, and the connector improves on that by trying to batch together contacts as efficiently as possible. That way, instead of spending 1 or 2 calls updating a singular record, the connector's still spending that same 1 or 2 calls across a batch of X records. 

 

Unfortunately, that batch size number is variable, and it's a function of how many contacts are updated around the exact same time. I can't remember what the maximum batch size is, but I want to say it can support at least a couple of dozen in a batch. 

 

When contacts are batched efficiently, you can update the same universe of records with fewer calls than one-at-a-time syncs. But there's still going to be an API hit.

 

Instead of syncing sends - which are high-volume and low-value - you may want to consider syncing only the opens and clicks from the sends. This way, you get the most actionable parts of the send, without the API hit (or Salesforce data storage hit, which is just as important as the API call usage here).

 

To make syncing email sends as SF tasks work effectively, you really need to design to both minimize the API calls (i.e., sending to big lists frequently, minimizing singular syncs), as well as come up with a scheme for routinely archiving and deleting old tasks out of Salesforce. In practice, this kind of maintenance and upkeep is not worth the value of knowing that sends have been sent from HubSpot, in a list of tasks.


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.