This lesson will cover the following topics:

02 | Use Case

01 Getting Started

This tutorial covers best practices when mapping an encrypted ID to your URL.

02 Use Case

If you are missing information about your Salesforce contacts, you can send each contact a unique link for them to update and complete their information.

An every-time page load action was configured to run a Salesforce get that will retrieve the user’s details. A condition was added to the Salesforce get that the ContactI ID must equal the contact_id global variable.
creating conditions for salesforce actions

The same condition was applied to a Salesforce push that will run when the user clicks the submit button to update their contact details.

When the user enters your project with their corresponding Contact ID being passed through the URL, their information will automatically be populated. An issue with this is that Record IDs can often be similar, this means that a user can change a letter and potentially view another contact information and update it.
Example of how the ID passed information to the project fields

03 Encrypting ID in Salesforce

To resolve exposing the Record ID to users, navigate to your Salesforce account. The Titan package allows you to encrypt any field for your object. This means you can encrypt your record IDs.

You need to simply create a new field on your relevant Salesforce object, and make sure that it is a text type and can contain 150 characters.

Next, navigate to Flows in the Salesforce Setup screen and follow these steps:
1. Click the New Flow button.
new flow button in Salesforce
2. Select Record-Triggered Flow and select Create.
selecting record triggered flow
3. For this example, we have selected the Contact object to trigger when a record is created or updated, and the condition requirements must be met.
select object configuration
4. Click the + Icon in your Salesforce flow.
plus icon in the action flow
5. Select Action.
select action for the record triggered flow

6. Choose the Form_Builder_FT_Encryption_Util action.

7. Give the action a Label.

8. Choose the id as the field_api_name_to_encrypt.

9.  Find your custom encrypted ID field under field_api_name_to_save_encrypted_value.

10. Add the Salesforce object under object_Api_Name.

11. Choose the record id for record_id.

12. Click Done.

13. Save and Activate your flow. When any record on this object is created or updated, the encrypted id will be populated.


configuring the new action

Save and Activate your Flow. When your record is updated, the encrypted ID will populate.
screenshot showing a populated encrypted id

04 Use the Encrypted ID on Your Titan Project

For the Salesforce GET to identify the record based on the encrypted ID, the GET conditions must be updated to use the new Encrypted ID Salesforce field instead of the record ID.
changing conditions to reference encrypted id

Now you will be able to pass the encrypted ID through the URL to display the contact information without risking the user accessing another contact’s information.
passing the encrypted id through the url

05 Got Feedback?