NationBuilder Enhanced Ecommerce

#Overview

WP Fusion’s Ecommerce Addon (available for Plus and Professional license holders) now supports sending ecommerce transaction data to your NationBuilder account for sales or donations made in:

#Getting Started

After you install the Ecommerce Addon (or update to the latest version), WP Fusion will begin sending transactions from any of the plugins listed above to your NationBuilder account, as donations.

#General Settings

WP Fusion allows you to specify a custom tracking code slug for donations synced from WordPress. This setting is found at Settings » WP Fusion » Enhanced Ecommerce.

Screenshot of WP Fusion settings page displaying the Enhanced Ecommerce tab. Tracking Code Slug field shows wpfusion. A note clarifies its role in differentiating donation sources in NationBuilder, highlighting seamless CRM integration with WP Fusion.

If a tracking code slug is specified, it will be displayed in the donations list in NationBuilder. You can use tracking codes to differentiate between different donation sources.

A donation summary highlights $290.48 donated, with $0 pledges and expenditures. Two successful donations are listed: $93.86 and $7.00, each linked to receipts. Dates and Jack Arturos name appear, seamlessly integrated using WP Fusion CRM integration for streamlined tracking.
Tracking codes are displayed in the donations list in NationBuilder

#How it Works

When a customer checks out on your site, WP Fusion will create a new donation NationBuilder with the order date and total value. This donation data will be tied to the Person record who made the donation.

#How it Looks

Profile summary for Jack Arturo, based in Lima, Peru, with contact info including phone and email. Tags indicate $30 donated, volunteer, and supporter status. Works with Very Good Plugins, specializing in WP Fusion CRM integration.
Donor badge is displayed on the Person record in NationBuilder
A screenshot of a finances dashboard with WP Fusion CRM integration highlights donations. It lists two entries: $10 on October 6, 2019, and $20 on October 7, 2019—both marked as Success and added by Jack Arturo. Tabs at the top navigate sections like Dashboard and Profile.
Donations are displayed on the Person details view
A screenshot of a donation confirmation page reveals a $10.00 credit card donation on October 8, 2019. The interface, seamlessly integrated with WP Fusion CRM, offers options like Dashboard, Settings, Custom fields, Printable receipt, and Webhooks alongside a note section for additional details.
The integration name and transaction ID are shown in the donation notes

#Video – Enhanced Ecommerce – NationBuilder

#Modifying the API data

WP Fusion supports using filters to modify the data sent to Nationbuilder with an ecommerce order.

The filter for Nationbuilder is the wpf_ecommerce_nationbuilder_add_donation filter.

In this case example we’re going to set the name of the employer for the donation based on the value entered on the Give donation form, and mark the donation as a corporate contribution.

function my_custom_deal_properties( $deal, $order_id ) {

	/* $deal is structured like:

	$deal = array(
		'donor_id'              => 123,
		'amount'                => '$100',
		'amount_in_cents'       => 10000,
		'payment_type_name'     => 'Credit Card',
		'payment_type_ngp_code' => 'D',
		'succeeded_at'          => '2023-05-30T15:19:21',
		'note'                  => 'Give payment #1234',
	); */

	$payment = new Give_Payment( $order_id );
	$donor   = new Give_Donor( $payment->get_donor_id() );

	$company_name = $donor->get_company_name();

	if ( ! empty( $company_name ) ) {
		$deal['corporate_contribution'] = true;
		$deal['employer']               = $company_name;
	}

	return $deal;

}

add_filter( 'wpf_ecommerce_nationbuilder_add_donation', 'my_custom_deal_properties', 10, 2 );

For more information on the available fields, see the Nationbuilder API documentation.

Was this helpful?