Search Results

Modern Events Calendar

[…] any ticket in Modern Events Calendar, you’ll see two options added by WP Fusion. Note that if you’ve just created a new ticket you’ll need to save the event before the settings appear. The settings are: Apply Tags: These tags will be applied in your CRM when someone purchases the ticket. Add Attendees: By default WP […]

Read More

Open CRM contacts in new window

Hi, Nothing urgent, but when viewing the WPF logs, sometimes clicking a contact ID will open it in a new window, and sometimes it will open in the same window. I would request that all CRM ID links open in a new window and that there is a ‘new window’ icon next to the […]

Read More

How to Connect Salesforce to WordPress

[…] the access will expire when your refresh token expires. To prevent the refresh token from expiring, go to Salesforce and navigate to Setup » Connected Apps OAuth Usage and click Install next to WP Fusion. Refresh Token Policy By default WP Fusion is installed with an indefinite refresh token. However, we have seen some […]

Read More

WooCommerce

[…] site, and tag them based on products purchased. You can also use WP Fusion to restrict access to products and product variations, as well as track coupon usage, and auto-apply coupons based on CRM tags. With supported platforms, WP Fusion’s Enhanced Ecommerce addon can also sync revenue data, deals, and/or invoices from WooCommerce to your CRM’s ecommerce system. And WP Fusion’s Abandoned Cart addon can track abandoned WooCommerce carts, allowing you to follow up with customers using automated sequences in your CRM. Having trouble with WP Fusion’s WooCommerce integration? Check out our troubleshooting guide. Syncing customer data and custom fields By default, when a customer checks out on your store, a new contact will be created in your CRM with their first name, last name, and email. You can enable additional fields for sync from the Contact Fields tab in the WP Fusion settings. By default all of the billing and shipping fields will be available for sync. If you’re using a custom checkout field editor plugin such as WooCommerce Checkout Field Editor, those fields will also be displayed. Order fields WP Fusion has the ability to sync some details about the customer’s most recent order to custom fields in your CRM. Those can be enabled under the WooCommerce Order heading in the contact fields list. WP Fusion supports syncing details about a customer’s most recent order to custom fields or properties in your CRM The available fields are: Last Order Total: The total order value Order Notes: Any notes added by the customer to the order at checkout Last Order Date: The date of the customer’s most recent order Last Coupon Used: The coupon code used at checkout Last Order ID: The ID of the order Last Order Payment Method: The title of the payment method used, for example “Stripe”, “PayPal” Last Order Shipping Method: The title of the shipping method used, for example “Flat Rate”, “UPS Express”, etc Attribute fields If you’re selling variable products, WP Fusion also supports syncing selected attributes to custom fields in your CRM. Under the WooCommerce Attributes header you’ll see all of the available attributes from your products. When a customer checks out the selected attribute will be stored in the corresponding custom field. General settings WP Fusion has some general settings for WooCommerce. These can be found on the Integrations tab in the WP Fusion settings. Those options are: Apply Tags to Customers: The tags specified here will be applied to all WooCommerce customers, when an order is placed. Hide Restricted Products: If you’ve configured access rules on an individual product, turning on this option lets you completely hide products from your store if the user doesn’t have the required tags. Restricted Product Error Message: The message here will be displayed when someone tries to add a restricted product to their cart. Asynchronous Checkout: When this is enabled WP Fusion runs WooCommerce order actions in the background, after the checkout has completed. This makes the checkout process faster, but it can sometimes have problems with caching or security plugins. Hide Coupon Field: If you’re using automatic discounts, enabling this option lets you hide the coupon input field on the checkout. Apply Tags – Left Review: The tags specified here will be applied when a user leaves a review on a product.   Automatic tagging With some CRMs WP Fusion supports automatically generating and applying tags based on certain variables when someone makes a purchase in WooCommerce. If your CRM supports this feature, these settings will appear on the Integrations tab in the WP Fusion settings: The Tag Prefix will be appended to any of the automatically generated tags. This field also accepts the shortcode to dynamically insert the status of the order. For example if someone purchases a product Widget and the order status is Processing, you could set the Tag Prefix field to Purchased – – This would apply the tag Purchased – Processing – Widget. Automatic tags will be applied when an order is originally placed, but unlike tags configured on individual products, they will not be removed if the order is later refunded or cancelled, or if a subscription is cancelled. They are only applied, not removed. Order status tagging WP Fusion also includes an option where you can apply tags to a customer in your CRM when their order status changes in WooCommerce. For example if you manually mark an order as “Shipped”, an automated email could be sent through your CRM to customers. The tags in this section will be applied to the customer when their order status is changed. These tags are not automatically removed. For example the tags for On Hold will not be removed if the order is later changed to Completed. If you’d like to remove the tags you can do so via an automation in your CRM. Warning: It is recommended not to sync Pending payment customers with your CRM. When this is enabled, WP Fusion needs to create a contact record and apply a tag as soon as the pending order is created in WooCommerce, and then update it and apply additional tags 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. Email Optins WP Fusion includes an option to add an email optin checkbox to the WooCommerce checkout. Note: The email opt-in checkbox is not compatible with the new WooCommerce checkout block. To collect email optin consent via WP Fusion you will need to use the shortcode. This can be enabled by checking the box for Email Optin in the main WP Fusion settings, under the Integrations tab. The settings are: Email Optin: This enables the email optin checkbox on the checkout form. Hide If Consented: When this is checked, the email optin checkbox will be hidden from any customers who have already consented to marketing. Email Optin Message: This is the message displayed with the email optin checkbox. Email Optin Default: Whether the optin checkbox defaults to Checked or Un-checked. Email Optin Tags: You can select one or more tags to be applied in your CRM when the email optin box is checked. As an alternative to applying tags, you can also sync the value of the optin checkbox to a custom field in your CRM, by enabling the email_optin field for sync at Settings » WP Fusion » Contact Fields » WooCommerce Customer. When enabled the optin checkbox will be displayed next to the Place Order button on the checkout. In the Contact Fields settings, you can set the field type for the email optin field to either checkbox or date. The default is checkbox. When set to checkbox, if the optin checkbox is checked, it will sync a true value to your CRM (works best with checkboxes or email consent fields, but can be used in text fields as well). If the field format is set to date, it will sync the current date and time to your CRM. This works best with date or datetime fields. Note: If the opt-in checkbox is unchecked, it will be saved to the order record, but nothing will be synced, and customers will not be unsubscribed from marketing. This is by design and relates to the EU GDPR’s position that inaction should not be seen as a conscious decision. For more control over the checkout fields, we recommend WooCommerce Checkout Field Editor. Only sync confirmed customers Because WP Fusion uses tags applied at checkout to unlock content, enroll users into courses, and otherwise deliver access to purchased products— all customers will be synced with your CRM, regardless of whether or not they’ve consented to marketing. It’s then up to you to use the tag and/or custom field value in your campaigns and automations to exclude contacts from marketing if they haven’t opted in. On some simple stores, you may want to completely disable the sync of customers with your CRM if they haven’t opted in to marketing. This can be achieved with the following filter, added to your functions.php file: function do_not_sync_unconfirmed_customers( $customer_data ) { if ( empty( $customer_data ) ) { return false; } return $customer_data; } add_filter( ‘wpf_woocommerce_customer_data’, ‘do_not_sync_unconfirmed_customers’ ); In this case no data will be sent to your CRM unless the customer opts in to marketing on the checkout form. You will not be able to apply tags to them, and they will not be able to access any content protected by WP Fusion. Order management When editing any WooCommerce order in the admin, you will see a meta box indicating that order’s status with WP Fusion. The meta box will show whether or not the order was processed by WP Fusion, and the customer’s contact ID in your CRM. If you have email optins enabled, the customer’s optin status will be shown. If you’re using the Enhanced Ecommerce addon you will also see the corresponding invoice ID (or order ID) in your CRM’s sales pipeline. To manually process an order again (for example to fix an invalid field value), click the Process WP Fusion actions again button. Order notes The order notes in the order sidebar will show when an order was processed by WP Fusion, and also any corresponding invoices created by the Enhanced Ecommerce addon. In cases where there were errors during checkout, these will also be recorded to the order notes, as well as the WP Fusion activity logs. Order status column WP Fusion adds a status column to the main WooCommerce orders table. Hovering over the icon will display a tooltip which tells you when the order was processed by WP Fusion, and also gives you a link to view the customer’s contact record in your CRM. The icon can change colors depending on the status of the sync with your CRM: If the icon is orange, the order was fully processed by WP Fusion. If the icon is grey, the order was not processed by WP Fusion If the icon is half-filled, this means that a contact record was created, but the Enhanced Ecommerce addon didn’t successfully process the order. If you don’t want to see order sync statuses in the orders table, you can disable it by un-checking the WP Fusion Status checkbox in the Screen Options menu at the top of the page. Tagging customers WP Fusion gives you a variety of ways to tag your WooCommerce customers in your CRM. The simplest method is to tag based on the product purchased, but you can also apply tags to all customers as a global setting, or based on product categories. Note: Most CRMs that WP Fusion supports use “tags” to segment contact records, but the interfaces may vary depending on what your platform uses for segments. For example with HubSpot and Brevo you’ll see “lists”, or with MailerLite you’ll see “groups”. This is just a label difference and the end functionality is the same. Product setup When WP Fusion is active, you’ll see a new tab on the WooCommerce product settings where you can specify tags to be applied when that product is purchased, refunded, or when an initial transaction fails. The standard settings are: Apply tags when purchased:  These tags will be applied in the CRM when the product is purchased. They will be removed automatically if the order is refunded or cancelled. Apply tags when refunded: These tags will be applied in the CRM when an order is refunded. Apply tags when transaction failed: These tags will be applied when an initial payment fails, or when an order status changes to Failed. They will be removed when a successful payment is received. You may see additional fields for Subscriptions or Deposits if you are using those plugins. If the Abandoned Cart Addon is active you can also configure tags to be applied when the product is left in an abandoned cart. Variable products If you’re using variable products, you can also specify tags to be applied at purchase per-variation. These are visible when editing the variation, alongside the price and other details. WP Fusion also gives you the option to only show specific variations to users based on their tags. This can be used to offer special products or pricing to existing members. Category tagging You can also specify tags to be applied at the category level. To do this click Edit on any product category, and you’ll see a setting where you can specify tags to be applied. Bulk editing There may be situations where you need to bulk edit the tags that are configured on your WooCommerce products. For bulk editing, we recommend Setary. Setary connects to your WooCommerce store (or multiple stores) and allows you to edit WooCommerce product details in bulk, in an intuitive spreadsheet interface. Setary’s WP Fusion integration allows you to configure the settings for Apply Tags, Apply Tags – Refunded, and Apply Tags – Failed for all of your products. Setary’s WP Fusion integration lets you configure tags for your products in bulk, even across multiple WooCommerce stores. For more information, see the Setary documentation. As an alternative to Setary, WPSheetEditor also provides a free WP Fusion addon to customers of their WooCommerce Products Spreadsheet plugin. Quickly set up WP Fusion for many products using WPSheetEditor You can read a tutorial on bulk editing WP Fusion tag rules with WPSheetEditor here. Refunds If an order is marked Refunded or Cancelled in WooCommerce, the tags specified in Apply tags when purchased will automatically be removed. You can also optionally specify tags to be applied when an order is refunded using the Apply tags when refunded setting. Note that if you refund a WooCommerce Subscriptions renewal payment and the user’s subscription is still active, no tags will be modified. This is to help in cases where a user might have signed up or been charged twice and you need to refund the duplicate order, without revoking access. If you want access to be revoked when refunding a renewal payment, it’s best to cancel the subscription first. You can also automatically remove tags when a subscription is cancelled by checking the Remove Tags box. For more information see the WooCommerce Subscriptions documentation. Coupons and Discounts While editing any coupon, you can specify tags to be applied to the customer if the coupon is used. Restricting access to coupons You can require a user to be logged in and to have a specific tag to use a coupon code. This can be set from the Required Tags setting on the Usage Restriction tab in the coupon settings. Using WP Fusion you can restrict access to coupons based on a user’s tags in your CRM. Auto-applying discounts You can also automatically grant coupons to customers based on their tags in your CRM. If the user has any one of the specified tags, the discount will be applied when they add a product to their cart. This feature also works with our auto-login links. In cases where the user has more than one tag linked to a discount, the discount with the highest amount will be applied first. If the cart value has already been discounted to zero, no additional automatic discounts will be applied. Discount labels You can optionally override the coupon labels shown on the cart and at checkout. The Discount label is displayed in the order summary. Custom discount label in the order summary. By default this will be the coupon code of the applied coupon, but here we’ve overridden it to say “Discount”. You could set this to say something like “Member Discount” or “Loyalty Program”. The Discount message is shown at the top of the cart or checkout when the coupon is applied. By default this will say “Coupon code applied successfully.” Here we’ve overridden it to say “You received a discount!” Product Availability You have the option to restrict access to a product unless a user has a certain tag applied to their account. This is a great way to offer up-sell products or add-ons for your existing users. For more information on restricting content, see the documentation on meta box setup. You can restrict access to WooCommerce products using tags or lists in your connected CRM. If you specify a redirect in the WP Fusion meta box, customers who attempt to view the product will be redirected to the page or URL you’ve specified. If you don’t specify a redirect, the product will be visible, but the Add To Cart button will be disabled. Customers who attempt to add the product to the cart will be shown the message set in the General settings in the Restricted Product Error Message option. If a WooCommerce product is protected by a tag and no redirect is set, the Add To Cart button will be disabled. You can similarly restrict access just to individual product variations via the variation settings. Abandoned cart tracking WP Fusion’s Abandoned Cart addon (available to Plus and Professional license holders) can capture customer details on the WooCommerce checkout form and sync them to your CRM before checkout has been completed. For logged-in users or identified visitors, the addon can even trigger abandoned cart sequences when a product is added to the cart, even if the customer never visits the checkout. You can then use tags and automations in your connected CRM to follow up with customers who started but didn’t complete checkout. With WooCommerce you can specify product-specific abandoned cart tags from the WP Fusion panel while editing any product. WP Fusion allows you to apply tags in your CRM when a customer begins to check out with any WooCommerce product or variation. You can also specify variation-specific tags when editing any variation. For more information on tracking abandoned carts with WooCommerce, see the Abandoned Cart Tracking Overview. Enhanced Ecommerce WP Fusion’s Enhanced Ecommerce addon (available to Plus and Professional license holders) can sync WooCommerce orders to supported CRMs and email marketing platforms. Deep Data from WooCommerce showing on the contact record in ActiveCampaign With WooCommerce, the Ecommerce Addon will send enhanced ecommerce data for all orders, including support for products, variations, quantities, discounts, shipping, and taxes. Products In CRMs that have Products as separate entities from Orders, you can associate your WooCommerce products with CRM products by selecting them from the product dropdowns. Variable products can be associated within the individual variations. Sales pipelines With CRMs that support sales pipelines, like Brevo, HighLevel, HubSpot and Zoho, you can also map WooCommerce order statuses with individual pipelines and stages. This can be found under the Enhanced Ecommerce settings. Map WooCommerce order statuses to HubSpot pipelines with WP Fusion. When the order status is updated in WooCommerce, the deal stage will be updated in your CRM. Warning: It is recommended not to sync Pending payment orders with your CRM. When this is enabled, WP Fusion needs to create a contact record and a deal in the CRM 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. Supported platforms The CRMs supported by Enhanced Ecommerce are listed below. Click on each to learn more about the capabilities of the integration. ActiveCampaign AgileCRM Brevo Drip HighLevel HubSpot Infusionsoft / Keap MailerLite NationBuilder Ontraport Salesforce Event tracking Using the Event Tracking addon, you can track WooCommerce product purchases as events in supported CRMs. Events can be configured in two places. On an individual product, on the WP Fusion settings tab: Event tracking can be configured on the WP Fusion tab when editing any WooCommerce product. Or in the Event Tracking global settings: Event tracking can also be configured globally at Settings » Event Tracking. The available triggers for event tracking with WooCommerce are: Purchased Product: Triggered each time a single product is purchased. Order Placed: Triggered each time a WooCommerce order is placed. Order Status Changed: Triggered when a WooCommerce order status changes. Syncing historical orders If you already have an existing WooCommerce store, you can use WP Fusion to sync all historical orders to your CRM. First configure your products with any tags you’d like to be applied when purchased. Then navigate to Settings » WP Fusion » Advanced and scroll down to the Batch Operations section. Select “WooCommerce orders” from the list of options, and click Create Background Task. WP Fusion will go through all of your orders (from oldest to newest), adding or updating contacts in your CRM as necessary, and tagging them based on the products purchased. A status bar will appear at the top of the page indicating the progress. By default, WP Fusion will only export orders that weren’t already successfully processed by WP Fusion. If you un-check Skip already processed orders, WP Fusion will export all of the orders on your site, regardless of whether they’ve already been synced. In the case of refunded or cancelled orders, any tags configured in the Apply tags when refunded setting will be applied. Developers WP Fusion’s WooCommerce integration is very developer friendly. If you open the integration file in /wp-fusion/includes/integrations/class-woocommerce.php you’ll find many actions and filters that allow you to modify what data is synced with your CRM (and when). Some general notes: HPOS WP Fusion and the Enhanced Ecommerce addon both support WooCommerce High Performance Order Storage. Order statuses By default WP Fusion processes a WooCommerce order when its status is changed to either processing or completed. When an order is “processed”, a contact record is created in your CRM, and any tags configured on the products (and elsewhere) are applied. There may be situations in which you need to process an order at a different status. For example maybe you want to apply tags that grant access to content while an order is still in pending status (i.e. before a payment has been received). Register additional statuses for sync You can register additional statuses by hooking into the woocommerce_order_status_{$status} action and calling wp_fusion()->integrations->woocommerce->process_order( $order_id ). function wpf_add_custom_order_status() { // Process “pending” status orders add_action( ‘woocommerce_order_status_pending’, array( wp_fusion()->integrations->woocommerce, ‘process_order’ ) ); // OR, alternatively, on a custom order status “tbh-unpaid” // add_action( ‘woocommerce_order_status_tbh-unpaid’, array( wp_fusion()->integrations->woocommerce, ‘process_order’ ) ); } add_action( ‘wp_fusion_init’, ‘wpf_add_custom_order_status’ ); Note that the woocommerce_order_status_* hooks are triggered when an order status is changed to that status. If you wish […]

Read More

Scheduled Synchronization Using Cron

[…] you’re running a Resync Tags operation on 1,000 users daily, your site will be slowed down for about 80 minutes every day. That’s not the end of the world if you schedule the operation during the middle of the night. However, if you have 10,000 users, the operation would be running for 13 hours of […]

Read More

wpf_crm_object_type

[…] types in addition to contacts (like Leads). You can override WP Fusion to interface with a different object type via a filter in your functions.php file. Changing the object type will also reset the fields available for syncing. After changing the object type, please reload the available fields by going to Settings » WP Fusion » Setup and clicking the blue Resync Available Tags & Fields button. Salesforce For example, to interface with Salesforce’s “leads” component, you would use the following: add_filter( ‘wpf_crm_object_type’, function( $object_type ) { return ‘Lead’; }); Note: As of WP Fusion 3.41.6, it’s now possible to set the object type for Salesforce without a code snippet. The object type can be set from the Object Type dropdown on the Setup tab in the settings. Zoho To interface with Zoho’s “leads” component, you would use the following: add_filter( ‘wpf_crm_object_type’, function( $object_type ) { return ‘Leads’; }); Ontraport Ontraport uses numeric IDs for object types. The default type is 0 for contacts. To override that, pass the ID of your custom object into the filter. add_filter( ‘wpf_crm_object_type’, function( $object_type ) { return 8; }); Can WP Fusion interface with multiple object types at the same time? The short answer is no. That’s because WP Fusion syncs your WordPress users bidirectionally with the selected object type in your CRM. That’s usually Contacts, but could also be Leads or a custom object type. If you take a hypothetical scenario where WP Fusion is configured to sync with both Contacts and Leads at the same time: A new Lead is created in Zoho CRM A webhook syncs the Lead back to a new WordPress user account The user updates their profile, which creates a Contact in Zoho Now you have two duplicate records, one Lead and one Contact, both linked to the same WordPress user Or Email address is updated on [email protected]’s lead record The changed email address is loaded to Jane’s WordPress user account WP Fusion syncs the changed email address to Jane’s contact record Obviously it doesn’t do any good to have two separate CRM objects that are kept in sync with eachother, since the records will be identical. And it will slow down your WordPress site having WP Fusion constantly connecting to your CRM to sync the objects with eachother. Conditionally switching object types An exception to that is switching the object type temporarily, just for certain operations. For example maybe you have WP Fusion syncing your users bidirectionally with Contacts in your CRM, but you want all Gravity Form submissions to create a new Lead (with a one-way sync). function my_gform_after_submission( $entry, $form ) { if ( ! function_exists( ‘wp_fusion’ ) ) { return false; // Make sure WP Fusion is running } // Gets the first name and last name from field ID 5, and email from field ID 6 $contact_data = array( ‘FirstName’ => rgar( $entry, ‘5.3’ ), ‘LastName’ => rgar( $entry, ‘5.6’ ), ‘Email’ => rgar( $entry, ‘6’ ), ‘Company’ => ‘CompanyName’, ); $lead_id = wp_fusion()->crm->add_object( $contact_data, ‘Lead’ ); } // Replace “1” with the ID of the form add_action( ‘gform_after_submission_1’, ‘my_gform_after_submission’, 10, 2 ); This example runs after a Gravity Form […]

Read More

EDD Recurring Payments

If you’re using the EDD Recurring Payments extension, WP Fusion provides additional options for applying tags based on changes in a user’s subscription status. You can then use these tags to trigger automation sequences in your CRM to remind users to update their credit card information, offer discounts on subscription renewals, or anything else you […]

Read More

FooEvents

WP Fusion integrates with FooEvents to allow you to add event attendees as contacts to your CRM of choice. You can also apply tags based on the event ticket purchased, and sync event details to custom fields in your CRM, such as Event Date, Venue, and Booking Time. Applying tags to customers WP Fusion allows […]

Read More

BuddyPress

[…] your BuddyPress members with leading CRMs and marketing automation tools, and allows you to apply tags in your CRM based on member activity, as well as personalize the member experience using tags and automations in your CRM. WP Fusion also supports the BuddyBoss Platform with the same features. For information on WP Fusion’s integration […]

Read More

Detecting and Syncing Additional Fields

If you’re reading this page then you’re probably trying to sync a field value with your CRM that isn’t currently supported by WP Fusion. While WP Fusion can sync any data from WordPress to contact records in your CRM, it does not work “auto-magically” with every piece of data you see in your WordPress admin. That has to do with where your field data is stored. We can break the kinds of data that WP Fusion syncs into three categories: Data from the normal user tables – Works great with no extra setup User data that’s in a different table – Requires some work Data that’s calculated or not related to a specific user – Can be difficult Normal tables WP Fusion can automatically detect and sync any data found in the wp_users and wp_usermeta database tables bidirectionally with any fields in your CRM. Syncing data between just two tables (your users and your CRM) is automatic and requires no extra setup These tables are the standard place where most plugins store data relating to a specific user. So even if WP Fusion doesn’t have a specific integration with a plugin, it’s likely the fields from that plugin will still show up under the Additional Fields section in the Contact Fields settings, and can be synced with your CRM without any extra work. Note: To build the list of Additional Fields, for performance reasons WP Fusion only scans the usermeta of your own admin user. If you’ve just added a new field and it’s not showing, try saving some data in that field for your own admin user. User data that’s in a different table Some plugins, like BuddyPress, store user profile data in different database tables. When we talk about WP Fusion having an “integration” with a membership plugin (like the ones listed here), that means WP Fusion has additional code to: Detect the available fields from that plugin’s custom tables, and list them in the Contact Fields in the settings Extract the data from the custom tables and sync it to your CRM Detect when data has been loaded from your CRM, and if that data belongs in a custom table, store it there For example with BuddyPress, let’s say we have a custom XProfile field for Favorite Color, in the wp_bp_xprofile_data table. How that sync looks visually is something like: Syncing data between your CRM and multiple WordPress tables can require some extra attention if using a non-supported plugin And then in the code, that requires three functions: Detect the custom fields and list them for sync Step one is figuring out which fields are available, and using the wpf_meta_fields filter to register them as available for sync. With BuddyPress we make use of the bp_xprofile_get_groups() function, like function example_prepare_buddypress_fields( $meta_fields ) { // Get the field groups $groups = bp_xprofile_get_groups( array( ‘fetch_fields’ => true, ) ); foreach ( $groups as $group ) { foreach ( $group->fields as $field ) { // Register the field in the list using the ID and label $key = ‘bbp_field_’ . $field->id; $meta_fields = array( ‘label’ => $field->name, ‘type’ => $field->type, ); } } return $meta_fields; } add_filter( ‘wpf_meta_fields’, ‘example_prepare_buddypress_fields’ ); Which makes the fields show up for sync in the settings like this: Extract the data from the custom table and sync it to the CRM When a user registers or a Push User Meta operation is run, WP Fusion tries to get all of the data it can out of the database for that user. That data is then passed through the wpf_get_user_meta filter, which allows us to merge in data from different sources. For example the code to load and sync the XProfile data would look like: function example_get_buddypress_fields( $user_meta, $user_id ) { $profile_data = BP_XProfile_ProfileData::get_all_for_user( $user_id ); // Get the profile data and merge it into the user_meta foreach ( $profile_data as $field ) { $key = ‘bbp_field_’ . $field; $user_meta = $field; } return $user_meta; } add_filter( ‘wpf_get_user_meta’, ‘example_get_buddypress_fields’, 10, 2 ); Load data from the CRM into the custom tables Then, going the other direction, we want to make sure that data loaded from the CRM is properly stored in the custom database table, not the wp_usermeta table. For that we make use of the wpf_set_user_meta filter. For example with BuddyPress, that code looks like: function example_set_buddypress_fields( $user_meta, $user_id ) { foreach ( $user_meta as $key => $value ) { if ( strpos( $key, ‘bbp_field_’ ) === 0 ) { // If the field key starts with bbp_field_ $field_id = str_replace( ‘bbp_field_’, ”, $key ); $field = new BP_XProfile_ProfileData( $field_id, $user_id ); $field->value = $value; $field->save(); // Save the field to the wp_bp_xprofile_data table unset( $user_meta ); // unset() the value so it’s not saved to wp_usermeta } } return $user_meta; } add_filter( ‘wpf_set_user_meta’, ‘example_set_buddypress_fields’, 10, 2 ); And there you have it. With those three code snippets, you can register and bidirectionally sync a user meta field from a custom database table. Data that’s not in a table There may be some things you’d like to sync with your CRM that aren’t actually stored in any one place. Some examples: Customer lifetime value Most recently commented post Most recent quiz score Subscription renewal date With things like this, they aren’t actually stored in any one place in the database that can be directly synced with your CRM, you’d have to write the code to calculate the values. Register the field For example, let’s say you want to sync a WooCommerce customer’s lifetime value with your CRM. First register the field in the WP Fusion settings. function example_prepare_ltv_field( $meta_fields ) { $meta_fields = array( ‘label’ => ‘Lifetime Value’, ‘group’ => ‘woocommerce’, ‘pseudo’ => true, ); return $meta_fields; } add_filter( ‘wpf_meta_fields’, ‘example_prepare_ltv_field’ ); In this example we’ve set pseudo to true to indicate that the field doesn’t really exist. This is optional but it stops WP Fusion from loading the value back from your CRM, and filling up your database with unnecessary meta values. Calculate and sync the data Similar to the BuddyPress example, we’ll use the wpf_get_user_meta filter to merge the custom value into the data that’s being sent to the CRM. function example_sync_lifetime_value( $user_meta, $user_id ) { $user_meta = 0; $customer_orders = get_posts( array( ‘posts_per_page’ => -1, ‘post_type’ => ‘shop_order’, ‘post_status’ => wc_get_is_paid_statuses(), ‘meta_key’ => ‘_billing_email’, ‘meta_value’ => $user_meta, ‘orderby’ => ‘ID’, ‘order’ => ‘DESC’, )); if ( ! empty( $customer_orders ) ) { foreach ( $customer_orders as $order_id ) { $order = wc_get_order( $order_id ); $order_total = $order->get_total(); $user_meta += floatval( $order_total ); } } return $user_meta; } add_filter( ‘wpf_get_user_meta’, ‘example_sync_lifetime_value’, 10, 2 ); In this case, the code is quite a bit more complicated, since we’re not just pulling the data out from another part of the database. To calculate the lifetime value you first […]

Read More

Event Espresso

WP Fusion integrates with Event Espresso to allow you to add contacts to your CRM of choice when they register for an event. You can also optionally apply tags based on the ticket used at registration. Syncing contact records To sync new event registrations to your CRM, head to Settings » WP Fusion and scroll […]

Read More

HighLevel Enhanced Ecommerce

[…] your HighLevel account for sales made in: WooCommerce Easy Digital Downloads Event Espresso GiveWP Gravity Forms LifterLMS MemberPress and Restrict Content Pro Getting started Once you install the addon, Opportunities will automatically be added to HighLevel when someone makes a purchase on your site. 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. You can set the default pipeline, stage, and status for new orders via the Enhanced Ecommerce tab in the WP Fusion settings. If you’ve just added a new pipeline or stage, click Resynchronize Available Lists and Fields on the Setup tab to load the latest values. Duplicate opportunities By default, HighLevel allows each contact to have a single opportunity in a pipeline. This will cause an error if you have a customer come back and place a new order. To fix this, enable Allow Duplicate Opportunity in your HighLevel account settings. For more information see the HighLevel knowledgebase. How it works When a customer checks out on your site, WP Fusion will create a new opportunity in HighLevel with the order label, date, and invoice total. This sale data will be associated with the contact record who made the purchase. How it looks WooCommerce orders are displayed in HighLevel pipeline stages. Clicking on an opportunity opens up a window where you can see the opportunity details. WooCommerce order statuses If you’re using WooCommerce you can also associate WooCommerce order statuses with deal stages in HighLevel. 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 HighLevel. Warning: It is recommended not to sync Pending payment orders with HighLevel. When this is enabled, WP Fusion needs to create a contact record and a deal in HighLevel 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 HighLevel pipeline, then running the export will process those additional statuses as well. This can be used to export refunded or cancelled orders to HighLevel in addition to the paid orders. Modifying the API data WP Fusion supports using filters to modify the data sent to HighLevel with an ecommerce order. The order data can be modified using the wpf_ecommerce_highlevel_add_deal filter. In this example, we overwrite the deal title to use a custom title, My custom order title, with the order number. function my_custom_deal_properties( $deal, $order_id ) { /* $deal is structured like: $deal = array( ‘pipelineId’ => ‘GB7VXCu6jGCkhBW8OBHG’, ‘locationId’ => ‘E2kFlpE3DXXglIFdWEl0’, ‘name’ => ‘WooCommerce Order #123’, ‘pipelineStageId’ => ‘4fa50d09-b7d3-4afb-81af-d09bd22bd628’, ‘status’ => ‘all’, ‘contactId’. => ‘Qx9bKawvMwfhb9cINwKp’, ‘monetaryValue’ => 100, ‘customFields’ => array( array( ‘key’ => ‘custom_opportunity_field’, ‘field_value’ => ‘Custom Field value’, ), ), ); */ $deal = ‘My custom order title #’ . $order_id; return $deal; } add_filter( ‘wpf_ecommerce_highlevel_add_deal’, ‘my_custom_deal_properties’, 10, 2 ); To locate […]

Read More

Seach & Filter Pro support

Search & Filter Pro allows to search, filter and show any search results exactly where you want. You do not depend on an archive page as you do with WordPress’ standard search or solutions like SearchWP. Currently, you find everything even though a blog post, page or any custom post type should be […]

Read More

Infusionsoft Abandoned Cart Tracking

There are a lot of strategies for tracking and following up on abandoned carts. This guide will provide an overview of how to set up a basic abandoned cart tracking workflow for Infusionsoft. First, log into Infusionsoft and create a new tag for tracking abandoned carts. Then go to the Addons tab under […]

Read More

Ninja Forms

[…] marketing automation system. Using WP Fusion you can add and update contacts when forms are submitted, and also apply tags. Setup After creating a form, navigate to the Emails & Actions section and click the blue plus icon to add a new action. Select WP Fusion from the list, and click on the gear […]

Read More

Solid Affiliate

WP Fusion integrates with Solid Affiliate to add affiliates to your CRM or marketing automation platform when they register on your site or update their affiliate profiles. You can also tag customers when they make a purchase via an affiliate link, and sync referrer metadata to custom fields on customer contact records. Syncing affiliate meta […]

Read More

Users Insights

[…] in your CRM, as well as search and filter users by CRM tags. Syncing custom fields When Users Insights is active, an additional section will appear on the Contact Fields tab in the WP Fusion settings. This section will list any custom fields you have created with Users Insights. When a user registers or […]

Read More

wpf_has_tag()

This function determines whe ther a user has a given tag. A tag ID or label can be provided. if ( wpf_has_tag( ‘Paying Customer’ ) ) { echo “Thanks for your payment!”; } Or more complex conditions can be created by combining calls to has_tag(), for example: if ( wpf_has_tag( ‘New Customer’ ) && […]

Read More

Salon Booking

WP Fusion integrates with Salon Booking to add customers to your CRM of choice when they make a reservation, and apply tags based on the services booked. Customer Data With WP Fusion active all new customers will have their name and email address synced to your CRM when they make a new booking. You […]

Read More

SureCart

[…] 50+ CRMs and marketing automation tools. You can also apply tags (or lists) to your customers based on product purchases. Setup When editing any SureCart product, and then press Add New Integration to add a new integration. From the dropdown, select either Apply Tags or Remove Tags. And finally, select the tag (or list, group, segment, […]

Read More