Overview
SafeBase's Salesforce (SFDC) "Add to SafeBase Button" component is an optional feature that allows users to create accounts, invite contacts, and/or upload questionnaires from within the Salesforce platform. It enables a proactive, instead of reactive approach that can fit in existing sales pipeline workflows.
Install & Setup
Before this component can be configured, organizations must have completed the initial install as described here.
Set a SafeBase API key
SafeBase API key is stored as a masked authentication parameter on the packaged SafeBase API external credential, which the callout header reads via a formula. Set it up in three steps:
Confirm formula headers are enabled.
Go to Setup → Named Credentials → SafeBase API → make sure Allow Formulas in HTTP Header is on.
The package ships it enabled, but a Salesforce security checkpoint can switch it off during install or upgrade, turn it back on (and Save) if needed.
Confirm callouts are enabled.
On the same SafeBase API named credential, make sure Enabled for Callouts is on.
The package ships it enabled, but a Salesforce security checkpoint can switch it off during install or upgrade, turn it back on if needed.
Add the SafeBase API key.
Open the External Credentials tab → SafeBase API → under Principals, edit SafeBasePrincipal.
First, confirm the SafeBase User permission set appears under Principal Access, it ships linked to the principal and is what lets your assigned users authenticate.
Under Authentication Parameters, click Add → set Name to exactly ApiKey (case-sensitive) and Value to the SafeBase API key → Save.
The key is stored masked. (If SafeBase User isn't listed under Principal Access, reinstall the package rather than deleting and recreating the principal, that removes the link.)
The package ships a custom header named x-sb-api-key on the SafeBase API named credential, with its value set to the formula {!$Credential.SafeBase_API.ApiKey} (it may appear with a safebase__ prefix in the org, same credential).
That formula is what reads the key from the ApiKey parameter and sends it with each callout. There is not a need to create or edit this header, just make sure the parameter is named exactly ApiKey so the formula can find it.
Bundled Permission Sets
This package comes with a bundled permission set called SafeBase User
This permission set is required to install the Add to SafeBase component and grants field-level access to the SafeBase package fields and access to its Apex classes
In the QuickFind search Permission Sets
Locate the SafeBase User permission set name
Click Manage Assignments
Click Add Assignment
Assign the required users or groups
Click Next
Select Expiration Options (if required)
Click Assign
Add Fields to Account & Contact Page Layouts
This section will modify the Account Page Layout to add the appropriate custom fields that the app requires.
Account Page Layout
At the top of the page, click the tab Object Manager.
Find and click Account.
In the left side column, click Page Layouts.
Click the default Account Layout to open it in edit mode.
Note: If there are multiple layouts in use, repeat the following for each layout.
From the Fields box, click and drag a Section onto the page.
Name the section SafeBase.
Click Ok
Note: This step is only required to have a separate SafeBase section to avoid clutter. Users can optionally drag these fields to an existing section.
From the Fields box, drag and drop the following fields into the newly created SafeBase section:
SafeBase: Account Share Link
SafeBase: Number of Invited Contacts
SafeBase: NDA Provider
SafeBase: NDA Done
SafeBase: ID
Once the fields are added:
Hover over each
Select the wrench icon
Set each to Read-Only
Do this for each field
Click Mobile & Lightning Actions
Use quick find to search for Add to SafeBase button.
Drag and drop the Add to SafeBase button into the Salesforce Mobile and Lightning Experience Actions section.
Click Save.
Contact Page Layout
These steps replicate the configuration created for the Account Page Layout.
At the top of the page, Click Object Manager, Contact, Page Layouts, then select the default Contact Layout.
In the Fields box, drag and drop the SafeBase: Invited into one of the existing sections or create a new section for it.
Once the fields are added:
Hover over each
Select the wrench icon
Set each to Read-Only
Do this for each field
In the Mobile & Lightning Actions section, Drag the Add to SafeBase button to the Salesforce Mobile and Lightning Experience Actions section.
In the Mobile & Lightning Actions section, Drag the Resend SafeBase Invite Email button to the Salesforce Mobile and Lightning Experience Actions section.
Click Save.
Add Buttons to Account & Contact Record Pages
Account Record Page
This modifies the Account Record Page to make the Add to SafeBase button visible.
Return to the Salesforce default Sales page.
Open any Account, click the Gear icon, then Edit Page.
Click on the highlighted panel at the top where the buttons will live, and click Upgrade Now in Upgrade to Dynamic Actions on the right.
Note: Steps 3-6 may not be applicable if ‘Dynamic Actions’ have been previously enabled.
Click on Migrate and Next.
Select the layout record page to migrate to Dynamic Actions
Click Finish.
Click Add Action, then find Add to SafeBase and click on it.
Search for the term
SafeBasein the Components search box in the upper leftDrag the
getSafeBaseAcccountfunction somewhere on the page.The quick actions for the
Add to SafeBasebuttons call Lightning Web Components (LWCs) directly, so they don’t need to be hidden.
Click on Save, then Activate in the pop-up.
If a popup does not show, click Activate
Note: These steps are not necessary if the layout is already the default one.
When the page is activated, optionally, make the page layout with the SafeBase functionality the App default, or depending on the App, record type, and profile assignments.
Contact Record Page
These steps are similar to those completed for the Account Record Page, but this will also add filters to the 2 buttons.
Open any Contact,
Click the Setup icon and then click on Edit Page.
Click on the highlighted panel where the buttons will live
Find the Upgrade Now option in the Upgrade to Dynamic Actions box
Note: This may not be required if this was previously enabled.
Click on Migrate and click Next.
Select the layout record page to migrate to Dynamic Actions and click Finish.
Locate the top highlight panel and click on it.
Click Add Action
Find the Add to SafeBase action and and click on it.
Click Add Filter:
Click on Record Field as the Filter Type.
In Field search for and select SafeBase: Invited.
In Operator select Equal.
In Value select False
Click Done.
Add the second filter. Click Add Filter:
Click on Record Field as the Filter Type.
In Field search for and select Email.
In Operator select Not Equal.
Leave Value blank.
Click Done.
Add the third and final filter for this button. Click Add Filter:
Click on Advanced as the Filter Type.
In Field section click the Select button
In the popup, select Record in the first, Account Name in the second, and Account Name in the third select box.
Click Done.
In Operator select Not Equal
Leave Value blank
Click Done
Select All filters are True radio button.
Click Done.
The steps for the next button are similar, but only one filter is needed.
Click the Add Action, find the Resend SafeBase Invite Email and click on it.
Click Add Filter:
Click on Record Field as the Filter Type.
In Field search for and select SafeBase: Invited.
In Operator select Equal.
In Value select True.
Click Done.
Click Done
In the upper left, search for
SafeBasein the Components search box.Drag the
getContactinSafebasecomponent anywhere on the page.The quick actions for the
Add to SafeBasebuttons call Lightning Web Components (LWCs) directly, so they don’t need to be hidden.
Click on Save on the top right corner
Click Activate in the next popup, or click on Activation
Note: These steps are not necessary if the layout is already the default one.
When you activate the page, the page layout with the SafeBase functionality can be made the App default, or depending on the App, record type, and profile assignments.
App Usage
Add Contacts from an Account Page
Add one or more contacts from an Account Page using the Add to SafeBase button.
Scenario 1: The account has never been added to SafeBase
In this scenario, the Account has not been created in SafeBase yet, and no Contacts have been invited.
Users will see a modal popup that allows for an optional description, select a Permissions Profile, and an NDA Provider.
Click Next. One or more Contacts can be added, with an option to send an email notification and an optional message. Click Add to SafeBase to complete the process.
A success message will display at the top of the page:
No further action is required. If the Send Email Notification option is used, the Contact will receive an email with full instructions on how to proceed.
Scenario 2: Account exists in SafeBase, but adding additional Contacts
If the Account has already been added to SafeBase, users can add additional Contacts. Users will be taken directly to the list of Contacts. There is a column to indicate if a Contact has already been added.
Select the appropriate Contact(s) and click Add to SafeBase to complete the process.
A success message will display at the top of the page:
No further action is required. If the Send Email Notification option is used. The Contact will receive an email with full instructions on how to proceed.
Add a Contact from a Contact Page
Note: This process will also create the Account in SafeBase if it has not already been done.
Scenario 1: An account has not been created
For accounts not yet created in SafeBase, the user will be prompted to create one.
Click Next, and proceed to add the Contact:
A success message will display at the top of the page:
Scenario 2: The Account has already been created in SafeBase
If the Account exists in SafeBase, users will be directed to add the Contact:
You will see this success message at the top of the page:
Resending an Invite Email for a Contact
After a Contact has been added, refreshing the page will now show a Resend SafeBase Invite Email button in place of Add to SafeBase.
Use this button to send a new invite email with an optional message to the Contact:
Uploading a Questionnaire
Security questionnaires can be sent to SafeBase directly from Salesforce, either by uploading the questionnaire file or by submitting a link to the questionnaire in the customer's portal. Submitted questionnaires are added to the Trust Center's Questionnaires queue for review and response.
Prerequisite: The account must already exist in SafeBase. If it does not, click Add to SafeBase on the Account or Contact record and create the account first.
Submit a Questionnaire
On the Account or Contact record, click Add to SafeBase, then select the Upload Questionnaire tab.
Under Submission Type, select one of the following:
File: for questionnaires received as a document.
Portal Link: for questionnaires hosted in the customer's vendor or security portal.
For File submissions:
Under Attach Questionnaire, click Upload Files or drag the file into the drop zone. The attached file appears below the upload area; click the × on the file to remove it and select a different one.
For Portal Link submissions: Enter the full URL of the questionnaire, including
https://, in the Portal URL field.
(Optional) Enter a Due Date to record when the customer requires a response. Leave the field blank if there is no deadline.
For organizations with multiple products: Under Products, select each product the questionnaire applies to. The first product is selected by default, and more than one can be selected.
Click Add to SafeBase. The button becomes available once a file is attached or a portal URL is entered, and at least one product is selected.
After submission
A confirmation message is displayed, and the questionnaire appears in:
The Trust Center's Questionnaires section, where it can be assigned and answered.
The account's submitted questionnaires.
If a due date was entered, it is displayed on the questionnaire in SafeBase.
Portal Link or Due Date not available? These options require SafeBase for Salesforce version 1.28 or later. A Salesforce administrator can upgrade the package by following Integration – Salesforce – Installation/Migration Guide.
Upload Questionnaire tab not visible? The tab may be disabled for the organization. Contact support@safebase.io to enable it.
Customizing the Managed App
The SafeBase managed app can be configured to match an organization's sales workflow. For example, options that sales representatives don't need can be hidden, and defaults can be set so every account is created the same way.Options that can be shown or hidden
Upload Questionnaire: the Upload Questionnaire tab.
NDA Provider: the NDA Provider picker shown when an account is created.
Permissions Profile: the Permissions Profile picker shown when an account is created.
Defaults that can be set
Default NDA Provider: the NDA provider selected automatically for new accounts.
Available NDA Providers: limits the picker to specific NDA providers.
Default Permissions Profile: the permissions profile selected automatically for new accounts.
Available Permissions Profiles: limits the picker to specific permissions profiles.
By default, all options are shown and no defaults are set.
Requesting changes
To change these settings, contact support@safebase.io or reach SafeBase Support through live chat. Include which options should be shown, hidden, or pre-selected.
Changes apply to every user in the organization who uses the managed app, and take effect the next time the app is opened.
Requires SafeBase for Salesforce version 1.27 or later.
Troubleshooting
Upload Questionnaire tab, NDA Provider picker, or Permissions Profile picker not visible? The option may be disabled for the organization. Contact support@safebase.io to enable it.
The Add to SafeBase button is not visible.
Verify with a Salesforce Admin that the Managed App has been configured properly.
Contacts need to be associated with an Account and have a valid email before the button will be visible.
The Contact has been added, but they are saying they never received an email.
Sometimes emails get caught in Spam filters. Contact SafeBase via live chat at support@safebase.io.
You see a "null reference error" or something similar.
Verify that the following fields have field-level security set to visible so that the app can access them:
For the Account object:
Id
Name
Description
Contact_Required_for_Account_Creation__c (SafeBase custom field)
For the Contact object:
Id
email
Name
FirstName
LastName
AccountId
Account.SafeBaseId__c (SafeBase custom field)
Account.Name
Invited__c (SafeBase field)
Account.Description
Null reference errors may also be due to unsupported characters in account names. At the moment, we will not be able to create an Account in SafeBase if the name contains characters other than:
Upper or lowercase letters
Numbers
Spaces
Special characters
|
,
.
'
"
/
\
&
(
)
+
-
A Data Flow Diagram for this managed app is available for review























