Published 17 August 2020

NPSP & Too Many SOQL Queries: 101

decor decor

This is a technical article. You will need an intermediate technical knowledge of Salesforce. If you require assistance, we recommend contacting us or forwarding this article to your Salesforce Partner.


When working with Salesforce Nonprofit Success Pack (NPSP) and Salesforce in general, you must work within a set of limits for each transaction called Governor Limits. One of these limits related to SOQL is that a transaction can only perform 100 queries in an execution. In an NPSP context, these governor limits are typically consumed by triggers processing the creation or updating of records like contacts, campaigns, opportunities, accounts, etc.


In our experience, exceeding governor limits can typically occur where:

  • there are a large number of Process Builder Jobs or Lightning Flows which have been set to trigger off events on key records like opportunities, or
  • NPSP has been installed before 2018 and there are a large number of legacy NPSP trigger handlers configured which need to be decommissioned


Process Builder Jobs or Lightning Flows

There can be a significant performance penalty associated with a large number of Process Builder Jobs and Lightning Flows. To solve this issue, consider combining and consolidating these into a smaller set where possible. If you find you have a large number which cannot be consolidated, then we suggest you rework these into Apex triggers which, when well constructed, are much kinder to governor limits.

Trigger Handlers

Trigger handlers are an abstracted version of Apex Triggers and are managed using an NPSP custom object called npsp__Trigger_Handler__c. If you have been running NPSP for a while, you might find you have a large number of legacy trigger handlers.

As of NPSP version 3.181 with Affiliations, Relationships, Recurring Donations and Households installed, you should have 55 NPSP Triggers handler configured out of the box. In older installs, we have seen over 161 triggers configured. Culling no longer required triggers handler entries will typically provide SOQL limit relief.

If you haven’t added custom NPSP trigger handler entries then you should be able to execute a full delete on the object. Interestingly, it does appear to have a handler that will recreate the minimum entries (which is inline with a new NPSP installation) when the delete is executed.

To do this, take a backup of the data held within the npsp__Trigger_Handler__c object before completing the delete. Then complete by:

  • Open the Developer Console and execute delete [SELECT Id FROM npsp__Trigger_Handler__c];
  • Execute the following SOQL statement in the Query Editor to verify that the NPSP trigger handler entries have been recreated: SELECT COUNT(Id) FROM npsp__Trigger_Handler__c

Following this, open MoveData and requeue any failed notifications to assess if the SOQL 101 issues have been addressed.

Continue reading

View all posts

What people are saying about MoveData

Keeping Salesforce up to date used to be a real challenge. With MoveData everything is automated and it’s been one of the best technical decisions we’ve made!

Henry Wong Senior Salesforce Analyst Developer, UNICEF Australia

War Child UK saves 67.5 hours per month by using MoveData

Yvonne Small Database Coordinator, War Child UK

I can’t even tell you how many hours this has saved us. To have all our data integrated into Salesforce is extraordinary!

Lauren Stewart Senior Manager Systems and Data, The Alfred Foundation

Having implemented MoveData everything is so much more efficient – all that wasted time is gone!

Kate Griffiths Income Generation & Engagement Manager and Data Protection Officer, The Fire Fighter’s Charity

MoveData has made our life so much easier!

Maria Papaly CRM Development Manager, Oxfam Australia

MoveData delivers thousands of data points into Salesforce every day - this allows us to successfully run World's Greatest Shave and our other major campaigns

Glen Shields Head of Data & Analytics, Leukaemia Foundation

MoveData has helped us be much more effective in our fundraising - it cut out so much of the admin that swamped us last year!

Larissa Wiese Marketing and Communications Manager Breast Cancer Care WA

The MoveData team are amazing! I would recommend their integrations to any non-profit that is looking to better manage and automate their incoming data flows.

Conor Nolan Digital Executive, Cure Cancer Australia

The efficiency, accuracy and time savings have been a game changer for our foundation. I cannot recommend MoveData highly enough!

Carolyn Campbell Operations, Shake It Up Australia Foundation

MoveData are excellent to work with - I would recommend their services to anyone seeking to integrate fundraising and donation data into Salesforce

Emma Karst Digital Marketing Specialist, Caritas Australia

MoveData integrations are flexible, accurate and easy to use - and have already saved us loads of admin time. Thank you so much!

Jo Price IT Integration and Transformation Manager, Sydney Children's Hospital Foundation

A really positive experience - the MoveData team are knowledgeable, responsive and great at problem solving

Katrina Locandro Marketing & Communications Manager, Liptember Foundation

Proudly used by


Powerful Salesforce Integration
for Smart Nonprofits