I am loading Campaign Members via the Data Import Wizard. Specifically, I am adding new leads and updating existing leads. The leads get created but Campaign Membership is not established because I am receiving a TOO MANY SOQL queries error because the Campaign Member object is being called multiple times from process builders we have created. There are 2 process builders that reference the Campaign Member object and they are both being called when I import leads via the Data Import Wizard. Also, from my testing I am able to successfully load 9 Leads as Campaign Members but when I get to 10 I receive an error on all records. I am trying to understand what in the Process Builder would be calling the query.

I have attached the Process Builder for review.

Does anyone know what is causing the Process Builder to call the SOQL Queries, as we are hitting the limit of 100 on a file of only 45 leads?

enter image description hereenter image description here enter image description here enter image description here enter image description here

  • 3
    Process Builder itself shouldn't be causing the problem unless you have a really complicated flow attached to it. We're going to need to have more information in order to assist you. Do you have any triggers? Any other Process Builder processes? Workflow Rules with Field Updates? The more information we have, the better we can assist you. Please feel free to edit your question to include any additional details.
    – sfdcfox
    Commented Sep 14, 2018 at 19:48
  • Yes, we do have two triggers, but even when we turned the Apex Triggers off we are still receiving the Too many SOQL queries error.
    – Christian
    Commented Sep 17, 2018 at 12:30

1 Answer 1


It's hard to say without seeing the PB, but my first suggestion is to reduce the batch size in Data Loader. The load will be slow but at least it won't error out.

It's a bit unpredictable when PBs will or won't bulkify well. I have found that certain types of filter formulas on actions or updates end up invoking separate SOQL queries per record instead of doing them all together in bulk. Sometimes refactoring the logic a bit fixes it.

I also find it can help to create a "guard condition" early on in the Process, so that any records which should not enter the process at all are stopped right at the beginning.

You must log in to answer this question.

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