1. Home
  2. Docs
  3. How to
  4. How To Make WordPress into a Salesforce Portal with Unlimited Users

How To Make WordPress into a Salesforce Portal with Unlimited Users

Use the user logins feature in WordPress to build engaging portals that provide selected access to Salesforce records.

When WordPress users feature is mentioned, most people think about Admin users, a login for your marketing head and another for your web developer.

WordPress has powerful user management functions, the same is even used to run an entire e-commerce site by popular frameworks like WooCommerce and Easy Digital Downloads.

Both these apps, store all of the purchase information inside WordPress.

What if we want to use the same user management features of WordPress AND have the information populate real-time from Salesforce.

We could set up a portal login where members can view information ONLY assigned to them.

This would be immensely beneficial when you have :

  • Project and Case Managers who want access to specific record info they manage
  • Volunteer Team Leaders who want to view hours worked by their team members
  • Donors who want to view list of past transactions, or details of causes they donated to
  • Members who simply what to access their registered info on Salesforce

Here’s the steps to set it up: 

  1. Every User in WordPress has a unique user ID, you can check this out by visiting Users -> All Users from the WordPress Dashboard. Click on any user, you will see their user ID in the link on the page. We can get a list of all their IDs by exporting the users list using a free plugin like this one.
  2. The next step is to set up a field on Salesforce to identify them with their WordPress profile.

    once created, use Dataloader or Salesforce Import Wizard and update the IDs from your WordPress user ids list.
  3. Now we need a way to restrict access to certain pages on WordPress as Member only, use any of the plugins listed here. There are lot of free options in the WordPress plugins directory as well.
  4. Now when members log into to these pages that are protected by a login, WordPress identifies them as their users. All we have to do now is to connect to salesforce and pull info into WordPress related to the logged in user. Get the latest version of our plugin to do just this!
  5. Since we have the WordPress IDs now on Salesforce we can pull any records related them and display them on WordPress.

    Here’s how the ideal relationship would look like (Diagram made with draw.io)
  6. Navigate to the Add Cards & Tables screen on the plugin screen on WordPress. Let’s query a custom object named Session. 

    in this particular setup on Sessions is connected via Contacts through a Lookup field. We access the WordPress Id through a Formula field named Related WordPress ID.
  7.  Here’s how the filter can be setup : Related_WordPress_ID__c  = then select WordPress User ID. This will dynamically match retrieve Salesforce records with Related WordPress ID same as the ID of logged in user.
  8. All set! Copy paste the short code to your page, that is protected by the log in.

Was this article helpful to you? Yes 3 No 1