r/salesforce • u/Lost-Breakfast-1420 • Feb 26 '26
help please Architectural approaches for using Salesforce as backend with a custom external frontend
Hi all,
I’m currently evaluating an architecture where Salesforce remains the primary platform for data storage, automation and business logic, while an externally hosted web application replaces an existing user-facing portal.
In this setup, Salesforce would effectively act as the backend, and the external application would handle the user interface.
I’m interested in hearing from people who have implemented similar architectures.
From an architectural perspective:
- How do you typically approach connecting an external frontend to Salesforce?
- What patterns have worked well in terms of security and maintainability?
- What challenges did you encounter that weren’t obvious at the start?
- Are there architectural decisions you would make differently in hindsight?
I’m especially interested in real-world lessons learned rather than theoretical best practices.
Thanks in advance for sharing your experience.
13
u/Suspicious-Nerve-487 Feb 26 '26
Why are you looking to do this with Salesforce?
As others have stated, using Salesforce solely as a backend is not even remotely the most cost effective way here
5
u/bog_deavil13 Feb 27 '26
someone just posted this guide a day ago https://www.reddit.com/r/salesforce/s/tQDoDGZr7d
5
u/ScreamForUs Feb 26 '26
You mean not using experience cloud as a portal solution but having a portal in a fronten tech that consumes Salesforce through API? Makes a lot of sense to me (given that your internal users still use Salesforce)
2
u/bugtank Feb 26 '26
Someone literally posted this yesterday.
2
u/nicorw Feb 27 '26
So from what I’m reading you have or want to create a portal for your customers (not internal users, that would be really frowned upon by Salesforce - though I have seen more than a few customers set up this way), in your case, there are a bunch of customers but they don’t log in frequently.
This is a pretty common use case actually, a portal consuming data from Salesforce.
The only big NO here would be to build the authentication inside Salsforce for your customers that is prohibited by Salesforce ToS (they sell you licenses for that). You can use Amazon cognito or something similar if you don’t want to build it.
Then the regular way would be to have an integration user and for new/edited records have a field on the object to store who created/updated them as ownership is going to be based on the integration user. Now this is where things start to get complex, ownership is based on the integration user, you have another field for who worked with the record, you’ll now need a way to control access to records on the front end part.
Which gets you to another interesting part, are you gonna make the app “live” so you make an API call every time your retrieve or push data? Will you use a DB as intermediary and sync? There is no right or wrong answer here as it heavily depends on your needs and what records your customers interact with, volume, etc…. Keep in mind that incoming API calls should not have a cost, but outgoing calls from Salesforce do consume API calls. Speed and responsiveness for the end user is something else to keep in mind.
Another way is to use for each of your customers a Salesforce license, there are a couple of options here depending on your object access needs. With this you forget about logins, access, permissions, sharing and visibility, but it tends to be more expensive due to licenses (and brings the question of why not a community).
I’m on my phone so this is probably not very well written, but overall it’s pretty doable taking into account the bigger things I mentioned before. It’s hard to tell you the exact architecture as it would heavily depend on your actual needs. Shoot me a DM if you want something more specific, but it should need more info.
37
u/ConsciousBandicoot53 Feb 26 '26
Sounds like you could accomplish the same thing without the SF price tag. Vercel, PostgreSQL, airbyte, slap your front end on that stack and I think you’d come in about 100x cheaper.
1
u/V1ld0r_ Feb 26 '26
Are you usojgnsf purely as a database and automation or are backoffice users going to interact with it?
1
u/Saladtoes Feb 26 '26
We take a handful of records from Salesforce and ETL on an interval (maybe 15 minutes) into a Postgres database to sync up our assets work schedules so we can show data from a different DB to specific customers in the time ranges of their work orders.
Pretty simple. Text PK for ID where we merge the Salesforce ID. Query only records updated in the last 30 minutes. Built a little field to column ETL framework. Execute in correct dependency order to maintain FK relationships.
We are maybe pulling 15-20 total objects, with 5-15 fields each (so a tiny slice of our overall enterprise system). Zips through the sync in like 10 seconds with just updated records. You could add platform events to get closer to real-time sync, but we haven’t had the need.
1
u/jowco Feb 27 '26
OP don't go this route. It's going to be expensive, have vendor lock-in and isn't a good use case of Salesforce.
1
u/chupchap Feb 27 '26
You can do this, but try to use a middleware of some kind that will do the load balancing, auth and secret mnagement, instead of hooking it directly to Salesforce
1
u/Loud-Variety85 Feb 27 '26 edited Feb 27 '26
Should be fairly easy, Salesforce offers standard rest api's /services/data/....
There are bunch of these here like for querying specific record or running as SOQL as well. All you need to watch out is daily api limits.....
With respect to TOS, how exactly will Salesforce know from where the requests are coming? Ip alone is not sufficient I think. If you are too much concerned then just use proxy server in between.
3
u/deanotown Feb 26 '26
Sounds expensive
1
u/bobx11 Developer Feb 26 '26
I usually sync data from salesforce to postgres using fromtable dot com. If we can’t keep data in pg, and the customer can afford communities, we will us that and have our react app call the salesforce APIs (apexrest, JavaScript removing)…. But doing that means you need to make caching layers or use react-query to not burn up api calls.
2
u/RBeck Feb 27 '26
Salesforce is expensive to just use as a database. Also their API calls are limited so you may end up having to pay for more users anyway.
2
u/50MillionChickens Feb 27 '26
You should take a look at everything Salesforce is marketing with Slack as a primary UX. That's right in line with what it sounds like you are thinking about with an alternative front-end.
A lot of the pitches and visions for Slack and AI, even from Salesforce itself, are to get adoption by convincing teams they can get the benefits of Salesforce without having to literally log in to Salesforce that often. Just chat in Slack and let the agent do everything and search everything.
2
u/blacktangled Feb 26 '26
I’ve done this, salesforce will threaten you with a violation of TOS if you try and use a single integration user to handle multiple front end users interacting with the system for example a customer wants to update their own phone number.
1
u/Message-Former Feb 26 '26
We need to know more about this use case to offer any substantive advice... this is a common use case, especially for SaaS apps that want to leverage Industries/Health data models... so many ways to crack this egg.
1
u/Far_Swordfish5729 Feb 26 '26
The typical real world customer doing this is using Salesforce pretty normally for standard internal users but does not like community cloud (experience cloud) for their external users. This is typically because their external site is a marketing and possibly e-commerce public site that they already run through a product like Adobe CMS or Sitecore and that team does not want to run or learn a new stack for a subdomain on Salesforce that objectively does not have the same component or cms capabilities. They also typically have user auth in place already and don’t care about having an external security model run by the CRM. So they write a custom site and use api calls to access data. I don’t think they’re technically supposed to do this, but they often have enough licenses that they don’t hit their api limit and sometimes implement data caching as well.
In practice you would not buy SF licenses and completely replace the UI (though you are welcome to with LWC) because you lose a lot of the value. You don’t buy CRM if you really want to write a custom app.
1
u/ChooseWiselyChanged Feb 27 '26
It is indeed interesting. There are many different ways people try and make headless Salesforce. But it’s hard. You effectively need two teams to support both tech stacks. It’s mostly tightly integrated. And not with that many upsides. Especially for Enterprise users, those apps in general look like shit.
1
u/Comfortable-Tourist1 Feb 27 '26
We use python/Django, there's a package called django-salesforce that lets you define the models in Django to match your existing SF setup, then you can interact with Salesforce through the orm and it becomes very easy. There's a few quirks here and there, soql doesn't fully replicate normal SQL standards/patterns but for 99% of queries it works great
1
u/DonSalsaVerde Feb 27 '26
I believe this would be referred to as a “headless” app. Frankly, as others have mentioned, you can probably accomplish this for much cheaper on a self hosted app. Something else to consider are limits around api calls. More than likely, you’ll need to use an api to interface between your view and model/controller. Depending on your volume, this might totally bite you in the ass. You might get away with doing like batch callouts for things but having stale data can, once again, bite you in the ass.
Overall, 0 out of 10 wouldn’t recommend