#Overview
WP Fusion’s Enhanced Ecommerce Addon (available for Plus and Professional license holders) supports sending ecommerce transaction data as deals to your Groundhogg CRM for sales made in:
- WooCommerce
- Easy Digital Downloads
- Event Espresso
- GiveWP
- Gravity Forms
- LifterLMS
- MemberPress
- Restrict Content Pro
- and SureCart
WP Fusion’s enhanced ecommerce integration with Groundhogg is supported when connected to Groundhogg either on the same site, or via the REST API.
#Getting started
Once you install the addon, the Enhanced Ecommerce tab will appear in the WP Fusion settings. Select a default pipeline and stage from the dropdown to enable the integration.
If you’ve just added a new pipeline or stage, click Resynchronize Available Tags and Fields at the top of the page to load the latest options from Groundhogg.
#How it works
When a customer checks out on your store, a new deal will be created in your selected Groundhogg pipeline and stage.
The deal title will be name of the order in WooCommerce (or other supported ecommerce plugin), and the deal value will be set to the total amount of the sale.
The deal will be associated with the contact who made the purchase, and any purchased products and line items will be attached to the deal.
#WooCommerce order statuses
If you’re using WooCommerce you can also associate WooCommerce order statuses with deal stages in Groundhogg.
This setting appears under the Enhanced Ecommerce tab in the WP Fusion settings.
When the order status is updated in WooCommerce, the deal stage will be updated in Groundhogg.
Warning: It is recommended not to sync Pending payment orders with Groundhogg. When this is enabled, WP Fusion needs to create a contact record and a deal in Groundhogg as soon as the pending order is created in WooCommerce, and then update it less than a second later when the payment is processed.
This slows down your checkout with many duplicate API calls and in most cases isn’t necessary. A more performant method of tracking incomplete payments is to use Abandoned Cart Tracking.
#Modifying the API data
WP Fusion supports using filters to modify the data sent to Groundhogg with an ecommerce order.
#Ignore free orders
This example bypasses creating a deal for any free orders.
function ignore_free_orders( $deal, $order_id ) {
if ( empty( $deal['deal_value'] ) ) {
return false;
}
return $deal;
}
add_filter( 'wpf_ecommerce_groundhogg_add_deal', 'ignore_free_orders', 10, 2 );
#Exclude taxes
This example subtracts the amount of tax paid (if applicable) from the deal total.
function orders_tax_exclusive( $deal, $order_id ) {
$order = wc_get_order( $order_id );
$deal['deal_value'] -= $order->get_total_tax();
return $deal;
}
add_filter( 'wpf_ecommerce_groundhogg_add_deal', 'orders_tax_exclusive', 10, 2 );