Salesforce Communities Authentication 


In this Article
Related Articles

Overview

If Salesforce Communities (formerly Salesforce Portal) authentication is enabled for a form, only authenticated users can access the form. Using this authentication combined with the Salesforce Prefill Connector, you can also prefill the form with the authenticated user's information.


Requirements

You'll need a FormAssembly Enterprise Plan and have a Salesforce Customer or Partner Portal set up.


Enable the Salesforce Communities Authentication

  1. Select Processing Options for the form you'll be working with.
  2. In the Allows Responses From: section, choose Salesforce Community Users.
  3. Click configure.

Configure Salesforce Communities Authentication

Step 1. Portal Address & Organization ID

In the configuration page for your form's Salesforce Portal Authentication, the Portal Login URL and Organization ID are required. By adding in your portal login URL, you will direct all users who are not in a current session to your authentication page to log in to the portal.

If you do not know your portal address, you can access the administration page for your community from Salesforce by going to: setup → customize → communities → all communities.  From there, you will see the URL listed next to the Community you are planning on working with.

If you do not know your organization ID, you can access it by going to: setup → company profile → company information.

Step 2. Form Link

To add your form into your Salesforce Community, use the first link provided in step 2. You may place this link in a tab, link, or button within the portal to direct your users to the form.  

Please note, your form will only be available from the page with the form link.  If a respondent attempts to access the form through a FormAssembly link, it will require authentication, but it will not redirect the respondent back to the form after authentication is completed.

If you are using the link on a Visualforce page, then you will want to use the second link that is provided.  Please note, you will need to be familiar with Apex and Visualforce in order to use this link.  The link will be in the following format:

<apex:outputLink value="PASTE VISUAL FORCE LINK HERE" id="theLink">Click here to log into the form.</apex:outputLink>

Note:
  • This link will only work within Salesforce.
  • This link will only be accessible to users who have logged into the portal.
  • You may reset the form link by clicking the reset link.
  • If you disable and then re-enable the Salesforce Portal authentication for this form, your form link will change, and you will need update your portal's tabs, links, or buttons accordingly.

If you are using Visualforce you can can also use <apex:iframe> to embed the form as an iFrame within the page.

Step 3. Options

If Save & Resume is enabled for your form, you can enable it to automatically resume the last saved response once the user has been authenticated.  In order to enable this, you will need to check the box under step 3 of the community configuration page and then hit apply at the bottom:

Authenticated users who save their response will be able to automatically resume their response the next time they log in. (Users who saved more than one response before auto-resume is enabled will still be able to pick which response to resume.)

Step 4. Prefilling Options

If you are using the prefilling connector with your Communities authentication, you can use the %%SF_PORTAL_USER_USERID%% alias in order to lookup a User ID and any information associated with your users.

Note: You'll need to setup this lookup as a Formula and not an unsafe query parameter.

Step 5. Setting Profile API Access

You will also need to give API access to the specific profiles that will be accessing your Community.

This can be done by going to Admin → Manage Users → Profiles → "Name of profile you want to give access to" → Administrative Permissions → API Enabled


Video Tutorial


Resolving Common Publishing Issues

If you are running into difficulty getting your form published on your Salesforce Communities page, please read these common issues below to make sure that you've completed the necessary steps for publishing.

Enable API Permission for Community User Profile

Please ensure that you have given API access to the specific profiles that will be accessing your Community.

This can be done by going to Admin → Manage Users → Profiles → "Name of profile you want to give access to" → Administrative Permissions → API Enabled

Check your Organization ID

Double check that you have entered the correct Organization ID under Step 1 of the configuration process. Your Organization ID can be found by going to Setup → Company Profile → Company Information

Use an Apex Link

If you are adding the link to a Visual Force page, a button, or as a tab, you will need to wrap the link from Step 2 in Apex tags:

<apex:outputLink value="PASTE VISUAL FORCE LINK HERE" id="theLink">Click here to log into the form.</apex:outputLink>

Form Access

When using this method, your users will not be able to navigate directly to the form. They will always need to login to your Community, and then click on a link or a tab to be directed to the form.

Terms of Service · Privacy Policy