#Overview
WP Fusion’s Enhanced Ecommerce Addon (available for Plus and Professional license holders) supports sending ecommerce transaction data as Deals to your Brevo account for sales made in:
- WooCommerce
- Easy Digital Downloads
- Event Espresso
- GiveWP
- SureCart
- Gravity Forms
- LifterLMS
- MemberPress
- and Restrict Content Pro
#Getting started
As of the v1.26.0 Enhanced Ecommerce update, WP Fusion supports both Orders and Deals with Brevo.
The default for new sites is Orders, sites with existing pipelines and stages will default to Deals.
#Orders
Orders are a new feature in Brevo that are part of the new E-commerce portal.
The E-commerce dashboard provides a more detailed insight into your store’s performance than was previously possible with Deals.
In most cases, we recommend configuring WP Fusion to create Orders in Brevo, since these more accurately reflect the order experience in WordPress, and have more powerful reporting and filtering features in Brevo.
#Deals
As an alternative to (or in addition to) Orders, WP Fusion can also create “Deals” inside of sales pipelines in Brevo.
Once you install the Enhanced Ecommerce addon, WP Fusion will load your available deal stages from Brevo. You can also refresh the available stages at any time by clicking the Refresh Available Lists & Fields button in the WP Fusion settings.
To begin syncing deals with Brevo you must first select a Deal Stage for new deals from the Enhanced Ecommerce tab in the WP Fusion settings.
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.
#How it works
When a customer checks out on your site, WP Fusion will create a new order and/or deal in Brevo with the order label, date, and invoice total.
This sale data will be associated with the subscriber record who made the purchase.
#WooCommerce order statuses
If you’re using WooCommerce you can also associate WooCommerce order statuses with deal stages in Brevo.
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 Brevo.
Warning: It is recommended not to sync Pending payment orders with Brevo. When this is enabled, WP Fusion needs to create a contact record and a deal in Brevo 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.
Note: By default, running a WooCommerce Orders (Ecommerce addon) export operation from the Advanced settings tab will only export “paid” orders (Processing or Completed). However, if you have enabled additional order statuses for sync to a Brevo stage, then running the export will process those additional statuses as well.
This can be used to export refunded or cancelled orders to Brevo in addition to the paid orders.
#Modifying the API data
WP Fusion supports using filters to modify the data sent to Brevo with an ecommerce order.
#Custom deal fields
At the moment WP Fusion doesn’t have a visual interface for associating WordPress data with custom deal attributes in Brevo.
However you can still make this work using the wpf_ecommerce_sendinblue_add_deal
filter.
In this case we’re going to update the Order URL field, which has an internal name of order_url
, and update it with the edit link to a WooCommerce order.
function my_custom_deal_properties( $deal, $order_id ) {
/* $deal is structured like:
$deal = array(
'name' => 'WooCommerce Order #123',
'linkedContactsIds' => array( 123 ), // the contact ID of the customer.
'attributes' => array(
'deal_description' => 'Cool Product - $100', // the products purchased and prices.
'amount' => 100, // the total amount.
'deal_stage' => 'Completed', // the deal stage.
'close_date' => '2023-05-16', // the order date.
),
); */
$deal['attributes']['order_url'] = admin_url( 'post.php?post=' . $order_id . '&action=edit' ); // adds a custom attribute.
return $deal;
}
add_filter( 'wpf_ecommerce_sendinblue_add_deal', 'my_custom_deal_properties', 10, 2 );
And here in Brevo you can see that when WP Fusion creates the deal, the custom properties are automatically populated: