Wednesday, July 10, 2019

NPSP System Fields - Which ones are used?



There are behind the scenes NPSP fields on the Contact, Account and Opportunity objects.  This post describes the fields and how they are typically populated.


The system fields on the Contact and Account should contain values based on the NPSP Account model used by your organization.  Those Account Models are One-to-One Individual, Bucket Individual and Household Account.

The proper field settings for the account model field combinations are shown below:

One-to-One Account model
npe01__SYSTEM_AccountType__c (text): "One-to-One Individual"
npe01__SYSTEMIsIndividual__c (checkbox): TRUE
npe01__One2OneContact__c (lookup): Contact record ID

Household Account model
_SYSTEM:IsIndividual: TRUE
_SYSTEM:AccountType: Household Account
RecordType/RecordType.Name: Household Account
Account Type/Type := a picklist that can be customized as an organization's chooses.

Settings for Organization
_SYSTEM:IsIndividual: FALSE
_SYSTEM:AccountType: <blank>
RecordType/RecordType.Name: Organization


Opportunity Fields
On an Opportunity record you will see two fields one called Contact Id For Role Synching and Primary Contact.

The Contact Id For Role is a legacy field and is no longer used by NPSP and is left blank when entering data via the front end.  If you import information into this field it will create a Contact Role but in general should not be used.  The proper field is the Primary Contact on the opportunity.  When populated this updates the Primary Contact Role.

Wednesday, May 15, 2019

Use Quick Actions to Display Record Details

Salesforce's Lighting interface has opened up a ton of possibilities for creating better user experiences, this short article will look at just one of them. 

Sally, the Director of Development for a small nonprofit, spends most of her day in Salesforce communicating with constituents. When she makes her phone calls, it is important for her to know the giving history of the person she is calling. She doesn't like the fact that she needs to scroll down the Contact's detail page to find the donation summary information. The detail page is loaded with fields and Sally finds this process extremely cumbersome. She would like to be able to quickly see the contacts total life-time gifts, the households total life-time gifts, total gifts given this year, last year and the last gift date and amount. 

Bobby, the Salesforce Admin, is super excited because he knows he can make it happen in Lightning. Bobby is able to add a tab to the Contact's record page showing Sally just the information she wants to see. Instead of scrolling down a long page of details, Sally can look at a tab containing just the information she wants to see.

Let's look at how he was able to do it! 

Step 1 - First Bobby created a new Update Action on the Contact object that contained only the donation summary fields that Sally needed. 

Watch this short video to see how.

   


Step 2 - Next Bobby added the Update Action to the Contact Lightning Page. He edited the Contact Lightning Page, added a new Tab to the page and called it Donation Summary. He dropped the Related Record Lightning Component on the new tab and selected the Update Action that he created in Step 1. He saved the page and voila -- he was done! 

Watch this short video to see how.

 


It took Bobby less than 15 minutes to deliver a solution to improve Sally's daily process. Sally is thrilled and Bobby looks like a rock star!

Sunday, April 28, 2019

Pin Your Most Used List View on a Tab

Tired of going to a Tab and always switching the List View from Most Recent records to something you actually want to see?  Well there's a Lightning only feature you are going to love!

Step 1 - go to the tab that contains the List View you want to Pin.
Step 2 - Use the drop-down to select the List View you most commonly use
Step 3 - To pin the list view, click its pin icon Pin icon. Whenever you select that object, the pinned list view loads as the default list view.  To unpin the List View, click the Pin icon again.

Yep it's just that simple!




For more information see: https://help.salesforce.com/articleView?id=basics_pinned_list_views_lex.htm&type=5

Monday, March 18, 2019

Calculating NPSP Levels using a Formula Field

NPSP Levels provide a way of categorizing constituent's level of commitment and engagement.  For example you might have a level you call Major Donor to categorize those who contribute large amounts of money.

The assignment of engagement Levels are based on either a number or currency field. This could be existing field like Total Gifts or Average Gift Amount or formula field that returns a numeric value to handle more complex measurements.  An example of this would be a RFM calculation (Recency, Frequency, Monetary) or based a point based system.  

In this post we are going to take a look at a points based system.  By creating a formula field to use for our levels so that we can use more complex data points to determine our level of engagement for our constituents.   We are measuring engagement at the household level.

In this example we have four engagement levels, Endorsing, Contributing, Owning and Leading.  Each of our levels if represented by a specific number of points.  The more points the household has, the higher the level of engagement.





Step 1:  Create the formula field that calculates the points for our Level.

On the Account object create a new formula field with a return type of Number.




We'll create a formula field that will calculate our points based on how engaged the household is with our organization.  We'll measure this using three metrics 1) number of times someone in the household was a team captain at one of our walk events 2) number of gifts the household has given in the last 5 years 3) total dollar amount of lifetime giving of the household.

For each of these categories, the household will receive points.  The points for each of the three categories will be added together to come up with the total engagement score.  This engagement score will drive the engagement Level of the household.



Step 2:  Configure Levels to use the new calculated field.

You'll want to have setup your Level fields before you do this step.  For more information on configuring levels see:  https://powerofus.force.com/articles/Resource/NPSP-Create-and-Manage-Levels.

From the Level tab, choose New.  For each level complete the fields shown.  The example below if for our first level, Endorsing.  Households are in this level if they have and engagement score of 1 to 5.
  • Level Name:  Name you are calling this level
  • Target:  Object to hold the level.  In our example Account as we are setting the level at the Household.
  • Source Field:  Calculated field we created in Step 1 that determines our engagement score.
  • Level Field:  Field on the object that will store the name of the current level 
  • Previous Level:  Field on the object that will store the name of the previous level
  • Minimum Amount:  Minimum value that qualifies for this level
  • Maximum Amount:  Score has to be less than this value to qualify for this level
  • Engagement Plan Template:  (optional) template if tying this level to an engagement plan template.




Step 3:  Repeat this process for each Level desired.


Levels calculate in nightly batch - can force run the batch in NPSP Settings.




Monday, January 7, 2019

NPSP Soft Credit for Primary Contact on an Organizational Gift


Why would you use them? 

Your Nonprofit has several business owners want to be credited for gifts given by their business.

What's Involved?

  • Setup the Soft Credit Role for Organizational Opportunities:  From the NPSP Settings Tab Choose Donations >Contact Rolls page, set the Contact Role for Organizational Opps.

  • When entering a a new Account Opportunity, in the Primary Contact field, look up the contact who should receive the soft credit.
  • The Primary Contact selected will automatically receive a soft credit with the contact role you specified giving them the soft credit.







Helpful Tips

  • If you want to always have the Primary Contact for the business receive soft credit:
    • Add the Contact as the Primary Contact on the Organizational Account.
    • Add the primary contact field to the New Account Donation Quick action on the Account object and preset it's value to the Account’s primary contact.
  • If you want NPSP to stop generating automated soft credits for an Affiliation, remove the value in the Related Opportunity Contact Role field on the Affiliation record and leave it blank. 
  • Remember The Soft Credit Totals update when the nightly batch jobs run. If you need to recalculate soft credits outside of the nightly batch, you can manually recalculate the entire batch or for a single Account or Contact.


Monday, November 19, 2018

Visualize your List Views with List View Charts

List Views are handy for looking at subsets of data, you can enhance your list view by adding a chart to help visualize the data.

List View Filters

First create a view of information filtered by data important to you and then add a chart.

Create a New List View

Actions you can take for list views are available in the List View Controls menu (icon to access List View Controls).

Create the List View and Add Filters

  • Under List View Controls, select New. 
  • Give your list a name.
  • Choose who can see this list view.
  • Click Save. The Filters panel appears.
  • Click Show me, then select All objects to see all records not just those owned by you.
  • Add any additional filters desired.  In this example, we are filtering by Accounts with Total Gifts of 1,000 or more.
  • Click Done.

Select the List View Fields to Display

  • From the List View Controls menu, Select Fields to Display.
  • Use the arrows to add, remove, and reorder your visible fields.
  • Click Save

For more information see this help article.

List View Chart


  • Once you have your new List View created, you can create a Chart to visualize the data.
  • From the  Opportunities tab, select the the new List View you created.
  • Click list view charts icon.



  • In the Charts panel that appears, click list view charts gear icon and select New Chart.



  • Give the Chart a name and complete the other parameters and click Save.
  • Chart Type: Horizontal Bar
  • Aggregate Type: Sum
  • Aggregate Field: Total Gifts
  • Grouping Field: Billing State/Province


  • Chart now is available when you select the list view






Try it on your own in this Trailhead module


https://help.salesforce.com/articleView?id=customviews_listview_chart_create_lex.htm&type=5

Thursday, September 27, 2018

Helpful Date Calculations


Calculating a person's age from their birth date

Nonprofits, especially those dealing with minors, often need to know the age of their constituents.  Instead of having an Age field that is manually updated each year, we can calculate the person's age from the birth date they've given us.

The helpful formula below was taken from Saleforce's Knowledge Article Number 000230455.

First it checks to make sure that there is a value in the Birthdate field.  If there is, it then checks to take into account the person's birthday happened this year or still needs to come.

Since either the birthday can be in a leap year or today can be Feb 29 of a leap year, we need to make sure to compare the days, in a leap year, therefore we are comparing in the year 2000, which was a leap year.

The formula shown, calculates the age of the Contact by looking at the standard Salesforce Birthdate field.  

IF( NOT( ISBLANK( Birthdate ) ) ,
  IF( DATE( 2000 , MONTH( Birthdate ) , DAY( Birthdate ) ) <= DATE( 2000 , MONTH( TODAY() ) , DAY( TODAY() ) ),
     YEAR (Today()) - YEAR ( Birthdate ),
     YEAR (Today()) - YEAR ( Birthdate ) -1 ),
  null)


A more simple formula not taking into account the Leap Year would be:
IF( NOT( ISBLANK( Birthdate ) ) ,
IF(TODAY() >= DATE(YEAR(TODAY()), MONTH( Birthdate), DAY(Birthdate)), 
YEAR(TODAY()) - YEAR(Birthdate), 
YEAR(TODAY()) - YEAR(Birthdate) - 1),
 null)

Adding Years, Months or Days to a Date

These helpful formulas were republished from Salesforce's Example Date Formula document.

Adding Years to a Date

When adding years to a date you need to check that the future date is valid. That is, adding five years to February 29 (a leap year) results in an invalid date. The following formula adds num_years to date by checking if the date is February 29 and if the future date is not in a leap year.  If these conditions hold true, the formula returns March 1 in the future year. Otherwise, the formula sets the Date to the same month and day num_years in the future.  

The IF statement is checking for the leap year condition.  Replace the date in the formula with the date field to which you want to add the years.   Replace the num_years reference with the actual number of years you want to add.


IF(
  AND(
    MONTH( date ) = 2,
    DAY( date ) = 29,
    NOT( 
      OR( 
        MOD( YEAR( date ), 400 ) = 0, 
        AND( 
          MOD( YEAR( date ), 4 ) = 0,
          MOD( YEAR( date ), 100 ) != 0
        )
      )
    ) 
  ),
  DATE( YEAR( date ) + num_years, 3, 1),
  DATE( YEAR( date ) + num_years, MONTH( date ), DAY( date ) )
)

Adding Months to a Date

Adding months to a date is slightly more complicated as months vary in length and the cycle of months restart with each year. Therefore, a valid day in one month (January 31) might not be valid in another month (February 31). A simple solution is to approximate each month’s length as 365/12 days:

date + ( ( 365 / 12 ) * Number_months )

While this formula is a good estimate, it doesn’t return an exact date. For example, if you add two months to April 30 using this method, the formula will return June 29 instead of June 30. Returning an exact date depends on your organization’s preference. For example, when you add one month to January 31, should it return February 28 (the last day of the next month) or March 2 (30 days after January 31)?
This formula does the following:
  • Returns March 1 if the future month is a February and the day is greater than 28. This portion of the formula performs the same for both leap and non-leap years.
  • Returns the first day of the next month if the future month is April, June, September, or November and the day is greater than 30.
  • Otherwise, it returns the correct date in the future month.


This example formula adds two months to a given date. You can modify the conditions on this formula if you prefer different behaviors for dates at the end of the month.
  DATE(YEAR( date ) + FLOOR( ( MONTH ( date ) + 2 - 1 ) / 12 ),
  MOD( MONTH ( date ) + 2 - 1 + 
    IF( DAY ( date ) > CASE( MOD( MONTH( date ) + 2 - 1, 12 ) + 1, 
      2, 28,
      4, 30,
      6, 30,
      9, 30, 
      11, 30,
      31 ), 1, 0 ), 12 ) + 1,
    IF( DAY( date ) > CASE( MOD( MONTH( date ) + 2 - 1, 12 ) + 1,
      2, 28, 
      4, 30, 
      6, 30, 
      9, 30, 
      11, 30, 
      31 ), 
    1, DAY( date )
  )
)

Adding Days to a Date

If you want to add a certain number of days to a date, add that number to the date directly. For example, to add five days to a date, the formula is date + 5.

date + Number_days 





Salesforce Favorites: Frequently Used Information at Your Finger Tips

Always need reports from a specific folder? Have a report that you run frequently? Have that one Account that you are constantly nurtur...