Import Users

Import Users

import-users
WP Fusion includes an import tool that allows you to import existing contacts from your CRM as new WordPress users. If the password field is selected for sync on the Contact Fields tab, existing passwords can be imported as well. If the password field isn』t selected, a secure password will be automatically generated.
If you check the box next to Enable Notifications, WordPress will send a simple welcome email to the user with their username, and a link to log in on your website. You can customize this welcome email by using a plugin like SB Welcome Email Editor.
If you』re using a membership plugin like Ultimate Member, the plugin may send out its own welcome emails to new users, in which case you should leave Enable Notifications disabled.
#Passwords

You can also leave email notifications disabled and send the user』s password back to your CRM after import. Check the box next to Return Password on the main WP Fusion settings tab, and select a field in your CRM in which to store the generated passwords.
After each user is imported, their automatically generated password will now be saved back to their contact record, and you can use a merge field to include it in an email. The username will be the contact』s email address.
Note: Before importing a large number of users, first do a test import on your own contact record to ensure that all of the information is imported and the welcome emails are sent correctly.
By default WordPress will send a notification email to the site owner for every user imported. If you』re importing a large number of users you may wish to temporarily disable this using the Disable New User Notification Emails plugin.
#Username format
By default WP Fusion will set the username for all newly imported users to the contact』s email address.
You may not want the username to be the email address if you』re using a plugin (such as BuddyPress) which shows usernames on the frontend of the site. In that case you can change the default behavior.
This setting is found at the bottom of Settings » WP Fusion » General, in the Imported Users section.

The three Username Format options are:

Email Address: Usernames will be set to the contact』s emails address
FirstnameLastname: Usernames will be a combination of the contact』s first name and last name (i.e. JaneDoe)
Firstname12345: Usernames will be the contact』s first name, followed by a 5 digit random number (i.e. Jane36808)

For more control over how the usernames are generated, see the wpf_import_user filter.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Displaying CRM Data in WordPress

Displaying CRM Data in WordPress

#Overview
With WP Fusion it』s possible to display data from your CRM in WordPress, allowing you to personalize your site for logged-in users using data from their CRM contact record.
For example:
Welcome back, your next exam date is 9/9/2020.
Or
Your assigned advisor is Jim Jones, your learning style is Auditory.
#Shortcodes
Using WP Fusion』s user_meta shortcode, you can display any data in your site』s database for the current user.
You can see all the available meta field keys on the Contact Fields list in the WP Fusion settings.

The keys in the Meta Field column can be used to display a user』s data without any extra steps. For example to display the current user』s first name, the shortcode would be
[user_meta field="first_name"]
However, you may have data that only exists in your CRM, not in WordPress. To display that data, you』ll first have to create a place to store the data in WordPress, and then use WP Fusion to load the data from your CRM.
Note: While it might sound more convenient to load the data from your CRM every time the page is displayed, this actually can introduce performance problems if you have a lot of users on your site, since an API call needs to be made on every page load. For that reason it』s better to use WP Fusion to load the data into WordPress first, where it can be displayed without requiring an external API call.
#Managing custom fields
Before WP Fusion can load a custom field from your CRM, it needs a place to store the data on your site. For an overview on how data is synced between WordPress and your CRM, see the Syncing Contact Fields documentation.
An easy way to create a new field is to use a plugin that lets you manage custom fields for users, such as User Meta Pro, or Advanced Custom Fields. Or if you』re using a membership plugin like BuddyPress or MemberPress, these plugins have options for managing profile fields.
Once you』ve created a field to store your custom data, locate it on the Contact Fields list in the WP Fusion settings, and select a corresponding field in your CRM to enable the field for sync.

In this case, we』ve used User Meta Pro to create a field with key new_user_meta_field, and linked it to the Test Custom Field Two field in ActiveCampaign.
#Managing custom fields without a plugin
It』s also possible to register a new field in your database using just WP Fusion. Scroll down to the bottom of the Contact Fields list, and in the Additional Fields section, enter a unique key for the new field.

Select a corresponding custom field in your CRM from the dropdown on the right, and save the settings to enable the new field for sync.
#Loading the data
Now that you have the custom field created and linked with the corresponding CRM field, you need to load the data into WordPress. There are a few ways to do this:

