+ Start a Discussion

Customer portal: site visitors' self-registration


We'd like to set up a customer portal targeting a specific set of visitors of our website - a force.com site in this case.

We need to set a process where the visitors can fill in a form and get access to the portal, immediately. No action required on our side.

Visitors are likely people not in our Salesforce org.

Does anyone know how to achieve that?



You'll need to know Apex / Visualforce. Take a look at the SiteRegister sample class that gets created all with your site.

Shashikant SharmaShashikant Sharma

Steps to achieve this :


1) Enable a Site  for your Org

2) Create a Site Register Form to ask information from the registering supplier

3)Create a controller class to save the input given by registering supplier and create a portal user for him, you can directly login the supplier in portal or show him a succesfully registered message, as per your req

4)Don't forget to use captcha in registering page.

5)Add the page to site pages so that guest user has the right

6)All the objects that you want to take as input from registering supplier, please provide rights on them to guest profile.







I've made some test.


  • Contacts can be enabled for customer portal.
  • Leads cannot be enabled for customer portal.
  • Person Accounts can only be enabled as high-volume portal users and they cannot self-register.
  • Thus, a website visitor can only be created in Salesforce as portal user/contact of an Account.

If true, in terms of business process, this means skipping the lead conversion process and everything that goes with it, and being forced to manage 'person accounts' as contacts with dummy accounts (unless you get a high-volume portal).


Furthermore, at pag 24, the 'Force.com Sites Implementation Guide" states that the built-in registration process "Creates a new contact, if one doesn't already exist, and associates it with the account for the site".


My understanding is that I can only set 1 default account for the new contacts.

Technically speaking, it works: I've amended the siteregister, put the ID of a dummy default account for new customer portal users, and get the new registrations as contacts under this default account.

But am I right re the assumption that I can only use 1 default account?





Hi Sashikant,


I am new to salesforce development and had a few questions below. I need to create a self register page for our site on salesforce.


In the steps below in:

2) Create a Site Register Form to ask information from the registering supplier


Does it mean I need to write the same as a apex page and then a controller in the backend? OR that make use of come already available feature in salesforce ?


Currently the new page that I create shows the header and footer on it as well unlike the login page. I do not want to inherit the header and footer to this self register page as well. Is there a way to achieve the same?