How to Connect Salesforce to WordPress
Do you want to connect Salesforce to WordPress?
MailOptin offers seamless integration with Salesforce, so you can automatically create leads, contacts, accounts, or subscribers in Salesforce from your email signup forms or optin forms.
You can follow the step-by-step guide below to learn how to connect MailOptin with your Salesforce account.
Note that our Salesforce integration only works with account that has API access. API access is only available on these Salesforce editions: Enterprise, Developer, Unlimited and Performance. Learn more.
How to Connect MailOptin With Salesforce
To connect your WordPress site to Salesforce via MailOptin, we must create a Salesforce Connected App first.
Creating a Salesforce Connected App
Log into your Salesforce account and navigate to the Setup page by selecting the gear icon in the top-right corner of the browser window.
Navigate to App >> App Manager and click the “New Connected App” button.
When creating your app, the following details are required for the app to function correctly with MailOptin:
- Connected App Name — we recommend using “MailOptin Salesforce Connect”.
- API Name — this field will be automatically populated
- Contact Email — This field is required for any app you create in Salesforce
- Enable OAuth Settings — this checkbox must be enabled
- Callback URL — This is usually
https://yourwebsite.com/wp-admin/admin.php?page=mailoptin-integrations&moauth=salesforceand you should replace
yourwebsite.comwith your website domain name.
- Selected OAuth Scopes — Add the following scopes (highlight each scope, then click the “Add” arrow): Manage user data via APIs (api) and Perform requests at any time (refresh_token, offline_access)
When you are finished configuring the App, click Save.
Next, we need to retrieve the newly created app’s API credentials (Consumer Key and Consumer Secret).
On the app details page, click on “Manage Consumer Details”.
The next page would reveal the Consumer Key and Consumer Secret. Copy and save them somewhere, as we will need them next.
MailOptin Integration with Salesforce
Go to MailOptin >> Integrations.
At the Salesforce Connection section, enter the Consumer Key and Consumer Secret from the Salesforce app you created earlier and save.
After saving, click the “Authorize your Account” button.
You will be redirected to a page on Salesforce asking you to log into your account securely. Enter your Salesforce credentials, and after logging in, select the Allow button to grant OAuth access.
And that’s it! Your Salesforce account is connected to WordPress.
You can see that we have a success message on the Salesforce settings page in MailOptin.
Having completed the setup, you can now start capturing leads.