Pull User Meta: From the Advanced tab in the WP Fusion settings you can run a Pull User Meta operation, which will load any enabled fields from your CRM into WordPress for all your users. More info on that here.
Webhooks: If you』re updating the custom field in your CRM over time, you can create an automation that sends a webhook back to WP Fusion when a contact has been modified, using the ?wpf_action=update method. This will load the updated values for that specific contact, and they can be displayed in WordPress. More info on webhooks here.
Shortcode: The [wpf_update_meta] shortcode can also be used to refresh the current user』s stored metadata from their CRM contact record when a page is viewed. To use the shortcode, put it above any [user_meta] shortcodes on the page so the data has been loaded by the time those shortcodes are executed. Note that the [wpf_update_meta] shortcode will slow down the page load by a few seconds, so it』s recommended to use it sparingly.
Login Meta Sync: You also have an option to load a user』s metadata from your CRM each time they log in, by enabling the option for Login Meta Sync.

Finally, if a [user_meta] shortcode is present on a page, and WP Fusion cannot find any data in the database for that field (for the current user), it will connect to your CRM one time to load the data for that field. This is a fallback just in case something got out of sync or a webhook failed to fire.
#Testing
Whichever method you use to load the data, the WP Fusion logs will show the data being loaded from your CRM into the user』s metadata in WordPress.

In this case, the new_user_meta_field we created earlier has loaded a value of http://test.com from ActiveCampaign.
Now if we use the [user_meta] shortcode, that value can be output on a page. For example
Your personalized results can be found at [user_meta field="new_user_meta_field"]
Would be output as
Your personalized results can be found at http://test.com.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Batch Operations / Exporting Data

Batch Operations / Exporting Data

#Overview
WP Fusion includes a series of tools that let you export data in bulk to your CRM. These are found under Settings » WP Fusion » Advanced » Batch Operations.

The options available will depend on which plugins you have active. For each operation you can hover over the tooltip indicator to get a description of what data will be synced or modified.

Note: These operations can potentially modify thousands of records in both WordPress and your CRM, and they are irreversible. It』s always recommended to test with a single record before running a batch operation— for example doing a test checkout before exporting orders, or a test registration before exporting users.

#When to use a batch operation
Just because WP Fusion can export a large amount of data to your CRM doesn』t mean it』s always the best tool for the job. WP Fusion needs to respect the API limits of your connected CRM, as well as the resource limits of your server.
For example, to run a Push User Meta batch operation to sync 30,000 users』 metadata with Ontraport would take about 28 hours to process.
As an alternative, you could use a plugin like WP All Export to export all of your user data to a .csv, and upload it into the CRM in only a few minutes.
The batch operations are best for syncing data that can』t be easily exported any other way, for example applying tags based on MemberPress subscription statuses, or exporting WooCommerce orders.
#Usage
To run a batch operation, select the operation you』d like to perform from the list of radio buttons and then click Create Background Task. A status indicator will appear at the top of the page showing the number of records to be processed and the number remaining.

Some notes:

You can leave the page while the background worker runs and it will continue to process the queue in the background.
If the background process gets stuck you can refresh the page and it will pick up where it left off.
It』s recommended to turn on the activity logs so you can see what data is being sent or loaded, as well as any potential errors.

Note on speed: Most CRMs have some kind of API limits with regards to the number of API calls you can make in a period of time. WP Fusion pauses in between each step in the background process to avoid exceeding these API limits. How long the pause is depends on your connected CRM.
Depending on the number of records you are processing, this can cause the background worker to take several hours (or even days) to complete. For example exporting 30,000 WooCommerce orders to Drip would take about 18 hours to fully process.

#Skip already processed
In some cases, you may be asked whether you』d like to Skip already processed records.
By default the batch exporter will not export the same order to your CRM twice.
By default, WP Fusion will not export an order, payment, or form entry to your CRM if it』s already been successfully exported. This is to prevent creating duplicate records.
If you want to go ahead and create duplicate records anyway (for example after switching CRMs or accounts), you can uncheck the Skip already processed box before clicking the start button. This will cause WP Fusion to export all orders, regardless of whether or not they were synced previously.
#Core methods
These operations are part of WP Fusion core and aren』t tied to any particular plugin integration. They are:
#Resync Contact IDs
Looks up every WordPress user by email address in your CRM, and updates their cached contact ID. This does not modify any tags or other data, or trigger automated enrollments.
When to use it: If the cached contact IDs for your WordPress users have gotten out of sync with the contact records in your CRM, this will update that cache, so profile updates and new tags get applied to the correct contact record.
This operation is sometimes preferable to Resync Contact IDs and Tags because if you』re using linked tags / auto-enrollment tags into courses or membership levels, you may not want to modify any tags until you』ve confirmed that every user is linked to the correct contact record.
#Resync Tags
Loads updated tags from your CRM for all WordPress users who already have a saved contact ID. This also triggers any automated enrollments via linked tags.
When to use it: If you』ve modified a lot of tags on a lot of contacts in your CRM (or deleted tags), this operation will bring the tags cached in WordPress for your users up to date with what』s in your CRM. This operation is faster than Resync Contact IDs and Tags because it doesn』t need to first confirm the contact』s email address.
Also, if you』ve recently changed an auto-enrollment tag on a course or membership (for example with a LearnDash course), you may want to update your users automated enrollments based on their current CRM tags. Running the Resync Tags operation will trigger any automated enrollments (and un-enrollments) when the tags are loaded from your CRM.
#Resync Contact IDs and Tags
All WordPress users will have their contact IDs checked / updated based on email address and tags will be loaded from their CRM contact record. This also triggers any automated enrollments via linked tags.
This operation is the same as running Resync Contact IDs and Resync Tags, it just does both at the same time.
When to use it: When a user registers in WordPress, WP Fusion stores their CRM contact ID on your site so that future updates can properly be synced. But if you manually merge a bunch of contacts (for example to remove duplicates), it』s possible that these IDs will no longer be accurate. Running a Resync Contact IDs and Tags operation ensures WP Fusion has all of your WordPress users linked to the correct contact record and has the latest copy of their tags.
#Export Users
All WordPress users without a matching CRM contact record will be exported as new contacts. Any fields configured on the Contact Fields tab will be synced. Any tags specified for Assign Tags on the General settings tab will be applied.
When to use it: If you』re just setting up WP Fusion for the first time, you may have WordPress users that aren』t already in your CRM or marketing automation tool. This tool lets you export those users.
#Apply registration tags
On the General tab in the WP Fusion settings, there』s an Assign Tags option that lets you specify tags to be applied in your CRM when a user registers a new WordPress user account.

These tags are only applied to new user registrations, but if you want to retroactively apply the same tags to every user already registered on the site, you can run the Apply registration tags operation.
When to use it: This operation is useful if you』re trying to reconcile the counts between users on your site and contact records in your CRM. By applying the same tag to every user on your site, you can easily see how many records are missing from your CRM.
#Push User Meta
All WordPress users with a contact record will have their meta data pushed to your CRM, overriding any data on the contact record with the values from WordPress. Any fields enabled on the Contact Fields tab will be synced.
When to use it: This is most commonly used when you』ve just enabled a new field for sync (for example User ID, or Date Registered), and need to export the values from that field to existing contact records in your CRM.
#Pull User Meta
All WordPress users with a contact record will have their meta data loaded from your CRM, overriding any data in their user record with the values from their contact record. Any fields enabled on the Contact Fields tab will be loaded.
When to use it: This operation would be used when you』ve just enabled a new WordPress field for sync with a custom field in your CRM that already contained data. This operation will load that custom field data into WordPress so it can then be displayed with a shortcode or used by other plugins.
#Troubleshooting
The background worker is a complex process. It』s designed to work across all hosting environments, without affecting the speed or stability of your site.
While it』s generally very reliable, we have encountered issues with both caching and security plugins. The most common issue is that it will process a single batch of records (20 or so) and then not proceed to the next batch until the page is reloaded.
To aid in troubleshooting the background worker, WP Fusion does a status check on it every 5 seconds, and outputs some status information to the JavaScript console in your browser.

This will output the total list of items in the queue, as well as information about the state of the process in terms of previous action, next action, and resource utilization.
Some things to note are:

