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.
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 have donated to
- Members who simply what to access their registered info on Salesforce
Here’s the steps to set it up:
- 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.
- 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.
- 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.
- 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!
- Since we have the WordPress IDs now on Salesforce we can pull any records related them and display them on WordPress.
- 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.
- 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.
- All set! Copy paste the short code to your page, that is protected by the log in.