NationBuilder Enhanced Ecommerce


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.

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.

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

Donor badge is displayed on the Person record in NationBuilder
Donations are displayed on the Person details view
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?