#Overview
WP Fusion’s Ecommerce Addon (available for Plus and Professional license holders) supports sending ecommerce transaction data as Deals to your Zoho account account, for sales made in:
- WooCommerce
- Easy Digital Downloads
- Event Espresso
- GiveWP
- SureCart
- Gravity Forms
- LifterLMS
- MemberPress
- and Restrict Content Pro
#Getting Started
Once you install the addon, Deals will automatically be added to Zoho when someone makes a purchase on your site. The default stage for new deals is Closed (Won), but you can change this via the Enhanced Ecommerce tab in the WP Fusion settings.
If you’ve just added a new stage, click Resynchronize on the Setup tab to load the latest options into the dropdown.
Because Zoho requires all deals to have a corresponding Account, you will also need to select an account from the Enhanced Ecommerce tab before deals can be created.
#How it Works
When a customer checks out on your site, WP Fusion will create a new deal in Zoho with the order label, date, and order total. This sale data will be associated with the contact record who made the purchase.
#How it Looks
#Products
If you have access to products in Zoho CRM, you’ll have the option to associate your WooCommerce products with existing Zoho products.
To refresh the available options in the product dropdowns, click the Refresh Available Tags and Fields button from the main WP Fusion settings page.
If you do not select a product, a new one will be created automatically in Zoho the first time a customer checks out with that product.
Each time a customer purchases the product, it will be associated with the new deal in Zoho.
Note: Because each product requires a separate API call to create and associate with the deal, this can slow down the order processing time for orders that have many products.
If you are noticing slowness when syncing orders to Zoho, you can disable the Sync Products option on the Enhanced Ecommerce settings tab.
#Video – Enhanced Ecommerce – Zoho
#WooCommerce Order Statuses
If you’re using WooCommerce you can also associate each WooCommerce order status with a deal stage in Zoho. This setting appears under the Addons tab in the WP Fusion settings.
When the order status is updated in WooCommerce, the deal stage will be updated in Zoho.
Warning: It is recommended not to sync Pending payment orders with Zoho. When this is enabled, WP Fusion needs to create a contact record and a deal in Zoho 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 Zoho pipeline, then running the export will process those additional statuses as well.
This can be used to export refunded or cancelled orders to Zoho in addition to the paid orders.
#Modifying the API Data
WP Fusion supports using filters to modify the data sent to Zoho with an ecommerce order.
#Ignore Free Orders
This example bypasses creating a deal for any free orders.
function ignore_free_orders( $data, $order_id ) {
if ( empty( $data['Amount'] ) ) {
return false;
}
return $data;
}
add_filter( 'wpf_ecommerce_zoho_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( $data, $order_id ) {
$order = wc_get_order( $order_id );
$data['Amount'] -= $order->get_total_tax();
$data['Expected_Revenue'] -= $order->get_total_tax();
return $data;
}
add_filter( 'wpf_ecommerce_zoho_add_deal', 'orders_tax_exclusive', 10, 2 );
#Custom Deal Fields
You can add custom fields to your Zoho deals using the wpf_ecommerce_zoho_add_deal
filter. The data structure for Zoho deals includes standard fields like Deal_Name, Amount, Stage etc.
function my_custom_deal_properties( $data, $order_id ) {
/* $data is structured like:
$data = array(
'Deal_Name' => 'WooCommerce Order #123',
'Account_Name' => $account,
'Contact_Name' => $contact_id,
'Closing_Date' => date('Y-m-d'),
'Stage' => $stage,
'Amount' => 123.00,
'Expected_Revenue' => 123.00,
'Description' => $description,
'Currency' => 'USD'
); */
// Add custom field
$data['Custom_Field'] = 'Custom Value';
// Add order edit link
$data['Order_Link'] = admin_url( 'post.php?post=' . $order_id . '&action=edit' );
return $data;
}
add_filter( 'wpf_ecommerce_zoho_add_deal', 'my_custom_deal_properties', 10, 2 );
For more information, see the Zoho documentation on updating records.
#Add Additional Product Data
When syncing products to Zoho, you can modify the product data using the wpf_ecommerce_zoho_add_product
filter:
function modify_product_data( $data, $product ) {
/* $data is structured like:
$data = array(
'Product_Name' => $product['name'],
'Unit_Price' => $product['price']
); */
// Add SKU
$data['Product_Code'] = $product['sku'];
// Add custom field
$data['Custom_Product_Field'] = 'Custom Value';
return $data;
}
add_filter( 'wpf_ecommerce_zoho_add_product', 'modify_product_data', 10, 2 );
Note: Make sure any custom fields you reference are already created in your Zoho CRM before attempting to sync data to them.