Most servers have a max_execution_time of 30 seconds for PHP scripts. To get around this, the background worker will attempt to restart itself when the total_time value exceeds 20 (seconds). However, if the time_last_step value is greater than 10 (seconds), this could mean that the 30 second max_execution_time gets exceeded and the process times out.This most commonly happens on slower hosts when exporting WooCommerce orders, using the Enhanced Ecommerce addon. The process of creating a contact record, applying tags, creating products, registering an invoice, and adding the products to the invoice can take a long time for each order. You can speed up this process by first running an Export Users operation before exporting your orders. Since the contact records will already exist in your CRM, this reduces the time required to process each order.
WP Fusion tries to detect the available memory on your host and won』t let the background worker exceed 80% of available memory. However sometimes it』s not able to properly detect the available memory, and so memory_percent shows at 100% and the process prevents itself from running. You can disable this check by returning false from the wpf_batch_memory_exceeded filter.
Because WP Fusion makes sustained requests to admin-ajax.php over a long period of time, it can sometimes get blocked by security plugins. If you notice the batch status isn』t updating, it』s possible the background request is getting blocked. To see if that』s happening you can check your site』s access logs for any traffic to /wp-admin/admin-ajax.php?action=wpf_background_process is being blocked with a 403 (Unauthorized) status. If you』re using WordFence you can also put the plugin into Learning Mode before starting the batch operation to train it to allow this kind of traffic.

#Rate limiting
Most CRMs have some sort of API rate limiting. For example

ActiveCampaign: 5 requests per second
Drip: 3600 requests per hour
Infusionsoft: 1500 requests per minute
Ontraport: 3 requests per second
Zoho: 15000 requests per day

During batch operations it』s possible to hit these limits, after which you』ll begin to see error messages in the WP Fusion logs.
Because most CRMs reset their rate limiting every 60 seconds, WP Fusion does not cancel a batch operation when it it』s a rate-limiting error, it will continue to try to export data, and record errors as applicable.
With CRMs that have lower rate limits (such as Drip), WP Fusion artificially slows down any batch operations to avoid hitting any API limits. That is achieved using the wpf_batch_sleep_time filter. Returning a number from that filter causes WP Fusion to sleep() for the specified number of seconds before moving on to the next task.
For example, to add a one second pause between each batch step:
add_filter( 'wpf_batch_sleep_time', function() {
return 1;
});

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Auto Login

Auto Login

#Overview
WP Fusion』s auto-login system can load the CRM tags and meta data for a contact record into a temporary WordPress user account. The site visitor is then tracked with a cookie.
This allows you to personalize site content, pre-fill forms, and track activity (by applying tags) even if the contact doesn』t have a WordPress account.
The auto-login process can either be triggered via a link, or via a form submission.
Note: This feature does not work properly on WP Engine or other hosts that don』t let you edit your site』s caching settings.
#Auto Login Links
Auto login links can be used in an email to grant access to restricted content on your site without requiring a user to log in. You can even grant access to contacts in your CRM that don』t have user accounts on your site.
Keep in mind that the user will only be logged in for the purposes of WP Fusion』s content restriction and activity tracking features. For security reasons, users will not be able to access or edit their account details, purchase history, or any other sensitive information. For that they will need to log into your site using their username and password. All other plugins will see the visitor as a guest.
#Usage
To use this feature, first enable it from the Advanced section of the WP Fusion general settings tab.

You can now log a user into your site by passing a contact ID in any URL pointed at your site, for example:
http://mysite.com/my-special-content/?cid=1234
This sets a cookie and creates a temporary WordPress user with that contact』s tags and other information from your CRM. Any protected content will be accessible if the contact has the correct tags. You can also apply tags and track activity as if the user was logged in.
You can also use WP Fusion』s user meta shortcodes to display contact data from your CRM.
#Personalization tags
Here are some of the personalization tags for our more popular CRM integrations. This list will continue to be updated:

ActiveCampaign: http://mysite.com/?cid=%CONTACTID%
AgileCRM: http://mysite.com/?cid={{id}}
ConvertKit: http://mysite.com/?cid={{ subscriber.id }}
Drip: http://mysite.com/?cid={{ subscriber.id }}
FluentCRM: http://mysite.com/?cid={{contact.id}}
Gist: not supported by Gist
Groundhogg: http://mysite.com/?cid={id}
HubSpot: http://mysite.com/?cid={{ contact.email }}
Infusionsoft / Keap: http://mysite.com/?cid=~Contact.Id~
Mailchimp: http://mysite.com/?cid=*|EMAIL|*
MailerLite: http://mysite.com/?cid={$email}
Mautic: http://mysite.com/?cid={contactfield=id}
NationBuilder: http://mysite.com/?cid={{recipient.id}}
Ontraport: http://mysite.com/?cid=[Contact ID]
Sendinblue: http://mysite.com/?cid={{ contact.EMAIL }}
Zoho: http://mysite.com/?cid=${Contacts.Contact Id}

For other CRMs you can find the merge field for the contact ID from their merge fields documentation.
#Set Current User
By default auto-logged in users will only be able to access content protected by WP Fusion, and contact data can only be displayed using WP Fusion』s shortcodes.
You can enable Set Current User to have WP Fusion set the $current_user global in WordPress, so other plugins will be tricked into treating the user as logged-in as well.
This works well for pre-filling forms (in plugins like Gravity Forms or Advanced Custom Fields) with data from the CRM contact record, allowing you to create profile update forms or subscription preferences forms for your mailing list subscribers.
However this can cause problems with membership plugins (like BuddyBoss) and gamification plugins as they try to trigger notifications or achievements for a non-existent user, and may cause your site to crash when the auto-login link is visited.
If you get a white screen or an error message when visiting an auto-login link, turning off Set Current User will likely fix the error.
#Form Auto Login
You can also start an auto-login session when a form is submitted with any one of our supported form plugins.
This is the same as if the visitor had just followed an auto-login link— a cookie is set and then you can customize the site appearance based on the tags and meta data on their contact record.

To enable this, check the box for Form Auto Login from the Advanced settings tab.
#Ending auto-login sessions
WP Fusion will attempt to end the auto login session in several situations to prevent unexpected behavior on your site:

When a user logs into the site with a username and password
When a visitor reaches a page that contains 「login」 in the URL
When a visitor reaches a page that contains 「register」 in the URL
When a visitor reaches a page that contains 「checkout」 in the URL

However you may also want to force the auto-login session to end at a different time, for example when a form is submitted. You can do this by appending ?wpf-end-auto-login=true to any URL.
You can also achieve this in PHP by calling wp_fusion()->auto_login->end_auto_login();
#Troubleshooting Auto Login
The auto login system is still considered experimental and we can』t guarantee that it will work with all plugins.
If you』re using an auto login link and it doesn』t seem to be working, the first thing to check is if the cookie has been set for the auto login session. You can check your browser』s cookie storage to see if the wpf_contact cookie is being set. In Chrome this is found in the developer console under Application » Cookies:

If the wpf_contact cookie isn』t set, then the auto login URL wasn』t recognized. You should make sure that you』re using a real contact ID in your auto login URL, and that Auto Login is turned on in the WP Fusion settings.
#Caching
Because auto-login links are visited by guests (people who aren』t logged in), making auto-login links work with caching requires some extra attention.
For starters, make sure that any URLs with cid= in them are excluded from cache. Also add a cookie based cache exclusion for the wpf_contact cookie.
Note that URLs with UTM parameters (from Google Analytics) force-enable caching on some hosts. In many cases https://mysite.com/?cid=123 will work, but https://mysite.com/?utm_campaign=FallNewsletter&cid=123 will not, because the utm_campaign parameter triggers caching.
Getting around that is different for every host. For example with Cloudways we』ve had to:

In the cache exclusion settings in the Breeze plugin, put in a URL exclusion for the landing page being used with auto-login
In the Varnish settings in Cloudways, put in a cache exclusion for the landing page being used with auto-login
In the Varnish settings in Cloudways, put in a cache exclusion for the wpf_contact cookie.

#Debug Mode
As of WP Fusion v3.37.12, you can enable Auto Login Debug Mode from the Advanced tab in the WP Fusion settings.

When enabled, details about the current auto-login session will be output to the HTML comments in the header of your site.
You can use this to troubleshoot issues for a particular auto-login user, for example missing or malformed metadata or tags. This will also show if the wpf_contact cookie isn』t being set, for example due to caching.
#Developer resources
There are a few filters that allow you to modify the auto-login process.
#Using an alternate auto-login query variable
Instead of using ?cid= in your URL, you may want to use another variable,  for example if you』re already passing the contact』s ID to a different plugin. You can register an additional custom query variable using the wpf_auto_login_query_var filter.
For example to share the contact ID parameter with RightMessage, you』d use:
function alt_auto_login_var( $var ) {
return 'rm_ac';
}
add_filter( 'wpf_auto_login_query_var', 'alt_auto_login_var' );
#Pass auto-login data to other scripts
WP Fusion includes a function, wpf_get_current_user(), which works the same as the wp_get_current_user()  function, except that it also supports auto-login sessions. This can be used to pass data from an auto-login session to a 3rd party tracking script.
Below are two examples, one for Oribi』s site tracking, and one for Smartlook』s site tracking.
function custom_wpf_tracking() {

if ( ! function_exists( 'wp_fusion' ) || ! wpf_is_user_logged_in() ) {
return; // WP Fusion needs to be active and the user needs to be identified.
}

$user = wpf_get_current_user(); // Get the details about the current user. This lets you use the email via $user->user_email
$contact_id = wpf_get_contact_id(); // Or, optionally, you can use the contact ID for tracking.

?>

ORIBI.api('setUserEmail', 'user_email; ?>' );

smartlook( 'identify', '' );


user->has_tag( 'Payment Failed' ) ) {
$end = true;
}

return $end;
}

add_filter( 'wpf_end_auto_login', 'my_end_auto_login', 10, 2 );
There is also a helper filter which allows you to end a session based on a partial URL match, wpf_end_auto_login_request_uris:
function my_end_auto_login_uri( $request_uris ) {

$request_uris[] = 'my-page-slug';

return $request_uris;
}

add_filter( 'wpf_end_auto_login_request_uris', 'my_end_auto_login_uri' );
In this example, if the visitor lands on https://mysite.com/my-page-slug/ (or any URL with my-page-slug in it) the session will end.
#Skipping an auto-login session
You can skip an auto-login session on a single page via the wpf_skip_auto_login filter. The session will be resumed once the visitor navigates to another page.
function my_skip_auto_login( $skip, $contact_data ) {

if ( is_page( 'my-custom-form' ) ) {
$skip = true;
}

return $skip;
}

add_filter( 'wpf_skip_auto_login', 'my_skip_auto_login', 10, 2 );
There is also a helper filter which allows you to skip the session based on a partial URL match, wpf_skip_auto_login_request_uris:
function my_skip_auto_login_uri( $request_uris ) {

$request_uris[] = 'my-page-slug';

return $request_uris;
}

add_filter( 'wpf_skip_auto_login_request_uris', 'my_skip_auto_login_uri' );
In this example, if the visitor lands on https://mysite.com/my-page-slug/ (or any URL with my-page-slug in it) the session will skipped on that page.
#Making auto-login more secure
The basic auto-login implementation with just the cid= parameter is the easiest to set up and the most reliable. However this does mean that a visitor could cycle through random contact IDs in the URL, and potentially gain access to another contact』s content or details.
You can further secure the URL by adding a second parameter that has to pass. In this example, the auto-login URL contains an additional email= parameter. If the email doesn』t match the email address on the contact record in the CRM, the auto-login session.
To work, the URL would need to be formatted like https://mysite.com/?cid={contact_id}&email={email_address}
function verify_wpf_auto_login( $end, $contact_data ) {

if ( isset( $_GET['cid'] ) ) {

$contact = wp_fusion()->crm->load_contact( intval( $_GET['cid'] ) );

if ( is_wp_error( $contact ) ) {
return true;
}

// If there's no &email= parameter in the URL, or the email doesn't match
// the email in the database, end the auto login session

if ( ! isset( $_GET['email'] ) ) {
return true;
}

if ( urldecode( $_GET['email'] ) != $contact['user_email'] ) {
return true;
}
}

return $end;

}

add_filter( 'wpf_end_auto_login', 'verify_wpf_auto_login', 10, 2 );

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Oxygen

Oxygen

#Overview
WP Fusion lets you control the visibility of Oxygen components based on a user』s CRM tags. When editing a component, open the Conditions menu, and click Set Conditions to open the conditions modal.

Under the User section, select CRM Tags.

For each condition you can either select Has tag or Does not have tag. You can combine multiple conditions by clicking the Add Condition button.
If Does not have tag is selected, the component will be shown to logged-out users. You can limit visibility to only logged-in users by adding an additional User Logged In condition.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Gutenberg

Gutenberg

#Overview
WP Fusion integrates with the Gutenberg editor in WordPress 5.0+ to let you control access to content based on a user』s logged-in status and CRM tags.
#Block Visibility
The recommended solution for block visibility control with WP Fusion is to use the Block Visibility plugin.
After installing Block Visibility, click on your block, and in the right panel, scroll down to the Visibility section.
Using Block Visibility you can control access to Gutenberg blocks using CRM tags.
If the WP Fusion section doesn』t appear, click on the Controls banner, and enable the WP Fusion controls.

In the WP Fusion settings, there are three block visibility options:

Required Tags (Any): The block will only be shown if the user is logged in and has at least one of the specified tags (requires User Role to be set to Logged-in).
Required Tags (All): The block will only be shown if the user is logged in and has all of the specified tags
(requires User Role to be set to Logged-in).
Required Tags (Not): If a user is logged in and has any of the specified tags, the block will be hidden.

#Layout Block
WP Fusion also includes a built-in layout block, which allows you to drop other blocks into a container that is protected using tags in your CRM.
#Basic usage
To get started, click on the + icon to add a new block, and select the WP Fusion block from the Layout Elements section.

The WP Fusion block will then be added to the content editor. Once the block appears, click on it and the block settings will appear in the sidebar.

The top section of the block is what will be shown if the user is logged in. You can also specify any tags that are required in the sidebar. If the user is not logged in, and does not have any of the specified tags, they will be shown the content in the bottom section.
You can type text directly into the block, or add any other block to the inner section by clicking the + icon.
#Advanced usage
You can nest multiple WP Fusion blocks within eachother to create more complex access rules.

In the screenshot above, the message 「Welcome back, membership customer!」 will be shown to logged in users who have both of the tags 「Customer」 and 「Purchased Membership」.
「Welcome back, one-time purchase customer!」 will be shown if they just have the 「Customer」 tag.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Elementor

Elementor

#Overview
WP Fusion includes an integration with Elementor to let you control visibility of page elements based on a user』s tags in your CRM or marketing automation platform.
WP Fusion also supports syncing Elementor Forms entries to your CRM. For more info on that, see this page.
#Access Control
To set up access rules on Elementor elements, open the settings for any widget, and click on the Advanced tab. Under the WP Fusion section, you will see several settings.

The Visibility dropdown sets the default visibility for the widget. The options are:

Everyone: The widget will be visible to everyone regardless of whether they』re logged in or not (this is the default)
Logged In Users: The widget will only be visible to logged in users
Logged Out Users:  The widget will only be visible to guests on your site

Depending on the visibility mode you』ve selected, there will be additional options

Required Tags (any): The element will only be shown if the user is logged in and has at least one of the specified tags
Required Tags (all): The element will only be shown if the user is logged in and has all of the specified tags
Required Tags (not): If the Visibility mode is set to Everyone, the element will be shown to guests, and hidden from logged in users if they have any of the specified tags. If the visibility mode is set to Logged In Users, the element will be hidden from guests, and hidden from logged in users if they have any of the specified tags

#Elementor Popups
With Elementor Pro, WP Fusion also adds the ability to control the display of popups based on a user』s tags. To set this up, first create your popup, and then open the Advanced Rules window.

Click the toggle switch to turn on the WP Fusion condition. There are two options:

Show: The popup will only be shown to logged in users who have at least one of the specified tags.
Hide: The popup will be hidden from logged in users who have at least one of the specified tags.

#Filter Queries
WP Fusion adds an option to the Posts and Portfolio widgets in Elementor Pro which allows you to filter the displayed results using WP Fusion』s access rules.
To turn this on enable the setting for Filter Queries in the Query tab of the widget settings.

With this setting on, any posts the user doesn』t have access to will be removed from the results.
You can use this to create personalized post listings, for example of courses or media items.
#Tracking clicks
WP Fusion can track clicks on Elementor buttons and elements by applying tags in your CRM. For more info see the bottom of Link Click Tracking.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Divi

Divi

#Overview
WP Fusion lets you control the visibility of Divi modules based on a logged-in user』s CRM tags.
When editing a module, select the Advanced tab, and scroll down to the Visibility section.

You can enter a comma-separated list of tag names or tag IDs. If the user doesn』t have any of the specified tags, the module will be hidden.
#Advanced method
For more advanced control, install and activate the Content Visibility for Divi plugin. When editing any module, you』ll now see a new setting where you can put in rules regarding when that module should be displayed.

The setting accepts any PHP expression that evaluates to either 「true」 or 「false」. Using WP Fusion』s has_tag() function you can create very specific rules regarding when a module should be displayed.
For example:

Require the tag Active Subscriber to view the module:
wpf_has_tag( 'Active Subscriber' )
Require both the Active Subscriber and Gold Member tags to view the module:
wpf_has_tag( 'Active Subscriber' ) && wpf_has_tag( 'Gold Member' )
Require either the Active Subscriber or Gold Member tags:
wpf_has_tag( 'Active Subscriber' ) || wpf_has_tag( 'Gold Member' )
Only show the module if the user is logged in and does not have the tag Payment Failed:
! wpf_has_tag( 'Payment Failed' )

 

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Beaver Builder

Beaver Builder

#Overview
WP Fusion includes an integration with Beaver Builder to let you control visibility of modules based on a logged in user』s tags in your CRM. You can also personalize post grids in Beaver Builder based on a user』s access permissions.
#Module Visibility
To set this up, open the settings for any row or module, and click on the Advanced tab. Under the Visibility section, you will see two options in the dropdown: 「User Tags (any)」, and 「User Tags (not).」

In the select box, you can select any number of tags that are required to display that element.

User Tags (any): If tags are specified, the element will be hidden from logged out users, and will only be displayed for users who have at least one of the selected tags.
User Tags (not): The element will not be shown to users who have any of the specified tags.

The second method is useful for hiding content like popups and lead forms from subscribers or paying members.
If you select 「User Tags (not)」, an additional option will appear: Logged Out Behavior. This has two options:

Default (hidden): The element will not be shown to users who have any of the specified tags, and will not be shown to guests.
Display: The element will not be shown to users who have any of the specified tags, but will be shown to guests.

#Filter Queries
In the WP Fusion general settings there is a Filter Queries setting that lets you hide all posts on your site if a user doesn』t have the right access permissions to access that post.
This works with the Beaver Builder Posts module as well, but there may be situations where you need to leave that option turned off globally, but do want to enable query filtering on a single Beaver Builder posts list. For example to show a personalized list of courses or products that are available to that user.
To enable this on a single Posts module, set the Source to Custom Query, and at the bottom of the Content tab, set Filter Queries to Yes.

With this enabled any posts that the user doesn』t have the correct tags to access will be removed from the posts listing.
#Beaver Themer
With the Beaver Themer plugin installed, WP Fusion registers additional options in the conditional logic editor. These can be used to create display rules based on a user』s CRM tags that are more complex than the options available when using Beaver Builder alone.

From the conditions dropdown, select User』s CRM Tags and then you can select either contains or does not contain, and select a CRM tag.
The rules will be calculated when a page is displayed and the element will be hidden or shown based on the current user』s tags in your CRM.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

WP Remote Users Sync

WP Remote Users Sync

#Overview
WP Remote Users Sync is a free plugin that allows you to synchronize WordPress users, user passwords, and login sessions securely between sites.
It is currently our recommended solution for synchronizing WordPress user accounts.
Using WP Fusion with WP Remote Users sync, your users』 CRM contact IDs and tags are synced directly between any configured sites. In many cases this can reduce the number of webhooks you need to configure in your CRM.
#Setup
WP Fusion automatically configures itself for WP Remote Users sync, and there』s no extra setup required to have users』 contact IDs and CRM tags synced automatically between your connected sites.

In the screenshot above, 「Site B」 at https://test.verygoodplugins.com is configured to connect to 「Site A」 at https://dev.local.
It』s configured to both accept and send actions for Login, Logout, Create, and Update.
#Behavior
When a new user registers on Site A, or their profile is updated, WP Remote Users Sync will sync their profile data directly to Site B.
When that happens, the WP Fusion logs on Site A will show the user』s CRM tags being synced to Site B as well. The 「Source」 column will say wp-remote-users-sync.

Meanwhile on Site B, when the Site A data is loaded by WP Remote Users Sync, WP Fusion will record a message in the logs indicating the tags that were loaded:

#Why use WP Remote Users Sync
If all this sounds complicated, don』t worry, it should all happen automatically without any extra configuration. As long as WP Remote Users Sync is communicating properly between your sites, WP Fusion will as well.
The benefit of using WP Remote Users Sync is that it removes a lot of the friction that comes from having the customer experience split across two websites.
Without WPRUS:

WooCommerce purchase on Site A applies a tag in your CRM via WP Fusion
The tag triggers an automation which sends a webhook to Site B
The webhook creates a new user, loads their tags, and generates a password
A welcome email is sent from the CRM with a link to log in to Site B

This takes around 5 minutes and there』s a lot of opportunity for a webhook to fail or an email to land in spam.
With WP Remote Users Sync and WP Fusion:

WooCommerce purchase on Site A applies a tag in your CRM via WP Fusion
Simultaneously, WPRUS has created the new user on Site B and set the correct login cookies
The customer clicks a link on the Order Received page and is taken to Site B, without having to log in
The tags applied by WooCommerce in step one are already available, so the customer can immediately access their purchased content

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No