1

I am trying to understand how the partner portal setup is working in my organization. My sincere apologies if this question is inappropriate for this forum?

Here is how the partner portal setup is in my company:

1) We have a portal user management section on the contact detail page showing some information(VF page) related to the partner portal.

enter image description here

2) For this VF, we have a controller and in that controller I see the below code:

    public PageReference loginAsPortalUser(){
    Contact con = new Contact(Id = currentId);
    con.Portal_User_Notification_Type__c = 'Login As';
    con.Portal_Token_Expiry_Date__c = Datetime.now().addMinutes(5);
    update con;

    con = [SELECT Id, Portal_Temporary_Token__c, Portal_Token_Expiry_Date__c FROM Contact WHERE Id =: currentId];

    String portalServer = 'https://sometest.herokuapp.com';
    if(UserInfo.getOrganizationId() == 'NNNSDFSWEZDSDSDCAA'){ // Prod Org Id
        portalServer = 'https://company-portal-app.herokuapp.com';
    }

    PageReference newPage = new PageReference(portalServer + '/portal_user/login_as');
    newPage.getParameters().put('expires', String.valueOf(con.Portal_Token_Expiry_Date__c.dateGMT()) + ' ' + String.valueOf(con.Portal_Token_Expiry_Date__c.hourGmt()) + ':' + String.valueOf(con.Portal_Token_Expiry_Date__c.minuteGmt()));
    newPage.getParameters().put('contact_id', con.Id);
    newPage.getParameters().put('token', EncodingUtil.urlDecode(con.Portal_Temporary_Token__c, 'UTF-8'));

    return newPage;       
}

3) Below image is the settings page for one of the partner portal:

enter image description here

My questions are :

  1. Why we have herokuapp in the controller code for the VF page?
  2. Is heroku needed to implement partner portal?
  3. How do partner portal users log into the partner portal? Is it by accessing the login URL in the second image?
  4. I understand that partner portal users are contacts in the salesforce then what do they use for userID and password when logging into the partner portal?

I think few of my questions are really dumb or may be I need to read the help document but I am really confused on how this partner portal setup is working in this particular case.

Can somebody please explain me on what is going on here? I tried to look up the partner portal implementation guide but could not find any. All I found is the salesforce online help and it does not have much details.

Please let me know if you need more details.

2
  • 1
    Just curious is the SSO login enabled? What happens when you invoke the loginasPortalUser() method; does it take you to the heroku app or does it redirect back to the salesforce partner portal?
    – Sam
    Commented Jun 11, 2015 at 5:33
  • No..Single sign on is not enabled. When I click on login As Portal user button it takes me to the heroku app.
    – javanoob
    Commented Jun 11, 2015 at 10:34

2 Answers 2

2

Firstly, Salesforce has stopped partner portal implementation in the new orgs and only those created before summer '14 (not 100% sure which release) have the ability to create partner portals.

Coming to your questions:

Why we have herokuapp in the controller code for the VF page?

All that method is doing is invoking a heroku app on the click of the button. If you see the method implementation correctly you will find that it is sending some contact info as parameters. The reason why you're navigating to a heroku app is something that you should check with the person who implemented this logic.

Is heroku needed to implement partner portal?

You do not need Heroku to implement partner portal. Partner Portal is a product of salesforce and it has no dependency on external systems. Although, salesforce now recommends that the portal is migrated to the new offering, Communities.

How do partner portal users log into the partner portal? Is it by accessing the login URL in the second image?

Yes, you're correct. The partner portal setting provides a login url (which is different from the normal login url) which will be used by partner users to login.

I understand that partner portal users are contacts in the salesforce then what do they use for userID and password when logging into the partner portal?

Partner account are companies which help the main company (the Salesforce Org owner) to sell the products / services. Now each of these partner companies have many users working and these are stored as contacts. Now if some of these contacts needs to access salesforce then you have to create a user record from the partner contact (check here for a detailed process on how to create the user record from contact) and the once that is done, the user can login to salesforce with the user record that got created.

Hope this helps!

0

I checked with the people here and this is what it is implemented in my company. It is not really partner portal.

We have a app running on heroku and that app is used by partners who are given access to that app and this app makes webservice calls to salesforce and displays data to the user.

You must log in to answer this question.

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