-1

I am trying to understand how to use the SF Bulk API for coupon assignment. I am referencing the documentation https://tidbitsforu.com/send-sfmc-sfdc-using-ssjs-bulkapi2/ and want to understand the following:

  • How does this impact our contractual daily API limit?
  • What is the max API call per month?
  • What is the max limit of records for each batch API call? Is it 10k?

The specific use case is assigning coupons to customers in SFMC and updating those records in SFDC via the SF Bulk API. Has anyone had success in using this method for such a use case?

1 Answer 1

1

What is the max limit of records for each batch API call? Is it 10k?

1 SFSC Bulk API Batch has a max size of 10,000 records.

https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_bulkapi.htm

How does this impact our contractual daily API limit?

A SFSC Bulk API run will consume:

  • 1 API call for auth
  • 1 API call to Open Job
  • 1 API call per Batch
  • 1 API call to Close Job

100,000 records = 1+1+(100,000/10,000)+1 = 13 API Calls.

I don't know your limit, but let's put it like this: 13 API calls for 100k, and 1 more per additional 10k should be pretty negligible.

Obviously consult your contract, don't take my word for it, but your limit will not be 2-3 digit numbers.

What is the max API call per month?

The technical limit is calculated daily, not monthly. Take the month of your choice and multiply the daily limit:

15,000 batches x 10,000 records per batch maximum

Source: https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_bulkapi.htm

Has anyone had success in using this method for such a use case?

Yes.

"architect" answer:

Don't do it in this scenario, unless you know something I don't know.

The Coupon Codes use case sounds like the sort of thing where I would question the business value to store in Sales Cloud; Especially since one person can have many Coupon Codes, so it makes no sense to store in one field per person, but you'd be uploading entire Coupon tables.

1 "coupon" Record in SF = 2kb, and storage in SF is NOT cheap.

If you just need to SEE the coupon codes in Sales Cloud, build an API to retrieve data from SFMC tables using a Lightning Web Component or similar and save yourself this entire exercise of copying data over.

Import data only if you need to use reports / dashboards / search etc. on the actual string values of what you are "importing" (which frankly, sounds completely absurd for coupons, but I dont know your scenario).

"Developer" Answer:

This can be done.

It's a bit "involved" once you need to do more than one batch and numbers start to get taxing on the amount of lookups in one script. The solution you quote glosses over that bit a little.

If you get large numbers, you need to use sql.

And when you need to use sql, you need to create a loop out of several automations.

Described it here for Bulk API v1 (your link uses v2, but the SFMC workflow would be similar);

Account Activity or Object Activity in Journey Builder has limits to update like Data Loader?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .