Skip to main content

Integration - Salesforce - "Add to SafeBase Button" Component

This guide is for customers that would like to use the "Add to SafeBase" button component in Salesforce (SFDC)

Written by Matt Szczurek

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.

Note: While still operationally capable of using the method, the API Key and Remote Site Configuration settings are considered deprecated. Instead, the more secure Named Credentials setup should now be used. Please see this section on configuration options

API Key Configuration (Deprecated)

  • In the top right corner, click the gear icon and enter Setup.

  • On the top left screen, find the QuickFind search box

  • Find Custom Metadata Types.

  • Find the line SafebaseHostToken, then click on Manage Records.

  • On the default record, Click Edit

  • Insert a SafeBase API Key in the Token field.

  • Click Save.

Remote Site Configuration (Deprecated)

The remote site connection ensures the reach the SafeBase API properly.

  • In the QuickFind search Remote Site Settings.

  • Click Edit for the GetSafebaseAccount record.

  • Ensure the Active checkbox is checked.

  • Click Save.

Create Named Credentials

  • In the QuickFind search Named Credentials

  • Click the External Credential tab

  • Find the SafeBase API label and click the little arrow thingy on the right

  • Click Edit

  • In the Custom Headers section, look for the value labeled Insert API Key Here

  • Click Edit

  • Add a SafeBase API Key

  • Good to go

  • Click Save

Bundled Permission Sets

This package comes with bundled permission set called SafeBase User

This permission set is required to install the 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.

Graphical user interface, text, application

Description automatically generated
  • Click Add Action, then find Add to SafeBase and click on it.

  • Search for the term SafeBase in the Components search box in the upper left

  • Drag the getSafeBaseAcccount function somewhere on the page.

  • The quick actions for the Add to SafeBase buttons 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.

Graphical user interface, application, Word

Description automatically generated
  • Select the layout record page to migrate to Dynamic Actions and click Finish.

Graphical user interface, text, application

Description automatically generated
  • 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 SafeBase in the Components search box.

  • Drag the getContactinSafebase component anywhere on the page.

  • The quick actions for the Add to SafeBase buttons 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 activating 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.

Graphical user interface, text, application, email

Description automatically generated

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

When utilizing the Add to SafeBase workflow, users will be able to upload a questionnaire directly from the Managed App.

After creating an account, navigate to the Upload Questionnaire tab in the managed app and upload a questionnaire file.

If the organization is a multi-product organization, the user will be able to select a specific product.

Once the file is selected, click Add to SafeBase. The uploaded questionnaire will appear in the Questionnaires section of the Trust Center and the submitted questionnaires section of the respective Account.

Troubleshooting

  • 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:

Did this answer your question?