Hi Nicholas, I believe that the name of the object needs to be passed -
const recordInput = {apiName: 'ORDER_OBJECT', fields};
this is passing the string literal 'ORDER_OBJECT' when you should be passing the variable-
const recordInput = {apiName: ORDER_OBJECT, fields};
or
const recordInput = {apiName: 'Customer_Order__c', fields};
#Integration69 debatiendo
- Actividad reciente
- Fecha de creación
- Recomendado
- Todas las preguntas
- Preguntas con una respuesta aceptada
- Preguntas sin respuesta
- Preguntas sin respuesta aceptada
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:
- An advisor logs in to the Advisor Portal using their existing portal credentials.
- The advisor searches for and opens a particular client.
- The advisor clicks New Task.
- Salesforce opens the New Task page with the relevant client record automatically populated in the Related To field.
- The advisor enters the task details and saves the record.
- The task is saved in Salesforce and associated with the correct client.
- 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
- What architecture would you recommend for this portal-to-Salesforce integration?
- How should we map the authenticated portal advisor to the correct Salesforce User?
- What Salesforce configurations are required, such as External Client Apps, OAuth settings, certificates, identity-provider configuration, or user mapping?
- How can we open Salesforce Lightning pages with the correct client record prepopulated?
- How can we ensure activities are recorded under the correct Salesforce user and respect that user’s permissions?
- Is it possible to achieve this without asking every advisor to log in to Salesforce separately?
- 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
23 oct, 10:31 For this pattern I'd use SAML SSO as the backbone, not token exchange.
1. Identity: make the portal's IdP (or your corporate IdP, if both sit behind it) the SAML Identity Provider for Salesforce, with My Domain login enabled. Map each advisor using the Federation ID on their Salesforce User record, and send that same value in the SAML assertion. Each advisor still needs their own Salesforce user and license.
2. Landing on a prefilled page: build the Lightning URL in the portal, for example /lightning/o/Task/new?defaultFieldValues=WhatId=<AccountId>, and pass it as the RelayState (or startURL) of an IdP-initiated SSO. If the advisor has no session, the SSO sets one up silently and they land on the prefilled form. If they already have a session, the deep link just opens.
3. Attribution and permissions: because the record is created in the advisor's own browser session, ownership, sharing and field-level security all apply automatically. That's the main reason to avoid creating activities through an integration user.
4. JWT bearer and token exchange are for API calls made on a user's behalf from your server. They don't give you a browser session, so they suit background sync, not opening Lightning pages.
Common pitfall: Federation IDs drifting out of sync when users are created. Automate user provisioning (SCIM or JIT provisioning) from day one.
Hello! My team is looking to create a Contact us Page on our web site and automate who receives emails based on the drop down option they choose. Has anyone tried this for a non profit. It looks like web-to-lead is likely the best way to go, but we don't utilize leads (or cases) much since we are non-profit. I've also been searching app-exchange. Any recommendations would be appreciated.
Michael Brown (Salesforce) Forum Ambassador
15 ago 2022, 15:55 Hi Tracy, Web-to-Lead could be an option, but the trick would be getting that information to tie back to a contact, which could be difficult, especially if you have existing contacts who would be filling this information out. One option for this is to spin up a non-authenticated experience cloud site. This can be done without using Experience Cloud licenses, and what you can do is embed a Lightning Flow on that Experience Cloud site. Your contacts can then go to this page, fill out the form, and then you could have the flow update that their contact accordingly. The trick would be getting the form to tie back to the correct contact, which you could do potentially by sending them a link with their contact id in the URL, or having them enter their email address in the form and using that to update the correct contact (Or creating a new contact if a contact with that email isn't found).
Hi Everyone,
I'm a Salesforce Administrator currently learning about SharePoint and Salesforce integration for document management, and I'd love to learn from your experience.
I'm interested in understanding how organizations use SharePoint with Salesforce to manage documents, folders, security, and document access efficiently. I'm also curious about best practices for folder structures, metadata synchronization, version control, and providing a smooth user experience.
As I'm still exploring this area, I would greatly appreciate any insights, recommendations, or lessons learned from real-world implementations.
Looking forward to hearing your ideas and experiences. Thank you!
#Trailhead Challenges #Salesforce Developer #Salesforce Admin #Salesforce #Sales Cloud #Trailhead
15 oct, 06:27 @Roopa Sharma, This is a good area to learn early. Many orgs end up with documents in both systems, and the friction shows up exactly where you listed. Here is how each one tends to play out once a setup is live.
- Where the documents live -
- SharePoint as the home, with Salesforce records pointing to it. The usual choice when the company already runs on Microsoft 365.
- Salesforce Files, when volumes are small and only CRM users need the documents. The Files related list is flat, with no folders per record.
- Ways to connect the two
- Files Connect (native): lets users browse, search and attach SharePoint files from Salesforce, but it does not create a folder per record.
- Power Automate: a good fit if your team already builds on the Microsoft side. The trade-off is that the logic lives outside Salesforce, on a premium connector.
- AppExchange apps: compare them on four things. Does Flow create a folder when a record is created? Do uploads from the record go straight to SharePoint? Do SharePoint's own permissions still apply? Can you trial it in a sandbox first?
- Your questions, in practice -
- Folder structure: mirror your data model (Account, then Opportunities, then each opportunity), with the same subfolders on every record. Add the record ID to folder names so a rename never breaks a link.
- Metadata: tag files with SharePoint columns such as document type, status and record ID, instead of relying on folder names.
- Version control: let SharePoint's version history handle it, and avoid saving copies back into Salesforce.
- Security: SharePoint decides who can open a file. Salesforce sharing does not carry over to SharePoint on its own, so plan who updates access when an account changes owner.
- User experience: users should reach a record's folder from the record page, without searching SharePoint.
If you go the AppExchange route, CloudFiles is one app that works this way with SharePoint. With its flow actions, each record gets a folder when it's created, and files are tagged as they arrive. Users open that folder from the record page, and SharePoint's permissions decide what each person can see. https://appexchange.salesforce.com/appxListingDetail?listingId=a0N4V00000Gh9uFUAR
Disclosure: I work at CloudFiles.
- Where the documents live -
Hi,
I am making callout to external system to get records out of 100 2 failed i want to retry those failed records till 3 time. Can someone help with code?
#Integration #Salesforce Developer
15 oct, 02:48 To handle retry logic in Apex for callouts (like retrying 2 failed records up to 3 times), you can use Queueable Apex with the Database.AllowsCallouts interface combined with custom exception handling or tracking failed record IDs. Try the following.
public class IntegrationRetryQueueable implements Queueable, Database.AllowsCallouts {
private List<Id> recordIds;
private Integer retryCount;
public IntegrationRetryQueueable(List<Id> recordIds, Integer retryCount) {
this.recordIds = recordIds;
this.retryCount = retryCount;
}
public void execute(QueueableContext context) {
List<Id> failedRecords = new List<Id>();
for (Id recId : recordIds) {
try {
// Perform your external callout logic here for recId
HttpResponse response = makeCallout(recId);
if (response.getStatusCode() != 200) {
failedRecords.add(recId);
}
} catch (Exception e) {
// Catch connection timeouts or callout exceptions
failedRecords.add(recId);
}
}
// If there are failures and we haven't hit the 3-attempt limit, chain the job
if (!failedRecords.isEmpty() && retryCount < 3) {
if (!Test.isRunningTest()) {
System.enqueueJob(new IntegrationRetryQueueable(failedRecords, retryCount + 1));
}
}
}
private HttpResponse makeCallout(Id recId) {
// Implement your HttpRequest and Http send logic here
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('https://api.yourtargetsystem.com/endpoint');
req.setMethod('POST');
// Set body based on recId...
return h.send(req);
}
}
There is a use case which I try to implement where the sandboxpostcopy interface is supposed to login to production and get some information, then insert the same back to sandbox.
As of now I have tried below modes of authentication :
1. External Cred + Named Cred + Username/Pwd - Not preferred
2. External Cred + Named Cred + Oauth 2.0 - Browser flow --- As I try to authenticate using this it requires an auth provider and Auth provider has callback URL based on sandbox. Thus the authentication fails.
3. External cred + Named Cred + Oauth 2.0 - Client Cred - Authentication works perfectly, but upon refresh client credentials are cleared and this prevents successful execution of sandboxpostcopy interface.
Any one tried something similar? Authenticating to salesforce production, retrieving the data and act on it?
Thanks
#Salesforce Developer #Integration
13 oct, 10:13 I had a chat with Salesforce and they suggested that this is not going to work. They suggested an option with Auth provider in apex, but doesn't guarantee the success. It still stays open 😅
When I try to create a record by sending a request, I get an error:
{
"errorCode": "NOT_FOUND",
"message": "The requested resource does not exist"
}
Here's an example of the request I am making:
url: https://myDomain.my.salesforce.com/services/data/v60.0/sobjects/Account
method: POST
authentication header: Bearer <token>
I am using JWT Bearer flow.
If I make a GET request to: https://myDomain.my.salesforce.com/services/data/v60.0/sobjects/
I get a response. But, if I make a GET request to https://myDomain.my.salesforce.com/services/data/v60.0/sobjects/Account
I get the same "he requested resource does not exist" response.
Not sure if that's related
8 oct, 17:49 One thing I would add is to treat credential rotation as a dependency-mapping exercise, not just a secret update. If several systems consume the same API credentials, documenting each integration, authentication method, owner, scopes, and last known usage can make future rotations much safer. This is especially important when APIs are being used across multiple workflows. For example, a nonprofit may have a verification service such as the Nonprofit Check Plus API connected to other systems, so keeping track of where credentials are used can prevent an unexpected integration failure after rotation. It’s also worth checking application and middleware logs for recent authentication calls before making the change. That can help identify less obvious consumers that may not be documented in Salesforce or Marketing Cloud. Once the new credentials are deployed, monitoring for authentication failures provides another layer of confirmation that no integration was missed.
Showing feature request status in Salesforce when product uses JPD and engineering uses Azure DevOps
I recently wrote up how teams connect Jira Product Discovery to Salesforce on one side and Azure DevOps on the other. The part that stuck with me is how far a simple sales question has to travel.
An AE wants to know if the feature their customer asked for has shipped. The request was logged in Salesforce. Product prioritized it in Jira Product Discovery (JPD), and engineering built it in Azure DevOps.
What usually happens
Product copies the approved idea into Azure DevOps by hand: title, description, maybe acceptance criteria. From then on, the two drift apart. Engineers update status, add comments, and link work in their own tool, and it doesn't get reflected in JPD.
So product opens Azure DevOps to check, sales pings product, and the roadmap stops matching what's shipping.
What's already there natively
JPD has a built-in Salesforce integration. Your team can paste a Salesforce record link into an idea and show fields from that record, such as account or opportunity details. That covers context flowing into product. It works one link at a time; it's read-only, and nothing flows back to Salesforce.
Getting status back to Salesforce takes a build. That could be Flow or Apex calling Jira, Jira Automation calling Salesforce, MuleSoft, or a third-party connector. Whichever route you pick, the same decisions come up.
Decisions worth making before anyone builds
Decide where each piece of data starts. Customer context starts in Salesforce, priority starts in JPD, and delivery status starts in Azure DevOps. Give every field one owner, so two systems never edit the same value.
Check which JPD fields can actually move. Standard fields and custom scores like impact or effort are usually fine. Insights, views, and formula fields are harder, and formula fields don't come through the Jira API at all. If product prioritizes a formula field, find that out before anyone promises sales a view built on it.
Keep it to one idea per epic. JPD doesn't carry the epic, feature, and story breakdown, so that split happens in Azure DevOps after the handoff. Mirroring the full hierarchy back into JPD or Salesforce adds a lot of work for very little that sales would use.
Translate statuses for sales. "Ready for QA" means nothing to an AE. Agree on a short list they understand, such as requested, approved, in development, and released, and map everything else to it.
Sort out access early. Product and engineering rarely hold admin rights in each other's tools, and some security policies block one system from signing into another directly. This comes up often enough that it belongs in the first planning conversation, before anyone has picked a tool.
For anyone who's closed this loop: where does your sales team see feature request status today? On the Account, on the Opportunity, or somewhere else entirely?
#Integration
Hello! We are exploring an integration between our Salesforce (NPSP) and NetSuite systems. We do not have in house skill capacity to do this and have been speaking with implementation partners. We've been pitched Celigo and MuleSoft as potential tools.
The basic process we are hoping for would be:
- Sales team enters invoicing information into Salesforce
- When TBD trigger is activated, Salesforce sends the info to Netsuite, booking the revenue and generating an invoice
- Human reviews invoice, approves, and then ideally system sends it off (though open to a Human sending it :))
- Payment information is input into Netsuite
- When TBD trigger is activated, Netsuite sends payment info to Salesforce, recording payment details and marking opportunities as paid
If you have experience with Celigo, MuleSoft, or another tool, would love to hear any pros or cons! Feedback on implementation partners also welcome.
Thanks!
Marie
#Integration
7 oct, 16:05 Would Customers and Products have to be synced between SFDC and NetSuite before this could work?
We're adding various sync recipes in our Sync Hub (in the Yoxel Sync app) and we're considering this one for sure.
Hello,
I am looking for a solution to one way sync events from a Public Salesforce calendar to a Shared Outlook or Individual Outlook account. So team would manage new event creation in Salesforce shared calendar and user would only SEE (View only) events in his Outlook Calendar.
Any ideas on how I could accomplish this?
6 oct, 14:47 Is there still interest in this?
https://www.yoxel.com/blog/ms-teams-salesforce-public-calendar-sync/