Overview
Users can create a flow within the LinkSquares Analyze integration in Salesforce to populate all agreements associated with a chosen Salesforce object, such as opportunities or accounts, on the pages for those objects.
Note: This workflow is intended to be executed by a Salesforce Administrator. Please keep in mind that all Salesforce instances are different. You should consider how your Salesforce instance is set-up before creating any flow.
Process
The process for creating this flow consists of several parts:
- Creating a New Lookup Field on the LinkSquares Agreement Object
- Creating a Single Related List
- Linking the Agreement Lookup Field and Parent ID
This workflow will use the opportunity and account objects in a decision tree style. Some workflows within this process are outlined once but will need to be executed for both the opportunity and account objects.
Creating a New Lookup Field on the LinkSquares Agreement Object
First, users must create lookup fields to associate the relevant Analyze agreements with the chosen Salesforce objects.
Users must execute this process for both the opportunity and account Salesforce objects. The following process uses the opportunity Salesforce object as an example.
1. Select the Setup gear icon in the upper right-hand corner of your Salesforce instance and select Setup.
2. Navigate to the Object Manager tab.
3. Locate and select the LinkSquares_Agreement_c object by scrolling or using the search bar.
4. Select the Fields and Relationships category from the panel on the left-hand side of the screen.
5. Click New in the upper right-hand corner.
6. Select Lookup Relationship as the data type.
7. Click Next.
8. Select one of the Salesforce objects you create your contracts on from the Related to drop-down.
9. Click Next.
10. Insert a field label and field name.
11. Click Next.
Note: The field name cannot have any spaces or special characters.
12. Select which user roles the lookup field will be visible to.
13. Select the pages that this field should appear on.
14. Click Next.
15. Select the pages on which the custom-related list should appear.
16. Click Save.
Creating a Single Related List
Next, users must add a related list component to the chosen Salesforce object pages. The list of Analyze agreements that are associated with the Salesforce object will appear on these related lists.
Users must execute this process for both the opportunity and account Salesforce object. The following process uses the opportunity Salesforce object as an example.
1. Navigate to an opportunity record page.
2. Click the setup gear icon and select Edit Page.
3. Drag and drop the Related List - Single component from the left-hand panel onto the opportunity page.
4. Set the Parent Record field to Use this Opportunity.
5. Set the Related List field to LinkSquares Agreements.
6. Click Save in the upper right-hand corner and return to the opportunity record page once complete.
Linking the Agreement Lookup Field and Parent ID
Finally, users must create a flow to ensure that as Analyze agreements are executed, they are recognized by the system and added to the chosen Salesforce object pages. This flow allows users to access the relevant agreements without navigating to the Salesforce Analyze app.
Creating a New Flow
Flow Overview
1. Click the Setup gear icon and select Setup.
2. Navigate to Platform Tools > Process Automation > Flows using the panel on the left-hand side of the page.
3. Click New Flow in the upper right-hand corner.
5. Select Record-Triggered Flow.
6. Click Create.
7. Select LinkSquares Agreement from the Object field.
8. Select A record is created or updated from the Configure Trigger section.
9. Click X in the upper right-hand corner of the panel.
Creating a Decision Tree
1. Click the + icon on the flow to add an element.
2. Select Decision.
3. Enter a name for the decision tree in the first Label field.
4. Enter Opportunity in the Label field under the Outcome Details section. This field will act as the name for the first condition of the decision tree.
Note: These labels can be anything. The respective API Name field will automatically populate based on the given label.
5. Select All Conditions Are Met (AND) from the Condition Requirements to Execute Outcome drop-down.
6. Select $Record LinkSquares__Agreement__c > LinkSquares__Parent_Table__c from the Resource drop-down.
Note: LinkSquares__Parent_Table__c is nested under $Record LinkSquares__Agreement__c.
7. Select Equals from the Operator drop-down.
8. Enter Opportunity into the Value field.
9. Click the + icon next to the OUTCOME ORDER section.
10. Enter the Account into the Label field under the Outcome Details section. This field will act as the name of the second condition of the decision tree.
11. Select All Conditions Are Met (AND) from the Condition Requirements to Execute Outcome drop-down.
12. Select $Record LinkSquares__Agreement__c > LinkSquares__Parent_Table__c from the Resource drop-down.
Note: Follow the same process as outlined in Step 6.
13. Select Equals from the Operator drop-down.
14. Enter Account into the Value field.
15. Click Done.
Get the Opportunity and Account Record Elements
1. Click the + icon under the Account element.
2. Select Get Records under the Data section.
3. Get Opportunity By Parent Id
4. Does Opportunity Exist
5. Get Account By Parent Id
6. Does Account Exist
Add Opportunity Id Lookup
1. Click the '+' sign under the Yes Decision
2. Select Update Records under the Data section.
3. Give the record a Label.
4. Select None - Always Update Record from the Set Filter Conditions drop-down.
5. Select the Opportunity lookup field created in the Creating a New Lookup Field on the LinkSquares Agreement Object section of this article for the Field under the Set Field Values for the LinkSquares Agreement Record section.
6. In the Value field, select Opportunity From Get_Opportunity_By_Parent_ID > Opportunity ID
7. Click + Add Field.
8. Select the Account lookup field created in the Creating a New Lookup Field on the LinkSquares Agreement Object section of this article for the Field under the Set Field Values for the LinkSquares Agreement Record section.
9. In the Value field, select Opportunity From Get_Opportunity_By_Parent_ID > Account > Account ID
Add Account Id Lookup
1. Click the '+' sign under the Yes Decision
2. Select Update Records under the Data section.
3. Give the record a Label.
4. Select None - Always Update Record from the Set Filter Conditions drop-down.
5. Select the Account lookup field created in the Creating a New Lookup Field on the LinkSquares Agreement Object section of this article for the Field under the Set Field Values for the LinkSquares Agreement Record section.
6. In the Value field, select Account From Get_Account_By_Parent_ID > Account ID
Click Save.
The completed flow may look like the following example.
Saving the Flow
1. Click Save in the upper right-hand corner of the Flow Builder.
2. Give the flow a label.
Note: The flow can be labeled anything. The Flow API Name field will populate automatically based on the given label.
3. Click Save.
Activating the Flow
Click Activate in the upper right-hand corner to activate the flow.
See attached LinkSquares Salesforce Flow for a high-level overview of the entire process.
The relevant agreements should now populate on the chosen Salesforce object. For assistance with testing and debugging, please contact your Integrations Specialist or support@linksquares.com.