Discourse Salesforce

:discourse2: Summary Discourse Salesforce allows synchronization between Discourse Users and Salesforce leads/contacts, and enables Salesforce Social Login
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-salesforce
:open_book: Install Guide How to install plugins in Discourse

Sync between Salesforce leads/contacts & Discourse users

You can create a Salesforce lead or contact from any Discourse user using the post menu. To easily distinguish those users it will display a poster icon next to the username in posts. And it will add linkbacks to these Discourse user profiles in corresponding Salesforce objects.

Also, you can filter these leads and contacts by Discourse user groups. And you can track user activities from the Salesforce chatter wall.

Sync between Salesforce cases & Discourse topics

You can create a Salesforce case for any Discourse topic from the topic admin menu. And you can view the case number and status below to the topic’s first post content. Also, you can filter these topics by tags that are configurable through site settings. And you can view topic replies from Salesforce’s case comments list.

Screenshot 2022-02-15 at 9.52.58 PM

Social Login

This plugin will also enable a Social Login with Salesforce, making it easier for your patron to sign up on Discourse.

Configuration

Step 1: Get to the External Client App Manager

Hit Setup in the cog at the top right. Search for “External Client App Manager”.

📸


Step 2: Create New External Client App

Fill in “Basic Information”, then enable OAuth Settings.

The callback URL should be

  • https://<your-discourse-site>
  • https://<your-discourse-site>/auth/salesforce/callback

Add these Available OAuth Scopes

  • Access the identity URL service (id, profile, email, address, phone)
  • Manage user data via APIs (api)
  • Perform requests at any time (refresh_token, offline_access)

In Flow Enablement

  • Enable Client Credentials Flow
  • Enable JWT Bearer Flow (This is for creating leads and contacts)
    • Generate a certificate
    • upload the server.crt file (this walkthrough assumes you would generate a server.crt and server.key file)
    • Keep the server.key file for your site

Save.

📸



Step 3: Get the new External Client App’s Consumer secrets

On the newly created External Client App, go to the Settings tab then scroll down to expand OAuth Settings.

Click on “Consumer Key and Secret”, fill in login credentials again and then move on to the next step.

📸

Step 4: Fill up details in Discourse Salesforce plugin settings

Head to https://<your-discourse-site>/admin/plugins/discourse-salesforce/settings

There are six + one settings to update

  • Check “salesforce enabled”
  • Check “salesforce login enabled”
  • Fill in “salesforce client id” using the Consumer Key from previous step
  • Fill in “salesforce client secret” using the Consumer Secret from previous step
  • Fill in “salesforce rsa private key” with the server.key file that you generated above
  • Fill in “salesforce username” with an admin email in your Salesforce org. This must be a System Administrator in Salesforce.
  • If you have a custom salesforce domain: salesforce authorization server url

Step 5: Authorize your Discourse app for Salesforce

Go to https://<your-discourse-site>/salesforce/admin/authorize

You will be prompted to authorize the app.

📸

:discourse2: Hosted by us? This plugin is available on our Enterprise plans.

Last edited by @nat 2025-10-02T18:54:14Z

Check documentPerform check on document:
13 Likes

Hi there,

I seem to have hit some snag along the way while trying to complete this process. As the configuration portion of this wasn’t super clear I followed a combination of this guide and This one from SalesForce

I have created the app on the sales force side with oauth and the self-signed server.crt uploaded to the app. The call back URL (Step 6 in the salesforce guide) I put in https://login.salesforce.com as the default in discord settings as the suggested local host URL didn’t make much sense. We have the consumer key and secret as well as the RSA key and my salesforce admin email address all entered in the discourse plugin settings for salesforce but we are not seeing things like the created lead generation on the discourse side. Does anyone have a step-by-step guide we can review or any insights in testing and getting this sorted out?

Thanks!
Tim

I added a few more detailed steps in the configuration section in the OP.

2 Likes