MoveData now supports Salesforce Nonprofit Cloud!

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.

Overview

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.

Scenarios

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

Solution

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

Trusted by hundreds of Nonprofits who use Salesforce

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

We save over 50 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

After implementing MoveData everything is so much more efficient. All that wasted time is gone!

Kate Griffiths Income Generation & Engagement Manager, The Fire Fighter’s Charity

MoveData delivers thousands of data points into Salesforce every day. This allows us to successfully run the World's Greatest Shave and all our other major fundraising campaigns.

Glen Shields Head of Data & Analytics, Leukaemia Foundation

MoveData are amazing! I would recommend their integrations to anyone looking to better manage their incoming data flows.

Conor Nolan Digital Executive, Cure Cancer Australia

MoveData are excellent! I would recommend them 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

We're really happy with the results. MoveData consistently met deadlines, delivered quality work, and ultimately built exactly what we needed. Would definitely recommend!

Marian van Weverwijk ICT Coördinator, Wilde Ganzen

MoveData has completely transformed our peer-to-peer fundraising experience in Salesforce. I highly recommend!

Maria Cicero Database Manager, Destiny Rescue

Great solution. MoveData has provided a seamless integration for us. Highly recommend :)

Gwen Lee Data Analyst, Mental Health Foundation of New Zealand

MoveData are one of the best teams we have worked with. Highly recommended for anyone wanting a seamless Salesforce integration.

Tania Samarasinghe Campaign Manager, Ronald McDonald House Charities New Zealand

The integration is working really well. Has been amazing for reporting through Salesforce and Marketing Cloud. Would absolutely recommend!

Russell Bradshaw Fundraising Team Lead, Burnett Foundation Aotearoa

Data improved. Time saved. A game-changer. We're already planning our next integrations with MoveData.

Eilidh Pollard Salesforce CRM Manager, Leukaemia UK

Such an elegant and simple solution, and great customer service. Thanks MoveData!

Sivan Naor Senior CRM Team Manager., Campaign Against Living Miserably

The service was exceptional and real-time data transfer has been a game changer for us. We couldn't be happier with the results and highly recommend MoveData!

Prathiti Kumar Database Officer, The Passage
logo
logo
logo
logo
logo
logo
logo
logo
logo
logo
logo
logo
logo
logo
logo
logo

Powerful Salesforce Integration
for Smart Nonprofits