Is it possible to build a custom customer portal that access Salesforce data without a user? For example: the portal would be a web app written form scratch, and it would communicate with Salesforce through APIs.

Can this be done without registered users on the org, while keeping a good authentication for the API?

What I mean by this is that the web app would need to authenticate with Salesforce when making requests, but I would like to do this without using Salesforce user credentials.

I know that this could be done with the web app using credentials/tokens that can be analyzed at the beginning of the API request handling with Apex, but I'm not sure if this is secure enough.

If there is another way of doing this, I would like to know.

The context is that I want to create a portal for specific customers, so they would be able to see/track orders, for example. I'm not sure of how many users from these customer companies would use the app (hence the need for not using Salesforce licenses, because they are too expensive for this situation).

Also, Salesforce has a limit of 100 communities per org, so if I get more than 100 customers that use this service, Salesforce would not be able to provide what I need.

At the end I need an individual customer portal, since each customer has different needs.

  • 1
    So, you need to have at least one user so that you can at the very least have a guest user. As far as your connection to an external, non salesforce app, I couldn't say for sure. Can you elaborate on what you are stating in regards to the limit of 100 communities? You can have thousands of users under a single community.
    – Logan
    Jun 25, 2017 at 20:02
  • What I meant is that the ratio of community per customer would be 1:1, but the business isn't limited to 100 customers like the communities. Each community would be a customized experience for the specific customer. Jun 25, 2017 at 20:33
  • 2
    You can achieve this by creating dynamic fields on a custom object that is related to the contact. Have URL to banner image, style class options they can pick from, available views based off of criteria, etc. You don't need a new community per customer.
    – Logan
    Jun 25, 2017 at 22:01
  • Do you have an example? How would custom functionallity be controlled then? Profile-based? Jun 25, 2017 at 22:59
  • 1
    In Communities it is possible to have page variations based on Profile or Location of the customer using standard functionality across the entire community. Salesforce refer to this as Audience Targeting help.salesforce.com/…
    – Dave Humm
    Jun 26, 2017 at 8:01

1 Answer 1


This example will be done with Lightning Attributes, but you could use VF page with custom controller just as easy.

public static List<ObjectName__c> getInfo(){

List<User> usr = [SELECT Id, ContactID FROM User WHERE Id = : UserInfo.getUserId()];
List<Contact> cont =  [SELECT Id, LookupFieldToObject__c FROM Contact WHERE Id = : usr.get(0).ContactID limit 1];

    return [SELECT Id, imgURL__c, bannerClass__c
        FROM ObjectName__c
        WHERE Id = : cont.get(0).LookupFieldToObject__c
        Limit 1

The following would be your cmp:

<div class="{!v.bannerClass}" style="{!'background-image:' + v.bannerImage}">
    <h4>Thank you for returning <br></br>

<div style="{!'display: ' + v.displayType}">
    Information to show or not show, that is the question.

I used some of this for another explanation Here

The point is, that you don't need a new community for each user, because this small example shows how you can change the look and feel of everything, per user.

  • I often use a formula on such objects that output text like: "darkClass", "lightClass", "none", "block", that can then be used in the html style or class, so that it becomes more dynamic... I added the "none" and "block" to my example, in the portion for display, so that you can dynamically hide or show divs...
    – Logan
    Jun 26, 2017 at 12:31
  • Obviously, you would have a "darkClass" and a "lightClass" in your CSS, so that when it did dynamically change, the style you want would be reflected. A picklist that the user can select is another option so that they can pick what CSS they want...
    – Logan
    Jun 26, 2017 at 12:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .