Configuring OAuth 2 > Salesforce

Note: Single Sign-on may not be available in your plan. Please contact your Advocacy Coach to learn more.

This article will cover how you can configure your OAuth 2 setup in the AdvocateHub using Salesforce. This provides your Advocates with a seamless, easy way to enter your hub once they are logged into a Salesforce app, for example, Salesforce Community.


Configuration In Salesforce

You must be an logged into Salesforce as an Administrator to complete these actions.

1. Create an app in Salesforce by going to Build > Create > Apps

2. Scroll down to the Connected Apps section and click the new button.

3. You should be greeted with an initial setup page where you will enter the following information (if we do not reference a field below then it can be left empty)

Field Name Value
Connected App Name Influitive AdvocateHub (This is not important, call it whatever makes most sense for your organization)
API Name Influitive_AdvocateHub (Again, not important, you can choose whatever name you like)
Contact Email
Enable OAauth Settings (Checkbox) Tick this checkbox
Callback URL https://{{yourhubdomain}}.influitive.com/users/auth/custom_oauth2/callback
Selected OAuth Scopes Access your basic information (id, profile, email, address, phone)
Require Secret for Web Server Flow (Checkbox) Tick this checkbox

It should look something like the below:

4. Save your app, you will get a notification saying that it should take 2-10 minutes for the changes to take effect. Click continue.

5. You should see a page with displays your App information. Keep this page open as we move into the AdvocateHub to complete the setup. Note the Consumer Key and Consumer Secret:


Configuration in AdvocateHub

1. In your AdvocateHub, navigate to Integrations > Custom OAuth Provider and click the manage button.

2. Once you are in the integration, go to the Setup tab. Fill out all the fields as below (again, if we do not reference a field below then it can be left empty)

The below values are different if you are connecting with your Salesforce Community, please see the Configuring Salesforce Community section.

Field Name Value
Client ID Grab this from your Salesforce Connected App (Salesforce refers to it as Consumer ID)
Client Secret Grab this from your Salesforce Connected App (Salesforce refers to it as Consumer Secret)
Endpoint https://login.salesforce.com
Token URL https://login.salesforce.com/services/oauth2/token
Authorize URL https://login.salesforce.com/services/oauth2/authorize
Fetch User Path https://login.salesforce.com/services/oauth2/userinfo
UID Lookup user_id
Name Lookup name
Email Lookup email

3. Make sure to save and everything should be up and running!


Configuring Salesforce Community

The only difference to worry about when setting up an OAuth connection with your Salesforce Community is to use different Endpoints. Please copy the below settings replacing influitive-comm.force.com with your Salesforce domain and customerportal with the name of your Salesforce Community

Field Name Value
Client ID Grab this from your Salesforce Connected App (Salesforce refers to it as Consumer ID)
Client Secret Grab this from your Salesforce Connected App (Salesforce refers to it as Consumer Secret)
Endpoint https://influitive-comm.force.com/consumerportal/s/login/
Token URL https://influitive-comm.force.com/consumerportal/services/oauth2/token
Authorize URL https://influitive-comm.force.com/consumerportal/services/oauth2/authorize
Fetch User Path https://influitive-comm.force.com/consumerportal/services/oauth2/userinfo
UID Lookup user_id
Name Lookup name
Email Lookup email

Add Final Cosmetic Touches

1. Staying on the same page you will notice another field called Display Name which will display like below for your Advocates when they are logging in.

2. Finally, you have the option to upload images as you can see above in the previous screenshot above. Look at  Salesforce Official Asset Folder for the perfect image for you. simply download the image you want from there or any other source and upload to the hub!

Final Step! Go to the Settings tab of the integration and toggle it On

For more information on Using OAuth2 to authorize applications, check out  the Salesforce article on this topic.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us