Architect Academy For Partners - September 2022
Architect Academy For Partners - September 2022
org
Architect Academy
for Partners (Nonprofit / Education)
Forward-Looking Statements
This presentation contains forward-looking statements about, among other things, trend analyses and future events, future financial performance, anticipated growth, industry
prospects, environmental, social and governance goals, and the anticipated benefits of acquired companies. The achievement or success of the matters covered by such
forward-looking statements involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, Salesforce’s
results could differ materially from the results expressed or implied by these forward-looking statements. The risks and uncertainties referred to above include those factors
discussed in Salesforce’s reports filed from time to time with the Securities and Exchange Commission, including, but not limited to: the impact of, and actions we may take in
response to, the COVID-19 pandemic, related public health measures and resulting economic downturn and market volatility; our ability to maintain security levels and service
performance meeting the expectations of our customers, and the resources and costs required to avoid unanticipated downtime and prevent, detect and remediate performance
degradation and security breaches; the expenses associated with our data centers and third-party infrastructure providers; our ability to secure additional data center capacity; our
reliance on third-party hardware, software and platform providers; the effect of evolving domestic and foreign government regulations, including those related to the provision of
services on the Internet, those related to accessing the Internet, and those addressing data privacy, cross-border data transfers and import and export controls; current and
potential litigation involving us or our industry, including litigation involving acquired entities such as Tableau Software, Inc. and Slack Technologies, Inc., and the resolution or
settlement thereof; regulatory developments and regulatory investigations involving us or affecting our industry; our ability to successfully introduce new services and product
features, including any efforts to expand our services; the success of our strategy of acquiring or making investments in complementary businesses, joint ventures, services,
technologies and intellectual property rights; our ability to complete, on a timely basis or at all, announced transactions; our ability to realize the benefits from acquisitions,
strategic partnerships, joint ventures and investments, including our July 2021 acquisition of Slack Technologies, Inc., and successfully integrate acquired businesses and
technologies; our ability to compete in the markets in which we participate; the success of our business strategy and our plan to build our business, including our strategy to be a
leading provider of enterprise cloud computing applications and platforms; our ability to execute our business plans; our ability to continue to grow unearned revenue and
remaining performance obligation; the pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; our ability to limit customer
attrition and costs related to those efforts; the success of our international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth
in our customer base and operations, including as a result of acquisitions; our ability to preserve our workplace culture, including as a result of our decisions regarding our current
and future office environments or work-from-home policies; our dependency on the development and maintenance of the infrastructure of the Internet; our real estate and office
facilities strategy and related costs and uncertainties; fluctuations in, and our ability to predict, our operating results and cash flows; the variability in our results arising from the
accounting for term license revenue products; the performance and fair value of our investments in complementary businesses through our strategic investment portfolio; the
impact of future gains or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies
within our strategic investment portfolio; our ability to protect our intellectual property rights; our ability to develop our brands; the impact of foreign currency exchange rate and
interest rate fluctuations on our results; the valuation of our deferred tax assets and the release of related valuation allowances; the potential availability of additional tax assets in
the future; the impact of new accounting pronouncements and tax laws; uncertainties affecting our ability to estimate our tax rate; uncertainties regarding our tax obligations in
connection with potential jurisdictional transfers of intellectual property, including the tax rate, the timing of the transfer and the value of such transferred intellectual property;
uncertainties regarding the effect of general economic and market conditions; the impact of geopolitical events; uncertainties regarding the impact of expensing stock options and
other equity awards; the sufficiency of our capital resources; our ability to comply with our debt covenants and lease obligations; and the impact of climate change, natural
disasters and actual or threatened public health emergencies, including the ongoing COVID-19 pandemic.
092821
3
About This Course
? ● Salesforce Architect
Learning Journey
4 Donations
1 5 Recurring Donations
(Legacy & Enhanced)
Profiling
Nonprofit & 3 Performance and
Education Products
Debug
8
Salesforce Architecture,
2
Salesforce for Nonprofit & Automation Bonus
Education Overview
All About Data Salesforce.org 7 Technology as a tool
?
● 5-6 years
● 7+ years
● What is Salesforce?
Multitenant
Architecture
Quick Review
Rate your Salesforce
Multitenant knowledge:
● Not sure what it is
● I have an idea what it is
? ● I completely understand it
Multitenant - Metadata Driven Architecture
Reliable, Customizable, Upgradeable, Secure, and Fast
● Runtime engine generates app components from metadata for tenant-specific customizations,
configurations, and business logic
● Data tables and indexes are abstract constructs that exists merely as metadata in the platform
Universal Data Dictionary (UDD)
Storage Connectivity
Release
Management
Relational DB Big Data Services External Data External Services
Your Ecosystem
(Services, Data Stores, etc.)
Salesforce for Nonprofit
Building Relationships, Building Change
Einstein for Nonprofits
Case
Accounting Subledger Management
Program
Build the relationships that
Management
achieve great missions Fundraising
Outbound
Gain safer data, deeper Insights Data
Funds
insights, greater impact Integrity
Grant
Support your mission with Marketing & Management
flexibility, integration and Engagement
innovation Volunteers for
Salesforce
Nonprofit Operations
(NPSP)
AppExchange Salesforce.org
Partner Apps Purpose-built products
Data Architecture
tailored for Education
Institutions models
Large Data Volume
● Data Storage
● Data Skew
● Skinny Tables
Data Considerations ●
●
Indexes
Salesforce Query Optimizer
Thinking about data as an Architect ● Query Plan
● Data Import
? ● I’m an expert
Large Data Volume (LDV)
What does it mean?
?
● I understand how they work
● I’m an expert
Salesforce - Data Storage
Each Record by Default is 2K in Size - Help in estimating data storage and LVD
SALESFORCE EDITION DATA STORAGE MINIMUM DATA STORAGE ALLOCATION FILE STORAGE ALLOCATION FILE STORAGE ALLOCATION
PER ORG PER USER LICENSE PER ORG PER USER LICENSE
Contact Manager
Group 612 MB
20 MB
Professional
Enterprise
10 GB 10 GB
Performance
120 MB
2 GB
Unlimited 20 MB for Lightning Platform
Starter user licenses
Developer 5 MB
20 MB
Personal 20 MB (approximately 10,000
N/A N/A
records)
Essentials 10 GB 1 GB
1 Donation:
● Donation (Opportunity) - 1 record Relationship
● Hard Credit (Opportunity Contact Role) - 1 record
● Payment - 1 record
Account
Term
Address
Program Program
Contact Affiliation Plan
Enrollment Course
10k 10k
Donations Household Members
(Opportunity) (Account) (Contact)
● In multitenant data model the data in objects The picture below illustrates an Account view
may be stored in separate tables at the retrieving data based on Skinny table containing
database level. This separation may create a standard and custom fields from separate database
join when querying data from different tables. tables.
● A Skinny table is a custom table created by the
Salesforce support team that contains a subset
of fields from separate tables to avoid joins
and consequently speed up queries in reports,
list views and/or SOQL queries
○ Reduced I/O and Joins
○ Better cache utilization
○ Supported on Account, Contact,
Opportunity, Lead and Case objects
○ Additional overhead to keep in sync
○ Invisible to end users
○ Read-only
● By default, the following field types are indexed: The Salesforce platform work with its own
index table that contains a copy of the data,
○ RecordTypeId
along with information about the data types.
○ Division
○ CreatedDate The platform then builds a standard database
○ Systemmodstamp (LastModifiedDate) index on this index table.
○ Name
The index table places upper limits on the
○ Email (for contacts and leads)
number of records that an indexed search can
○ Foreign key relationships (lookups and
effectively return (more about this later).
master-detail)
○ Unique Salesforce record ID
○ External ID
● Custom indexes can be created by logging a
Case with Salesforce support who will analyze
the queries and evaluate if the index is
necessary or not
● The Tooling API exposes metadata that you can Using Tooling API it is possible to find what
access through REST or SOAP and its SOQL fields in a specific Salesforce Object are
capabilities allow you to retrieve smaller pieces indexed.
of metadata Using Workbench, navigate to Query > SOQL
Query:
● Workbench is a powerful, web-based suite of
tools designed for administrators and
developers to interact with Salesforce
organizations via the Force.com APIs. It is free to
use, but is not an official Salesforce product
As an example, to find the Account indexed
fields run the SOQL query as shown below:
SELECT QualifiedApiName FROM
FieldDefinition WHERE
EntityDefinition.QualifiedApiName
='Account' and IsIndexed = true
Object Indexed Fields - Visual Studio Code
How to find what fields are indexed in a Salesforce Object?
● Visual Studio Code, as Workbench, allows With the SOQL Builder for Visual Studio Code
administrators and developers to interact with extension it is possible to leverage the Tooling API
Salesforce organizations APIs. It is free to use, to find what fields are indexed.
but is not an official Salesforce product To find the Household (Account) indexed fields run
the SOQL query as shown below:
SELECT QualifiedApiName FROM FieldDefinition
WHERE EntityDefinition.QualifiedApiName
='Account' and IsIndexed = true
Query Optimization - What is it?
Process of choosing the most efficient means of executing a Query
For example, a user may be looking for Household members with Last Name starting with ‘A’.
If the query optimizer statistics indicates that 80% of Household members Last Name starts
with ‘A’, then the query optimizer may decide that a full table scan is more efficient.
However, as illustrated in the picture, if statistics indicate that very few household members
have a Last Name starting with ‘A’, then reading an index may be more efficient than a full
table scan.
Salesforce Query Optimizer (SQO)
Produce effective execution plans for Salesforce queries
The SQO (Salesforce Query Optimizer) maintains a table containing For example, household member are
statistics about the distribution of data in each index. 68% Female and 32% Male.
GMR/PM0
10010 tegit et quod
10010 tegit et quod
of pre-queries
10011 omnia caelum
10011 omnia caelum
Grp 1
10014 quem dixere chaeos
10014 quem dixere chaeos
10016
10017
rudis
meis
deducite
indigestaque
perpetuum
temopra
10015
10016
10017
rudis
meis
deducite
indigestaque
perpetuum
temopra
10019
10020
carmen
mare
tegit
ante
et terras
et quod
10018
10019
10020
carmen
mare
tegit
ante
et terras
et quod
Execute query
10022 unus erat toto naturae
10022 unus erat toto naturae
results
10026 meis perpetuum
10026 meis perpetuum
10033
unus erat
vultus
toto naturae
in orbe
10032
10033
unus erat
vultus
toto naturae
in orbe
Stop
Salesforce Support can help analyze and create custom indexes that include null if necessary.
Selective Filter - Examples
AND Condition
4 Donations
1 5 Recurring Donations
(Legacy & Enhanced)
Profiling
Nonprofit & 3 Performance and
Education Products
Debug
8
Salesforce Architecture,
2
Salesforce for Nonprofit & Automation Bonus
Education Overview
All About Data Salesforce.org 7 Technology as a tool
? ● Cost = 0.88333…
● I’m not sure
Query Plan - Indexes Utilization
Understanding the Query Plan Information
The Query Plan Tool displays the number of records returned, the cost of the query and if
using an index table or performing a full table scan.
The Query Plan tool will show a list of available plans the Query Optimizer can utilize
and will be arranged by cost ascending. Each Plan will contain information on
Cardinality, Operation Type, Cost, sObject Type, and more. Each plan has a “Leading
Operation Type”, for example, Field Index or Full Table Scan. The plan with the lowest
cost is the plan that is used for driving the query execution.
● Deleted data - The Salesforce data deletion mechanism can have a profound
effect on the performance specially with LDV. Salesforce uses a Recycle Bin
metaphor for data that users delete. Instead of removing the data, Salesforce
flags the data as deleted and makes it visible only through the recycle bin. This
process is called soft deletion. While the data is soft deleted, it still affects
database performance because the data is still resident, and deleted records
have to be excluded from any queries (deleted data is purged after 15 days)
Process Overview
Considerations
Important Considerations
In Salesforce, can I load
Contacts or Opportunities
before Accounts?
● Yes
? ● No
Data Import - Process Overview
“Failing to plan is planning to fail” quote by Benjamin Franklin
What will impact the import process? Including NPSP and EDA specific functionality
● Import sequence
● Data volume
● Automation
● Limits & Storage
● Validation rules
● Sharing rules and calculation (computed vs deferred)
● NPSP/EDA specific configuration
○ Automation: Household or Opportunity naming rules, TDTM, Rollups, Soft Credit automation,
etc
Before you Start - Target Data Model
Understand the target data model
?
● I use Data Mover
● I use Data Loader
● Other tools
NPSP Data Import - Ordered Sequence
What objects should be populated first?
1. User 12. Opportunity
2. Account (Household / Organization) 13. Opportunity Contact Role
3. Address 14. Partial Soft Credit
4. Contact 15. Payment
5. Lead 16. GAU Allocation
6. Affiliation 17. Deliverable
7. Relationship 18. Engagement Plan Template
8. Campaign 19. Engagement Plan Task
9. Campaign Member 20. Level
10. General Allocation Unit 21. Activity
11. Recurring Donation
NPSP - How the Import Process Works & Advanced Data Import Options
Have you used NPSP Data
Import Advanced Mapping
before?
● Yes
? ● No
NPSP Data Import - Advanced Mapping
Importing Custom Fields
6. At the end, three new custom fields should be created in the NPSP Data Import object
NPSP Data Import - Advanced Mapping
Create Contact1 Relationship Custom Fields
11. In the new group, click on the down arrow at the end of the row and then click on “View
Field Mappings”:
13. Select “Contact2 Imported” and map it 14. Repeat previous step to create a new
or select “Related Contact” field mapping for “Relationship 1 Type”
NPSP Data Import - Advanced Mapping
Create Contact1 Relationship Custom Fields
15. After completed this is what the field mapping will look like
NPSP Data Import - Advanced Mapping
Create Contact1 Relationship Custom Fields
16. Add the custom fields in the NPSP Data Import template and test the import process
Order of Execution
● Validations
● Triggers
● Workflows
● Process Builder
● Flow
● Assignment & Escalation Rules
Salesforce.org Table Driven Trigger Management (TDTM)
Automation Framework ● Trigger Framework
? ● I’m an expert
Salesforce Order of Execution
Saving a record - Insert, update, or upsert statement
Load Original Overwrite with System Flow(s): Before System (again) &
Record or New Record Validations Save Updates Before Trigger(s) Custom
Initialize it Field Values (Request from UI) Validations
Save to Stop if
Auto Response Assignment Duplication duplicate
Workflow Rules After Trigger(s) Database but
Rules Rules Rules
not committed
Automation - Process/Flow
Update Before + After
Same Record ? Escalation Rules Processes, Flow, Update Same
Yes Trigger(s) Workflow Rules Record ? Yes
No No
Post-Commit
(Email, Async
Apex/Flows)
10
Accounting
Subledger
55
NPSP
This course assume you are familiar with TDTM and how it works. The intent is to provide additional information
related to TDTM and automation. To learn more about TDTM check the Resources slide +70
EDA
Apex Class Descriptions for NPSP & Apex Class Descriptions for EDA
Table Driven Trigger Management (TDTM)
How it works? A Single Apex Trigger starts and TDTM takes over
The example below illustrates the after triggers when creating new Contact.
2
3
4 1
Action 1 - Create
Household
ACCT_Individual Account
Action 2 - Create
Primary
AFFL_Affiliations Affiliation
_TDTM
Action 3 - Create
ADDR_Contact_ Primary Address
TDTM
NPSP - Table Driven Trigger Management (TDTM)
Apex classes managed by Table-Driven Trigger Management (TDTM)
Object Class Name Description
Account ACCT_Accounts_TDTM For inserted or updated Accounts, this class checks the Account Model selected in NPSP Settings and sets these
system fields:
● npe01__SYSTEM_AccountType__c
● npe01__SYSTEMISINDIVIDUAL__c
Based on NPSP Household Naming Settings, the class also updates Household Names on any Household Accounts in
the transaction (if necessary).
Account ACCT_AccountMerge_TDTM This class supports data management during the Account Merge process. When Accounts are merged, the class:
● Updates the Account Name, and Formal and Informal Greeting fields
● Recalculates Household Soft Credits
● Recalculates Opportunity rollups
● Deletes duplicate Addresses and propagates the Default Address to the appropriate Account and Contacts
Account ACCT_CascadeDeleteLookups_TDTM When you delete an Account, this class deletes Recurring Donations, Allocations, and Relationships that are related to
the Account through various lookup fields.
and more…
55
NPSP
Account ACCT_CannotDelete_TDTM This class prevents an Account from being deleted if it has any related Address, Affiliation, Attribute, Course,
Course Connection, Education History, Facility, Program Enrollment, Program Plan, Term, or Time Block
records.
Account ADDR_Account_TDTM When you update the values on Billing Address fields (Billing Street, Billing City, and so on), this class creates or
updates a related Address record for Accounts that are configured for Address management in EDA Settings.
If the Account is a Household Account, the class updates the Mailing Address fields for any Contacts associated
with the Household.
Account AFFL_AccRecordType_TDTM When you change the record type of an Account, and it's a Primary Affiliation for a Contact, this class updates
the Primary Affiliation to match the new record type. For example, if you change the Account's record type
from Academic Program to Sports Organization, this class updates the Contact's Primary Sports Organization
field.
This class does not create a new Affiliation record when the related Account type is changed. It updates the
existing Primary Affiliation record to reflect the new Account Type.
Account RenameLeadConvertedAccounts_TDTM When an Account is created during Lead conversion with a record type specified in Automatically Rename
Lead-Converted Accounts in EDA Settings, this class enforces the use of the Account naming format associated
with the record type in EDA.
● Add the User Managed Field to the Trigger Handler Page Layout
● Partner Learning Camp: Table Driven Trigger Management (TDTM) with NPSP
For example, there are 10,001 Account records to update which is more than can be
processed in a single transaction without some way of breaking it up.
1. Using Batch Apex, in the start() method you define the query to retrieve the collection of
records: SELECT Id FROM Account WHERE …
2. Then the execute() method runs, but only receives a relatively short list of records (default
200).
○ Within the execute(), everything runs in its own transactional context, which means almost all of
the governor limits apply to that block (i.e. each time execute() runs, you are allowed 150
queries and 50,000 DML rows and so on). When execute() is complete, a new instance is
created with the next group of 200 Account records, with a brand new set of governor limits.
3. Finally the finish() method wraps up any loose ends as necessary, like sending a status
email.
Batch Apex - Example
Apex Code Example
}
}
Batch Apex in NPSP
87 Customizable Rollups
Non-Skew Skew
● Default mode ● Used when a single record has more than 250
● When there are few records, usually less than 250 related records
related records ● Break the rollups into groups of records (default is
● Or, when “Customizable Rollups: Force Skew 300 records per group)
Mode” is selected on Account or Contact
Incremental
● Only evaluates Account and Contact records with Opportunities that were modified within a certain timeframe.
○ By default, this timeframe is the value of the largest N-Day rollup. NPSP's largest N-Day rollup by default is 2 years,
but can be changed or your own N-Day rollups be created
● Only available for Contact Hard Credit and Account Hard Credit Non-Skew batch jobs
● Only affects our nightly scheduled jobs. Running Bulk Data Processes still calculates rollups for all records
1. Go to Setup > Custom Settings > Customizable Rollup Settings > click on Manage
2. Click on Edit
3. Update the value for:
a. LDV: Account Hard Credit Chunk Size
b. LDV: Account Soft Credit Chunk Size
c. LDV: Contact Hard Credit Chunk Size
d. LDV: Contact Soft Credit Chunk Size
Incremental Mode
How to enable it? - On by default on new Orgs
1. Go to Setup > Custom Settings > Customizable Rollup Settings > click on Manage
2. Click on Edit
3. Ensure the following is checked:
a. Incremental Account Hard Credit Non-Skew
b. Incremental Contact Hard Credit Non-Skew
4. Also, review the Last N Days for:
a. Incremental: Last N Days Field Override
b. Incremental: Last N Days Value Override
Batch Size Configuration
By default each batch process 200 records at a time
NPSP Settings
1. Go to NPSP Custom Settings
2. Click on Edit
3. Update the desire Batch size for the
Rollup job
4 Donations
1 5 Recurring Donations
(Legacy & Enhanced)
Profiling
Nonprofit & 3 Performance and
Education Products
Debug
8
Salesforce Architecture,
2
Salesforce for Nonprofit & Automation Bonus
Education Overview
All About Data Salesforce.org 7 Technology as a tool
?
● No
Defining Performance
In Simple Terms
ce
Br
● Complex pages with many custom fields and/or
an
ow
components are slower to render. And even slower
rm
se
with low browser performance.
rfo
rP
Pe
erf
ork
● Lightning UI requires many XHRs
orm
(XMLHttpRequests) to render a page, so is sensitive
tw
an
Ne
to network latency.
ce
● Worst case scenario (slow network, slow browser,
laptop running too many apps, complex page
layout) can translate to 10+ second EPT.
Page Complexity & Customization
What Is EPT?
Improving EPT
Complexity and Customization
Br
e
● Use secondary tabs
ow
an
se
● Reduce number of fields on the layout (recommended <
rm
rP
rfo
50)
erf
Pe
● Reduce related lists (recommended < 12) or use Related
orm
ork
List Single component to show only the most important
an
tw
important related lists and then use secondary tabs
ce
Ne
● Use Lightning Actions instead of custom components
where appropriate
● Minimize the number of open tabs within Console Apps Page Complexity & Customization
● Tip: use Lightning Inspector to assess page complexity
ce
Br
with caching, storable actions, and the Lightning Data
ow
an
Service.
se
or
rP
● Lookout for impact of VPN network topologies and
erf
erf
consider split tunneling.
kP
orm
or
● Follow Networking best practices
an
tw
ce
Ne
● If necessary Troubleshoot networking issues
● Consider leveraging Thousand Eyes if needed
Page Complexity & Customization
Do you know what CDN
(Content Delivery Network) is?
● Yes
?
● No
Enabled by default
For Digital
in new Orgs after
Experience
CDN & Caching Winter’ 19
? ● No
What is Salesforce Edge?
Data driven and geo-distributed network product to deliver superior user experience
Br
e
ow
c
an
● Leverage the built-in speed test to review Octane Scores
se
rm
rP
rfo
erf
Pe
or
ork
ma
tw
n
Ne
ce
Page Complexity & Customization
Trailhead
● Lightning Experience Performance Optimization
● Lightning Web Components Basics
Community
● *Lightning Now!* Trailblazer Group
● Lightning Speed Admin Podcast
Debug & Profiling
Methodology
● In the Setup menu select Environment > Logs > Debug Logs
● In User Trace Flags panel, click New and select the user that reproduces the issue. Prefer an admin
user to execute the sharing rules:
● First, in the Salesforce Org, click on the Gear Icon at the top
right and select Developer Console. This will open the
Developer Console where you will be able to see the log
information
● After executing the scenario, review the debug log files in the Developer Console > Logs tab. Check
the request duration and file size
● With the debug log opened, change the view to select what is important in Debug menu > View Log Panels...
?
● I understand it
● I’m an expert
Salesforce for Nonprofit Recurring Donations
Recurring Donations has existed in Nonprofit Success Pack (NPSP) for many years
In an effort to improve the user experience, and in partnership with our nonprofit
community, the Salesforce.org team reimagined the Legacy Recurring Donations (RD1 or
LRD) and in 2020 launched the Enhanced Recurring Donations (RD2 or ERD).
NPSP NPSP
Version 2 Version 3 Continuous Innovation
Account Account
(Household) (Household)
Recurring
Donations
Schedule
Payment Payment
Protected/Private
Object
Enhanced Recurring Donations (ERD)
Page Layout
● Installment Opportunity
Auto-Creation
○ Always Create Next Installment
(default)
○ Disable First Installment on Create
○ Disable All Installments
● Next Donation Date Match Range
● Use Fiscal Year for Recurring
Donations
● Recurring Donation Name Format
Enhanced Recurring Donations (ERD)
Upgrade or Migration?
Summary
Large Data Volume testing in UAT
causing batch apex job errors.
Use Case #1 - Understanding the Error Message
What “Your request was running for too long” means?
Maximum CPU time on the Salesforce servers 10,000 milliseconds 60,000 milliseconds
Summary
Loading donations causes an error
during the Opportunity trigger
execution.
Use Case #2 - Understanding NPSP Automation
What happens when a Donation is created?
“
As mentioned in the previous slide, when running a
What “Non-selective SOQL query returning more than 200k records as part
query against large of a trigger execution, if no selective filter is found the
object type” means? query will be marked as non-selective and the
QueryException error will be returned.
Cause
npsp.TDTM_Opportunity: execution of Non-selective query with Data Skew between 4 Account
AfterInsert with more than 10k Affiliations records.
caused by: System.QueryException:
Non-selective query against large object type
(more than 200000 rows).
Fix
Distributing the records to avoid Data Skew (less than
10k related records for an Account) solved the issue.
Use Case #3 - Customizable Rollups Error
Summary
Customizable Rollups Batch Apex jobs
not completed because of errors.
What is happening?
Key considerations
“
Yes, Customizable Rollups enabled in LVD Org:
Did something changed ● Accounts (2,191,343)
or is this a large data ● Contacts (2,016,072)
volume Org? ● Opportunities (49,624,889)
● Campaign Member (22,291,122)
“ What
“REQUEST_RUNNING_T
OO_LONG” means?
It means the query executed in the Apex
transaction is taking more than 10 minutes to
complete (as explained earlier)
Cause
Custom Apex running in a loop querying the
OpportunityContactRole object when processing Hard
Credits.
The Query in the Apex code is being executed against all
OpportunityContactRole records.
Fix
Removing the Custom Apex Code and custom logic
solved the issue.
Use Case #4 - Customizable Rollups Custom Filters
Context: npsp__CRLP_SkewDispatcher_BATCH
Summary
Customizable Rollups custom filters
caused errors on Batch Apex jobs.
Illustration
What is happening?
Key considerations
Cause
Custom Customizable Rollup filter based on a custom
field causing query timeout
Fix
Added an index to handle the custom filter definition,
improving the query execution time and preventing the
Illustration
long running query and consequently timeout
Use Case #5 - Legacy Recurring Donations Errors
Summary
In Legacy Recurring Donations, changing
forecast months caused an error.
Cause
Changing the forecast value in NPSP is a
computationally expensive process particularly in an Org
that has a large data volume, as it will either mass-create
or delete Opportunities and related records.
The change combined with the custom Trigger was
causing the issue.
Fix
The following was tried but did not worked:
1) Changing incrementally by 1 (i.e. 12 > 11)
2) Disabling the custom Trigger
The partner updated the Custom Settings manually
through SOQL (not recommended) which did not trigger
the processing of existing recurring donations
Use Case #6 - Customizable Rollups Batch Job Error
Opportunity
Opportunity Payments "First error: Apex CPU time limit exceeded"
Contact Role
Context: npsp__CRLP_Account_BATCH
Account
Address
Contact Affiliation
Summary
Batch Apex job is failing with an error.
Relationship
Use Case #6 - Understanding the Error Message
What “Apex CPU time limit exceeded” means?
“ What
“npsp__CRLP_Account_B
ATCH” does?
As mentioned here, this batch apex job is responsible
for “Customizable Rollups - Account Hard Credit”
Cause
The error is being caused by the large data volume to be
processed by the Customizable Rollups batch apex job.
Fix
Reducing the Batch job size for Accounts fixed the issue:
“NPSP Settings > Bulk Data Processes > Batch Process
Settings > Account Hard Credit Batch Size”.
Use Case #7 - Volunteers don’t see available jobs
Summary
Define how job
and shift repeat Volunteers don’t see job shifts on the
Website.
Cause
By reviewing the V4S GitHub repository issues list we
found there is a limit that prevents more than 999 jobs
to be displayed: Some Jobs May Not Be Displayed if
More than 999 Active Jobs
Fix
Reducing the number of available active jobs to less
than 999 fixed the issue
Salesforce.org
Architect Academy
for Partners (Nonprofit / Education)
Day 4
4 Donations
1 5 Recurring Donations
(Legacy & Enhanced)
Profiling
Nonprofit & 3 Performance and
Education Products
Debug
8
Salesforce Architecture,
2
Salesforce for Nonprofit & Automation Bonus
Education Overview
All About Data Salesforce.org 7 Technology as a tool
“ What
VOL_BATCH_Recurrence
class does ?
Batchable and Schedulable class to find the list of
active Job Recurrence Schedules, and process them to
add job shifts into the future as seen here.
“ Is there a custom
configuration or process
impacting the job?
There is a custom Process Builder invoked when
the job is running.
“
Volunteer Job has:
Is the amount of data ● 4 active Recurrence Schedules
● 923 Volunteer Job Shifts
contributing to the issue? ● 1,541 Volunteer Recurrence Schedules
● 36,271 Volunteer Hours
What is probably causing the
problem?
● Large Data Volume
● Custom Process Builder
? ● Something else
#8 - Recurring Volunteers Job Scheduling
Cause & Fix
What caused the issue and how to fix?
Cause
Custom Process Builder running during scheduled job,
plus considerable number of volunteer records to be
processed are causing the issue.
Fix
1. Changed the custom Process Builder to a before
update Flow to minimize DML execution
2. Lowered the “Recurring Job Future Months” value:
○ Setup > Custom Settings > Volunteers Settings
○ click Manage > click Edit and if there are no
Custom Settings values configured then click
New
○ Update the value of the Recurring Job Future
Months field to a lower value than 4
Use Case #9 - Apsona Data Loading
"CANNOT_INSERT_UPDATE_ACTIVATE
_ENTITY: npsp.TDTM_Account:
System.LimitException: Apex CPU time
limit exceeded. "
“ Is there a custom
process or app involved?
The nonprofit is using Declarative Lookup Rollup
Summary for custom aggregation and rollups
“
Salesforce platform imposes a CPU usage governor limit
What APEX CPU Time to any given execution context, which is approximately
10 seconds. It means Apex Code, declarative tools or a
Limit Exceeded means? combination in a transaction, must not exceed a
~10-second limit. More info here
What is probably causing the
problem?
● Large Data Volume
● Declarative Lookup Rollup
Summaries
? ● Something else
#9 - Apsona Data Loading
Cause & Fix
What caused the issue and how to fix?
Cause
Declarative Lookup Rollup Summaries (DLSR)
introduced additional custom code execution which
combined with the large data volume caused the issue.
Fix
Moved configuration from DLSR to NPSP Customizable
Rollups and uninstalled DLSR.
Use Case #10 - School Applicants Registration
Summary
New Applicants are unable to complete
the registration.
Use Case #10 - School Applicants Registration
First, let’s review the EDA Account Models
Student Contact: Claudio Moraes Student Contact: Parent Contact: Parent Contact:
Claudio Moraes Antonio Moraes Antonio Moraes
What is happening?
Key considerations
Summary
Recruiting Territory does not run
automated assignment.
Illustration
Use Case #11 - Admissions Connect
First, let’s review a few key points about Enterprise Territory Management
Access Assignment
Territory Management allows you to define access Assignment is defined at the Account level, no option
to Accounts, Opportunities, and Cases. (not is available to define assignment for Contacts
Contact) (Students) meaning if student information change it
will not trigger an automatic reassignment.
What is happening?
Key considerations
Cause
Recruiting Territory Management does not trigger
assignment based on Student (Contact) information
Auto Run Territory Assignment Rules updates.
● Run Territory Assignment Rules on any update
?
● No
KEY FEATURES
Nonprofit & Education Ideal for Deep Dive Nonprofit and Education
Industry Clouds Demos
Industry Demo Orgs
(IDOs) Spin Up & Throw Away (Expires in 30 days)
Highly configurable, pre-populated industry
demos built on the SDO PRODUCTS INCLUDED
Powered
PoweredByBy
CONSTITUENT ENGAGEMENT
Volunteers
Digital Experiences
PROGRAM MANAGEMENT
Accounting Subledger
GRANTS MANAGEMENT
Grantmaking Portal
Powered
Powered
ByBy Due Diligence Framework
DATA ARCHITECTURES
Admissions Connect
Industry Demo Org (IDO) Recruiting & Marketing
Education (EDU) IDO STUDENT SUCCESS
Advisor Link
ALUMNI RELATIONS
Accounting Subledger
Elevate Pages
Powered
Powered
ByBy
Have you used the Partner
Learning Camp?
● Yes
?
● No
Step 1: Complete the SDO Fundamentals Course
Partners must first complete the
SDO Fundamentals course.
A comprehensive collection of
resource available to
Salesforce.org Network Partners:
● Release Readiness
● Early access initiatives (pilots,
betas, previews, Success
Insights, and more)
● Roadmap Resources
● Etc
Salesforce Orgs
What types of Orgs can I access?
Org Type Best Used For Expires After Creation/Access
Industry Demo Org (IDO) Customer demos and learning 1 month, unless you request an extension Partner Learning Camp
Partner Enterprise Edition Robust development, testing and 1 year, unless you request an extension Environment Hub
customer demo
Partner Developer, Partner Enterprise and Scratch Orgs requires the installation and set up of
products where the Nonprofit & Education Industry Demo Orgs comes pre-configured with
ready to show demo scenarios
? ● No
Collaborate & Automate Project Delivery at Scale
Our new normal is changing customers and partners expectations on how projects
are delivered
Challenges
Addressing Markets at Scale
Project Collaboration
Customers Partners
Paradigm Shift - From Org to Source Driven Dev.
Current Org-Driven Code QA Test Release
Development: Develop + Unit Tests Code Merge + Functional UAT + Load + Staging Training + Deploy
Code is promoted
through change sets,
ant migration, metadata
API. Dev
Pro
SBX
Change set promotions
Dev Dev Dev
SBX SBX SBX
Partial Full
Future Source-Driven PROD
Development: SBX SBX
Changes are tracked in a
VCS with a CLI for source Scratch Scratch Scratch Dev
pull and push, and Org Org Org Pro
programmatic testing. SBX
New Tools:
CumulusCI and
Salesforce DX delivers a
suite of tools and
processes to support
modern development
and VCS.
Version Control System (repo)
CLI-driven changes
What is your development
model?
● I use only persistent Orgs (sandbox,
production but no scratch Org)
● I use a version control system (i.e.
GitHub) with scratch Orgs and
persistent ORgs for UAT, training and
? ●
integration testing
I use scratch and persistent Orgs
without a version control system
Source-Driven Development Process
Plan Code Merge & Test (1) Merge & Test (2) Release
Review
Dev Org ReviewOrg
Work
Dev Org Review (SBX or
Org Integration Org Staging Org
Tracking Dev Org (SBX
Org Scratch)
or Prod
(Sandbox) (Sandbox)
tool of (Sandbox or Scratch
(Sandboxoror Scratch Org)
Org)
(SBXScratch)
or Org
(Sandbox Scratch Org) Scratch)
choice
PR
git pull
git pull git pull deploy
deploy deploy <or>
git pull source:pul git pull <or> <or> package
deploy l deploy package install package install install
git push
Main
Staging
Integrate
Feature 1
Feature 2
Rate your experience with
Salesforce CLI/SFDX
● Never used it
● I played with it
? ● I’m an expert
Do you know what is
CumulusCI?
● Yes
?
● No
CumulusCI Suite
Proven, scalable orchestration tool to deliver faster time to value
Metéchō handles the creation of fully configured scratch org environments, metadata change control,
and Github feature branch management through an easy to use web interface.
MetaCI is used by Salesforce.org team to run builds of all managed packages and for creating beta and
production releases.
install.salesforce.org
install.work.com
Smart Metadata Updates
CumulusCI handle situations where static metadata is dangerous
Snowfakery
04 Getting started with Snowfakery
Snowfakery sample recipes
Additional Resources
05 Branch Strategies
Building Templates as
Lego Blocks
CumulusCI
How often do you perform the
same or similar task in different
projects?
● I find myself repeating a lot of tasks
and configurations in different
projects
Configuration
● Create a new Scratch
Org based on the
defined Salesforce Test
Tools Org configuration ● Test your template
● Start implementing deployment in
● Visual Studio Code CumulusCI.yml the configuration different Salesforce
● Salesforce Dev Hub Github & CCI ● What are the managed required Orgs
enabled ● Capture and extract
● CumulusCI (CCI) ● Create the Recipe packages or ISV Apps ● If using Metadeploy,
Template Github that my solution will the metadata related test your installation
● SFDX is authorized to to the performed
connect to Dev Hub Org Repository depend on? plan in different
● Configure the CCI ● What features and configuration Salesforce Orgs
● Github account ● Build CCI
connected with Project settings settings should the
Salesforce Org have? automation (custom
CumulusCI tasks and flows) used
● Github Desktop to deploy your
installed and Configured configuration
When you’re done, you will see the following: Your project is now initialized for use with CumulusCI
Cumulusci.yml File
Journey: Dependencies & Automation