Salesforce is a cloud-based customer relationship management (CRM) platform for business and nonprofit organizations. Many publishers and other organizations use Salesforce as a central database of their readers. Read more about Salesforce and what it offers here.

Newspack sites can connect to an existing Salesforce database (called an org in Salesforce parlance), which will allow them to sync customer data to that org on certain user actions.

Currently, the only supported sync trigger is when a user completes a donation through the Donate block (if you haven’t configured donations yet, do so now). When that happens, the user’s contact information will be synced to Salesforce as a Contact, and details on the transaction will be synced as an Opportunity linked to the Contact.

Important: A note on currency

Please ensure that the currency type selected in your WooCommerce settings matches the default currency set in your Salesforce org. When syncing transactions from WooCommerce to Salesforce, the amount of the transaction is reported as a number, but not the type of currency.

So if your WooCommerce account is set to charge in US dollars, but your Salesforce org is set to use pound sterling by default, when a user donates USD $100 the transaction amount will be recorded as GBP £100 in the corresponding Salesforce Opportunity.


Getting Started

First, in your Newspack dashboard, navigate to the Dashboard > Newspack > Reader Revenue. If you’ve selected Newspack as your Reader Revenue platform, you should see a Salesforce tab in this wizard.

This page is where you’ll enter credentials to connect your Newspack site to a Salesforce org. You can’t do anything here without completing some setup on the Salesforce side first, but you’ll need the URL for this settings page shortly, so take note of it now. You can click the link provided to copy the required URL to your clipboard. It should look something like this: https://[SITE URL]/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/salesforce

Tip: Paste this URL to a blank sticky or notepad file so you can copy and paste it easily later.

Setting up Salesforce

You’ll need an existing Salesforce account with an active org database to proceed. If you haven’t set up a Salesforce account, do so now. It’s free for nonprofit organizations, and nonprofits are encouraged to use the Nonprofit Success Pack (NPSP), which adds some tools and standardized database customizations that are more geared toward nonprofits rather than businesses. Newspack can sync with both standard Salesforce orgs and NPSP orgs, so choose whichever option is the best fit for your organization.

Newspack connects with Salesforce through the Salesforce REST API. To enable this connection, you must create a Connected App, which is used to authorize access to the Salesforce org database.

Once you’ve created your Salesforce account and org, follow these steps to create a Connected App to authorize your Newspack site:

  1. After logging into Salesforce, go to the Setup screen by clicking on the cog icon in the upper-right corner and clicking Setup.
  1. Click on Apps > App Manager in the left sidebar.
  1. Click the New Connected App button to create a new Connected App. The following fields are required:
    • Connected App Name – This identifies the app in the Salesforce UI only.
    • API Name – This identifies the app to the Salesforce API. This can be anything, but is usually a restricted-character version of the Connected App Name.
    • Contact Email – Contact info for the Salesforce org manager, in case Salesforce needs to reach out to someone at the organization about API usage.
  2. Check the Enable OAuth Settings box to expand that section.
  3. For Callback URL, this is the URL you copied earlier—the full URL of the Configure Salesforce page on the Newspack site. Again, this will look something like: https://[SITE URL]/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/salesforce
    • This URL is important! Verify in a new tab that this URL brings you back to the Configure Salesforce page in your Newspack dashboard. Entering it here tells Salesforce that this URL is safe to use for authorizing access to your org database.
  4. For Selected OAuth Scopes, add the permission scopes the Newspack site needs to connect. To add a scope, click an item in the left-hand select box, then click “Add.” Add the following scopes:
    • Access and manage your data (api)
    • Perform requests on your behalf at any time (refresh_token, offline_access)
    • Provide access to your data via the web (web)
  1. After filling in the required fields and adding the necessary permission scopes, click Save to save the Connected App settings.
    • Allow up to an hour or more for the Connected App to propagate throughout Salesforce’s systems.
  2. After creating a Connected App, you can view its settings at any time by going back to the Setup screen, going to Apps > App Manager, then clicking the small down arrow icon on the right side of the table next to your Connected App, and View. (Or click Edit to edit any of the Connected App’s settings.)
  3. This is where you’ll find the Consumer Key and Consumer Secret that you’ll need to enter into the Newspack wizard to connect the site to this Salesforce org.

Connecting to Salesforce from Newspack

Back in the Newspack dashboard, navigate back to the Configure Salesforce wizard at Dashboard > Newspack > Reader Revenue. Then follow these steps to complete the connection:

  1. Enter the Consumer Key and Consumer Secret from the Salesforce Connected App’s screen, then click Connect.
    • If you get an error message after clicking Connect, you may need to wait longer for the Connected App to finish propagating on the Salesforce side.
  2. If the Newspack site is able to successfully communicate with the Salesforce app, you should see the following screen (you may be asked to log into Salesforce first if not already logged in):
  1. After clicking Allow, you’ll be automatically redirected back to the Newspack wizard and should see this screen after a moment indicating that the Newspack site is now connected to Salesforce:

Now, anytime a user completes a donation through the Donate block and the subsequent WooCommerce checkout screen, the donor’s contact information and information on the donation transaction will be synced to corresponding records in Salesforce.

Note: Your site front-end must be publicly accessible in order for the sync to work. If you’re testing a sync on a site that has something like the Password Protected plugin active, you must disable the plugin before the sync can work. To ensure that the site is public, try completing a test donation as a non-logged-in user, using a different browser than the one you use to manage the site.

After establishing a connection, you can clear your Salesforce credentials and stop syncing data to Salesforce by clicking Reset. Note that once you do this, Newspack will delete your Salesforce credentials from its database and you’ll need to either fetch them from Salesforce again or create a new Connected App to reconnect.

Contacts in Salesforce

You can find your contacts in Salesforce by clicking on the 9-dot menu icon in the upper-left corner and clicking on Sales Console:

From there, click the down arrow icon next to the first tab and select Contacts, then click All Contacts to view your first synced contact. Click on the Details tab in a contact to view the synced data.

Donation transactions completed by this Contact will be linked as Opportunities and shown in the Opportunities sidebar panel:

Each transaction will have its own Opportunity record. Recurring donations (monthly or annual) are considered separate transactions, and will be recorded as a discrete Opportunity record each time the donor’s card is charged.

You can also view Opportunities separately from the Sales Console. When viewing an Opportunity record, the linked Contact can be found in the Contact Roles panel.