Search Results :

×

Sync Salesforce Leads in WordPress (WP) | WordPress Object Sync for Salesforce Leads

Sync Salesforce Leads in WordPress (WP) | WordPress Object Sync for Salesforce Leads


Salesforce is a popular CRM (Customer Relationship Management) and cloud-based IT application provider which has solutions in various sectors like marketing, analytics, and customer service. Alongside its suite of applications, Salesforce also has its own Community Portal for its users. With its wide range of services and applications, Salesforce becomes a partaker in several use cases across several domains such as CRM, customer service & management, etc. - for direct consumers using simple CMSs like WordPress, to large enterprises as well. Consider the following use case with WordPress, where you want to sync Salesforce objects (Accounts/Leads/Custom Objects) to your WordPress users using Apex Triggers and WordPress REST APIs.

Scenario

  • Leads are manually created or through any 3rd party solution in Salesforce CRM and you wish to sync this data to a WordPress site whenever a lead is converted into a member (Account/Contact/Opportunity).
  • Your customers get access to the premium content hosted on the WordPress site based on their membership status and the membership status is stored in the Account object.
  • Once a lead has been turned into an Account OR Contact OR Opportunity, the user account information should be synced to the WordPress site as a user/member, and the user will be able to access your WordPress site.
  • WordPress will send an onboarding email to the user to reset the password.
  • Membership status will be synced to the WordPress site as well, and only members with active memberships should be able to access the WordPress site.
  • Show the user’s data synced from the Salesforce on the WordPress front-end or create a profile page for the members.

Components Involved

  1. With the help of the Object Data Sync for Salesforce plugin, Salesforce records are synced into the WordPress database to update the user information and membership status. You can follow WordPress - Object Data Sync For Salesforce Setup Guide to connect your Salesforce instance with the WordPress site.

  2. The plugin allows WordPress objects (post, page, user, blog) fields and Salesforce objects to map one another. The records in Salesforce objects will be created/updated/deleted when the data in WordPress (WP) is saved.

     Tested with 6.1.1

  3. The below solution uses the “Ultimate Members” plugin to show the data on the front-end and creates a profile page for each user.
  4. Note:- If you want integration with other membership plugins as well then contact us at salesforcesupport@xecurify.com

Glossary

  1. Leads: People who are interested in your product or service are referred to as leads. When a lead is converted to an account, the account object in Salesforce is created.
  2. Apex triggers: Apex triggers enable you to perform custom actions before or after events to records in Salesforce, such as insertions, updates, or deletions.

Workflow

Salesforce WordPress object sync | Salesforce Sync Flow

Solution

This use-case can be solved using Object Data Sync for Salesforce plugin and Apex triggers.

  • When a Lead gets converted, an account object gets created in the Salesforce.
  • Using Apex triggers on the Lead and Account object, we will be able to send the required information to WordPress using REST APIs.
  • The Object Data Sync for Salesforce plugin will construct secured endpoints to consume Salesforce data and will create the user in WordPress based on the data received from Salesforce.
  • On successful account creation, WordPress will send an onboarding email to the user and the user can reset the password initially.
  • Data received from Salesforce will consist of the following objects:

    Basic User Information First Name, Last Name, Given Name, Display Name, User Name, Email
    Custom Information This information will be stored in the user meta table
    Membership Status This states wheather a user is an active member or not
  • Whenever any field gets updated in the account object in Salesforce, the update apex trigger will get invoked and it will update the user information in WordPress.
  • The Object Sync for Salesforce plugin will only allow active members to login, if the users’ membership status changes in the salesforce, it will trigger the apex trigger to send the changed membership level to the WordPress site in real-time.
  • If a user membership status is expired in salesforce, the user will be immediately logged out from all the browsers and will not be able to log in.

Create a user profile in WordPress with the data fetched from Salesforce

Step 1: Configure Object Data Sync for Salesforce plugin

  • Navigate to the Field Mapping section of the plugin.
  • Under the Mapping Configuration, tab we will be configuring basic details related to the field mapping.
  • Provide an appropriate label in the Mapping label text field.
  • In the Salesforce Object dropdown select Account as the salesforce object.
  • In the WordPress Object dropdown select user as the WordPress object.
  • Enable the toggle of Sync from Salesforce to WordPress.
  • WordPress Okta SCIM User Provisioning | SCIM Configuration tab
  • Now scroll down to the User Attribute Mapping section, here we will be mapping Salesforce and WordPress fields to each other.
  • You can select the Salesforce field from the left side and the WordPress field on the right side.
  • The Add attribute and Delete buttons can be used to add/remove a row of attribute mapping.
  • WordPress Okta SCIM User Provisioning | SCIM Configuration tab
  • Once you have configured all the field mapping you can click on Save button to save the mapping.
  • Note: If you want the value of the salesforce field to be stored in a user meta table you can select “ __custom__ “ from the WordPress fields dropdown and specify the meta field there like ( first_name, billing_street, billing_city ).

    WordPress Okta SCIM User Provisioning | SCIM Configuration tab
  • Once you have configured all the field mapping you can click on Save button to save the mapping.
  • You have successfully configured the Object Data Sync For Salesforce plugin.

To create a user profile in WordPress with the data fetched from Salesforce, we will add the Meta-keys to the Profile Page created by Ultimate Member.

Step 2: Configure Ultimate Member

  • Navigate to Ultimate Member plugin
  • In the form, section click on the Edit button of the Default Profile Form
  • WordPress Okta SCIM User Provisioning | Browse App
  • Click on the plus (+) icon to add a new field.
  • WordPress Okta SCIM User Provisioning | Add new application
  • Select Text Box in the Fields Manager window.
  • WordPress Okta SCIM User Provisioning | Add App
  • Enter the same user-meta key that you configured in the plugin in the Meta Key input box. You can configure the remaining fields in this section according to your requirements.
  • WordPress Okta SCIM User Provisioning | General setting
  • Then click on Add button to save.
  • Once all the required fields are configured and the data is synced from salesforce, a user profile will be populated with all the Salesforce data.
  • WordPress Okta SCIM User Provisioning | Enable API Integration

Conclusion

The Object Data Sync for Salesforce plugin facilitates mapping of the Salesforce objects to the respective objects like the user, post, taxonomy, and post-type in WordPress by using Apex triggers. This allows WordPress objects to be in sync with the mapped Salesforce objects. We can then use the fetched data and integrate other plugins like BuddyPress, BuddyBoss, LearnDash, and Ultimate Member. In the above solution, we have used the Apex triggers for enabling WordPress Salesforce Leads Sync that syncs the data stored in the Account/Lead Object to the User Object in WordPress. This eliminates the need to create users objects in Salesforce and create a public site for Members or Accounts. The above solution can be used as an alternative to the Salesforce community. This same solution can also be provided with the other CMSs like (Drupal, Joomla, Opencart, Prestashop and many more. )


If you are looking for anything which you cannot find, please drop us an email on salesforcesupport@xecurify.com

Additional Resources

Why Our Customers choose Object Data Sync for Salesforce plugin?


24/7 Support

miniOrange provides 24/7 support for all the Secure Identity Solutions. We ensure high quality support to meet your satisfaction.

Sign Up

Customer Reviews

See for yourself what our customers say about us.
 

Reviews

Extensive Setup Guides

Easy and precise step-by-step instructions and videos to help you configure within minutes.

Setup Guide


We offer Secure Identity Solutions for Single Sign-On, Two Factor Authentication, Adaptive MFA, Provisioning, and much more. Please contact us at

 +1 978 658 9387 (US) | +91 97178 45846 (India)   salesforcesupport@xecurify.com

Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com