Skip to main content

Hi Salesforce Community,

I’m looking for guidance on the right approach for integrating an external web portal with Salesforce, particularly around user authentication, identity mapping, and opening Salesforce record actions in the correct user context.

1. Business Scenario

We have an external web portal called Advisor Portal, where advisors log in using their portal credentials. After logging in, an advisor selects a client and views the client’s details.

On the client details page, the advisor should be able to perform Salesforce activities through actions such as:

  • New Task
  • New Note
  • Log a Call
  • New Event
  • Send Email

When the advisor clicks one of these actions, the corresponding Salesforce page should open with the selected client’s Account or relevant record automatically populated. The advisor should not have to search for the client again in Salesforce.

2. Expected Behaviour

For example:

  1. An advisor logs in to the Advisor Portal using their existing portal credentials.
  2. The advisor searches for and opens a particular client.
  3. The advisor clicks New Task.
  4. Salesforce opens the New Task page with the relevant client record automatically populated in the Related To field.
  5. The advisor enters the task details and saves the record.
  6. The task is saved in Salesforce and associated with the correct client.
  7. The activity should be attributed to the appropriate Salesforce user, based on the required business and security rules.

The same principle should apply to Notes, Calls, Events, and Emails, with the appropriate Salesforce page and record context for each action.

3. Main Technical Challenge

The advisor is authenticated in the external portal, but may not already have an authenticated Salesforce browser session.

We need to understand how to securely identify the logged-in portal advisor, map that identity to the corresponding Salesforce User, and open Salesforce under the correct identity without unnecessarily requiring the advisor to log in again.

We also need to distinguish between obtaining an OAuth access token for Salesforce API calls and establishing a browser session for opening Salesforce Lightning pages. We understand these may require different mechanisms.

4. Approaches We Are Exploring

We would appreciate guidance on whether any of the following approaches would be suitable:

  • Single Sign-On (SSO) and Federation: Can SSO be used to authenticate the advisor in Salesforce based on their existing portal or identity-provider session?
  • OAuth 2.0 Token Exchange: Can the external advisor’s identity be exchanged for a Salesforce access token representing the mapped Salesforce user?
  • JWT Bearer Flow: Would this be appropriate for server-to-server authentication, or would it be unsuitable if Salesforce needs to recognise each individual advisor?
  • Salesforce Lightning Deep Links: Can we open standard Salesforce New Task, New Event, Log a Call, Note, and Email pages with the appropriate client record prepopulated?
  • Apex REST or Middleware: Would a Salesforce Apex REST endpoint or an integration layer be needed to resolve the client and user mapping securely?

We would also like to understand whether a combination of SSO for the browser session and OAuth for backend API access is appropriate.

5. Questions for the Community

  1. What architecture would you recommend for this portal-to-Salesforce integration?
  2. How should we map the authenticated portal advisor to the correct Salesforce User?
  3. What Salesforce configurations are required, such as External Client Apps, OAuth settings, certificates, identity-provider configuration, or user mapping?
  4. How can we open Salesforce Lightning pages with the correct client record prepopulated?
  5. How can we ensure activities are recorded under the correct Salesforce user and respect that user’s permissions?
  6. Is it possible to achieve this without asking every advisor to log in to Salesforce separately?
  7. Are there any limitations with deep links, browser sessions, OAuth Token Exchange, or JWT Bearer Flow that we should consider?

I’m a Salesforce developer and would appreciate a practical explanation of the end-to-end authentication flow, required prerequisites, and recommended implementation approach.

If anyone has implemented a similar external portal integration, shared a reference architecture, or has relevant documentation or examples, I would be grateful for your guidance.

Thank you! 

 

#Salesforce Developer  #Integration

2 个回答
  1. 10月28日 08:49

    Hi Prasanth, friendly reminder that the community goes read-only on Oct 30. Has this been resolved on your side? If my answer helped, accepting it as the best answer would be much appreciated. Glad to help further if needed.