Overview:
This guide will go over the step by step on how to implement the Parent Account Tagging Flow inside Salesforce.
The flow we will be building will follow the below diagram:
To review what the use cases of the Parent Account Tagging please see: Parent Account Tagging Use Case.
PREREQUISITES/ASSUMPTIONS
1) You must have the System Administrator Profile on your user or a profile that has the ability to access the 'Process Builder' and the 'Flow Builder' functionality.
2) We will be be creating the flow where the DU level will be the parent of the LS Matched. If you would like for the GU level to be the parent, substitute all areas that references DU for GU.
SETUP
1) Navigate to Setup > In the Quick Find search for 'Flow'
2) Create 'New Flow'.
3) Drag over the 'Get Record' from the left hand side 'Toolkit' pallet
Label: Find Parent Account
Description: Give description is you would like, this is an optional field.
Object: Account
Condition Requirements: Select 'Conditions are Met'
Select 'New Resource'
Resource Type: Variable
API Name: Child_DU_LSID
Data Type: Text
Availability Outside the Flow: Select both 'Available for input' & 'Available for output'
Make sure to assign the variable that you just created in the Condition:
Sort Account Records
Sort Order: Descending
Sort By: LastModifiedDate
(This is if two account records with the same LSID to take the most recent record. Can also use 'CreatedDate' and take the newest or oldest as well).
How Many Records to Store
Select 'Only the first record'
Select 'Manually assign variables (advanced)' on the bottom.
Where to Store Field Value: Update 'In separate variables'
Select Variable to Store Account Fields
Field: Id (Account ID)
Variable:
Select 'New Resource'
Resource Type: Variable
API Name: Parent_SFDC_ID
Data Type: Text
Availability Outside the Flow: Select both 'Available for input' & 'Available for output'
Make sure to assign the variable that you just created in the Variable section
4) Connect the Start to the 'Get Record' widget
5) Drag over a 'Decision' widget from the left hand side palate.
Label: Parent Found
Outcome Details:
Label: Is Found
When to Execute Outcome: Select 'All Conditions are Met'
Resource: Select 'Parent_SFDC_ID' (the variable that was created in the Get Records)
Operator: Is Null
Value: GlobalConstant.False
We know the Parent Account is found when we were able to find the SFDC Account ID.
6) Connect the Get Record widget to the Decision
7) Drag over an 'Update Record' widget
Label: Give it a name, example 'Update Child Record'
How to Find Records to Update and Set Their Values:
Toggle to 'Specify conditions to identify records, and set fields individually
Update Records of This Object Type:
Object: Account
Filter Account Records:
Field: ID (Account ID)
Operator: Equals
Value: New Resource
Resource Type: Variable
API Name: Child_SFDC_ID
Data Type: Text
Allow for Input and Output
Remember to assign the variable
Set Field Values for the Account Records
Field: ParentID
Value: Select the variable that you created in the GET Records: 'Parent_SFDC_ID'
8) Connect all the widget. This will be for the 'Is Found' path.
9) Save, give you flow a name (ex: Parent Account Tagging Flow)
Type: Autolaunched Flow
Remember to 'Activate' the flow in the previous flow page
10) Now we will need to go to the 'Process Builder' and call this flow. In the Quick Search, search for 'Process Builder'.
11) Create a New process:
Name: LS Parent Account
Description: (Optional) - can give description of what this process does
The process starts when: Select 'A record changes'
11) Add Object
Object: Account
Start the process: Select 'when a record is created or edited'
12) Add Criteria: These are the Criteria for the Parent Account Tagging flow will trigger. I've listed the basic ones that, please feel free to add for any additional that are part of your business.
Criteria Name: Account Enriched
LSID Changed? TRUE
LSID Is Null? FALSE
DU LSID Is Null? FALSE
Parent Account Is Null? TRUE (we do not want to overwrite the Parent Account field
LSID Does NOT Equal DU LSID (this prevents a Parent being a Parent of themselves)
13) Add Action
Select: Flows
Action Name: Execute Parent Account Tagging Flow
Flow: Select the 'Parent Account Tagging Flow' that you created above
Set up the flow variables for the 2 'Child' variables:
Child_DU_LSID Field Reference DU_LSID
Chid_SFDC_ID Field Reference ID (Account ID)
14) Activate
You have just setup the Parent Account Tagging Flow in Salesforce.
Please keep in mind that Process Builder Flows are in affect moving forward. To catch up your existing Accounts you will need to tweak the flow and add a 'Run Activation' field.
If you have any additional questions or like to add a would like to tweak/enhance this flow such as in the absence of a DU LSID fallback to GU LSID or any other variation please reach out to us at support@leadspace.com.
Use Cases
What if an inbound lead that come in is already be tied or related to an account that is already in your database? Seeing how accounts are related to each other would be a good way for the Sales team to collaborate especially if a related or parent account is already a customer.
Solution
With Leadspace’s Parent Account Tagging flow, Leadspace will append the Parent Company if a matching LSID is found to the field called ‘Parent Account’. On the account level, you can also drill into the ‘View Hierarchy’ view to see the full hierarchy based on the accounts you have your Salesforce database. This way you can see the ultimate parent as well any ‘siblings’ that are related to the account you are working on.
What is the trigger?
LSID Changes = TRUE
LSID is NOT Null
Parent Account (standard field) is NULL
LSID does NOT = DU (or GU) LSID
How it works:
Leadspace will look to see if there is a match between LSIDs. If a DU LSID (or GU LSID) matches an existing account’s HQ LSID this would be a child of that account. Similarly if two accounts has the same DU LSID (or GU LSID), these two accounts would be a ‘sibling’ of one another.
As an example, Successfactor has a parent account of SAP. You will be able to see in the account view the ‘Parent Account’ field populated:
If you click on the ‘View Hierarchy’, you will be taken to a new view that will show the entire hierarchy that is in your database.
As new accounts come in that are related to SAP (ex: Ariba), you hierarchy tree will be updated in SalesForce accordingly.
A visual of how the flow would work would be:
Benefits:
There are many benefits to having the Parent Account Tagging flow Flow.
- Identifies the hierarchal tree for your accounts that are in your database.
- Company name will display in the ‘Parent Account’ field in SFDC if match is found inside right in the standard Account object.
If you would like to learn about reports to use please reference Parent Account Tagging Report article for more details.
If you would like more information about setting up this flow, please reach out to support@leadspace.com and we will be happy to set up a call.
Linked Articles
https://support.leadspace.com/hc/en-us/articles/360000806585-SalesForce-Parent-Account-Tagging-Report