├── Data Architecture Blueprint.vsdx ├── B2B Labs Sample Data Workbook Workshop.xlsx.zip ├── _config.yml ├── force-app └── main │ └── default │ ├── classes │ ├── FindDuplicateAccounts.cls-meta.xml │ └── FindDuplicateAccounts.cls │ ├── aura │ └── showToast │ │ ├── showToast.cmp-meta.xml │ │ ├── showToast.design │ │ ├── showToast.cmp │ │ ├── showToastController.js │ │ └── showToastHelper.js │ ├── objects │ └── Account │ │ ├── fields │ │ ├── Account_Process_Ran__c.field-meta.xml │ │ ├── D_B_Update_Completed__c.field-meta.xml │ │ ├── Exclude_from_Automation__c.field-meta.xml │ │ ├── D_B_DU_DUNS__c.field-meta.xml │ │ ├── D_B_GU_DUNS__c.field-meta.xml │ │ ├── D_B_HQ_DUNS__c.field-meta.xml │ │ ├── D_B_Parent_DUNS__c.field-meta.xml │ │ ├── D_B_Location_Type__c.field-meta.xml │ │ ├── DNB_D_U_N_S_Number__c.field-meta.xml │ │ ├── D_B_DU_Business_Name__c.field-meta.xml │ │ ├── D_B_GU_Business_Name__c.field-meta.xml │ │ ├── D_B_HQ_Business_Name__c.field-meta.xml │ │ ├── D_B_Parent_Business_Name__c.field-meta.xml │ │ ├── External_ID__c.field-meta.xml │ │ ├── Entity_Type__c.field-meta.xml │ │ └── Data_Quality_Score__c.field-meta.xml │ │ └── validationRules │ │ ├── Valid_Email_Format_Syntax.validationRule-meta.xml │ │ ├── US_Phone_Number_Has_Ten_Digits.validationRule-meta.xml │ │ └── Mailing_Address_Fields_Are_Required.validationRule-meta.xml │ ├── duplicateRules │ ├── Account.Finding_Same_Name.duplicateRule-meta.xml │ └── Account.Acct_Dupe_Action1.duplicateRule-meta.xml │ ├── matchingRules │ └── Account.matchingRule-meta.xml │ ├── flows │ ├── Map_Branch_to_Hierarchy.flow-meta.xml │ ├── Data_Quality_Alert_Message.flow-meta.xml │ ├── Find_Duplicate_Accounts_in_Heirarchy.flow-meta.xml │ ├── Map_HQ_to_Hierarchy.flow-meta.xml │ ├── Map_True_Branch_to_Hierarchy.flow-meta.xml │ ├── Map_Single_Location_to_Hierarchy.flow-meta.xml │ └── Account_Hierarchy_Builder.flow-meta.xml │ └── profiles │ └── Admin.profile-meta.xml ├── sfdx-project.json ├── manifest └── package.xml └── README.md /Data Architecture Blueprint.vsdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabdisfdc/b2bdatastratlearninglabv1/HEAD/Data Architecture Blueprint.vsdx -------------------------------------------------------------------------------- /B2B Labs Sample Data Workbook Workshop.xlsx.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabdisfdc/b2bdatastratlearninglabv1/HEAD/B2B Labs Sample Data Workbook Workshop.xlsx.zip -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: Designing Data Strategies for Complex Customer Relationships 2 | description: Learning Lab Repository Related to the B2B Solution Architect Program 3 | show_downloads: false 4 | google_analytics: 5 | theme: jekyll-theme-minimal 6 | -------------------------------------------------------------------------------- /force-app/main/default/classes/FindDuplicateAccounts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /force-app/main/default/aura/showToast/showToast.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 42.0 4 | A Lightning Component Bundle 5 | 6 | -------------------------------------------------------------------------------- /sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { 4 | "path": "force-app", 5 | "default": true 6 | } 7 | ], 8 | "name": "b2bdatastratlearninglabv2", 9 | "namespace": "", 10 | "sfdcLoginUrl": "https://login.salesforce.com", 11 | "sourceApiVersion": "51.0" 12 | } 13 | -------------------------------------------------------------------------------- /force-app/main/default/aura/showToast/showToast.design: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/Account_Process_Ran__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Account_Process_Ran__c 4 | false 5 | false 6 | 7 | false 8 | false 9 | Checkbox 10 | 11 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_Update_Completed__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_Update_Completed__c 4 | false 5 | false 6 | 7 | false 8 | false 9 | Checkbox 10 | 11 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/Exclude_from_Automation__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Exclude_from_Automation__c 4 | false 5 | false 6 | 7 | false 8 | false 9 | Checkbox 10 | 11 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_DU_DUNS__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_DU_DUNS__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_GU_DUNS__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_GU_DUNS__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_HQ_DUNS__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_HQ_DUNS__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_Parent_DUNS__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_Parent_DUNS__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_Location_Type__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_Location_Type__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/DNB_D_U_N_S_Number__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | DNB_D_U_N_S_Number__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/aura/showToast/showToast.cmp: -------------------------------------------------------------------------------- 1 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_DU_Business_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_DU_Business_Name__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_GU_Business_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_GU_Business_Name__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_HQ_Business_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_HQ_Business_Name__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/D_B_Parent_Business_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D_B_Parent_Business_Name__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/aura/showToast/showToastController.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, salesforce.com, inc. 3 | * All rights reserved. 4 | * Licensed under the BSD 3-Clause license. 5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | ({ 8 | invoke : function(component, event, helper) { 9 | var args = event.getParam("arguments"); 10 | 11 | var message = component.get("v.message"); 12 | var type = component.get("v.type"); 13 | helper.showToast(type, message); 14 | 15 | } 16 | }) -------------------------------------------------------------------------------- /force-app/main/default/aura/showToast/showToastHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, salesforce.com, inc. 3 | * All rights reserved. 4 | * Licensed under the BSD 3-Clause license. 5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | ({ 8 | showToast : function(type, message) { 9 | var toastEvent = $A.get("e.force:showToast"); 10 | toastEvent.setParams({ 11 | "message": message, 12 | "type": type, 13 | "duration": 10000, 14 | "mode": "dismissible", 15 | }); 16 | toastEvent.fire(); 17 | } 18 | }) -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/validationRules/Valid_Email_Format_Syntax.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid_Email_Format_Syntax 4 | false 5 | Validates that the email address is properly formed. 'Domain @ Site . Domain' 6 | REGEX(PersonEmail,"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}") 7 | Please Validate that the email address is properly formed. 'Domain @ Site . Domain' or blank 8 | 9 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/External_ID__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | External_ID__c 4 | true 5 | This is used to consistently import data to a version of the SDO and translate data into other languages. 6 | true 7 | 8 | 255 9 | false 10 | false 11 | false 12 | Text 13 | true 14 | 15 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/validationRules/US_Phone_Number_Has_Ten_Digits.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | US_Phone_Number_Has_Ten_Digits 4 | false 5 | Validates that the Phone number is in (999) 999-9999 6 | format. This works by using the REGEX function to check that the number has ten 7 | digits in the (999) 999-9999 format. 8 | NOT(REGEX(Phone, "\\D*?(\\d\\D*?){10}")) 9 | Please validate that the Phone number has 10 digits and is in (999) 999-9999 10 | 11 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/validationRules/Mailing_Address_Fields_Are_Required.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Mailing_Address_Fields_Are_Required 4 | false 5 | Validates that the contact Shipping Street, Shipping Postal Code/Zip, and Shipping Country are provided. 6 | OR( 7 | ISBLANK( ShippingStreet ), 8 | ISBLANK( ShippingPostalCode ), 9 | ISBLANK( ShippingCountry ) 10 | ) 11 | Please fill out the Mailing Address Fields. Street, Postal Code/Zip, and Country are required. 12 | 13 | -------------------------------------------------------------------------------- /force-app/main/default/duplicateRules/Account.Finding_Same_Name.duplicateRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Allow 4 | Allow 5 | Use one of these records? 6 | 7 | 8 | 9 | Account 10 | Same_Name 11 | 12 | 13 | true 14 | Finding Same Name 15 | Alert 16 | Report 17 | EnforceSharingRules 18 | 2 19 | 20 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/Entity_Type__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Entity_Type__c 4 | false 5 | IF( AND(DNB_D_U_N_S_Number__c = D_B_GU_DUNS__c, D_B_Location_Type__c = "HQ/Parent"), "GU", 6 | IF(AND(DNB_D_U_N_S_Number__c <> D_B_GU_DUNS__c, D_B_Location_Type__c = "HQ/Parent" ), "HQ", 7 | IF(AND(D_B_GU_DUNS__c <> "",OR(D_B_Location_Type__c = "Single Location",D_B_Location_Type__c = "Branch")),"Branch", 8 | IF(AND(OR(D_B_Location_Type__c = "Single Location",D_B_Location_Type__c = "Branch"),D_B_GU_DUNS__c = ""),"Sole Account",null) 9 | ) 10 | )) 11 | BlankAsZero 12 | 13 | false 14 | false 15 | Text 16 | false 17 | 18 | -------------------------------------------------------------------------------- /force-app/main/default/duplicateRules/Account.Acct_Dupe_Action1.duplicateRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Allow 4 | Allow 5 | 6 | Allows duplicate accounts to be created, with a user alert for new records that match an existing record, and reporting only when editing a record that matches another account record. 7 | 8 | 9 | Account 10 | Account_Matching_Rule_Custom 11 | 12 | 13 | true 14 | Acct Dupe Action1 15 | Report 16 | Report 17 | BypassSharingRules 18 | 1 19 | 20 | -------------------------------------------------------------------------------- /force-app/main/default/matchingRules/Account.matchingRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Account_Matching_Rule_Custom 5 | 6 | 7 | NullNotAllowed 8 | Name 9 | CompanyName 10 | 11 | Active 12 | 13 | 14 | Checking_for_Dupe 15 | 16 | 17 | MatchBlanks 18 | External_ID__c 19 | Exact 20 | 21 | ActivationFailed 22 | 23 | 24 | Same_Name 25 | 26 | 27 | MatchBlanks 28 | Name 29 | CompanyName 30 | 31 | Active 32 | 33 | 34 | -------------------------------------------------------------------------------- /force-app/main/default/flows/Map_Branch_to_Hierarchy.flow-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | 5 | Test 6 | 7 | 117 8 | 233 9 | 10 | $Flow.CurrentStage 11 | Assign 12 | 13 | 14 | Map_Branch_to_Hierarchy {!$Flow.CurrentDateTime} 15 | 16 | 17 | BuilderType 18 | 19 | LightningFlowBuilder 20 | 21 | 22 | 23 | CanvasMode 24 | 25 | FREE_FORM_CANVAS 26 | 27 | 28 | 29 | OriginBuilderType 30 | 31 | LightningFlowBuilder 32 | 33 | 34 | AutoLaunchedFlow 35 | 36 | 50 37 | 50 38 | 39 | InvalidDraft 40 | 41 | -------------------------------------------------------------------------------- /force-app/main/default/objects/Account/fields/Data_Quality_Score__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Data_Quality_Score__c 4 | This field is used to calculate the data quality of this record. It looks at the Name, Billing Address, Shipping Address, Phone Number, Website, Industry and the DUNS number is populated. Help improve the quality score by filling or fixing missing data. 5 | false 6 | IF(LEN( Name ) = 0, 0,15) 7 | + IF(LEN( BillingStreet ) = 0, 0,15) 8 | + IF(LEN( BillingPostalCode ) = 0, 0,5) 9 | + IF(LEN( BillingCountry ) = 0, 0,5) 10 | + IF(LEN( ShippingStreet ) = 0, 0,15) 11 | + IF(LEN( ShippingPostalCode ) = 0, 0,5) 12 | + IF(LEN( ShippingCountry ) = 0, 0,5) 13 | + IF(LEN( Phone ) = 0, 0,10) 14 | + IF(LEN( Website ) = 0, 0,10) 15 | + IF(LEN( DNB_D_U_N_S_Number__c ) = 0, 0,10) 16 | + IF(ISPICKVAL( Industry,""), 0,5) 17 | BlankAsZero 18 | This field is used to calculate the data quality of this record. It looks at the Name, Billing Address, Shipping Address, Phone Number, Website, Industry and the DUNS number is populated. Help improve the quality score by filling or fixing missing data. 19 | 20 | 18 21 | false 22 | 0 23 | false 24 | Number 25 | false 26 | 27 | -------------------------------------------------------------------------------- /manifest/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FindDuplicateAccounts 5 | ApexClass 6 | 7 | 8 | showToast 9 | AuraDefinitionBundle 10 | 11 | 12 | Account.Account_Process_Ran__c 13 | Account.DNB_D_U_N_S_Number__c 14 | Account.D_B_DU_Business_Name__c 15 | Account.D_B_DU_DUNS__c 16 | Account.D_B_GU_Business_Name__c 17 | Account.D_B_GU_DUNS__c 18 | Account.D_B_HQ_Business_Name__c 19 | Account.D_B_HQ_DUNS__c 20 | Account.D_B_Location_Type__c 21 | Account.D_B_Parent_Business_Name__c 22 | Account.D_B_Parent_DUNS__c 23 | Account.D_B_Update_Completed__c 24 | Account.Data_Quality_Score__c 25 | Account.Entity_Type__c 26 | Account.Exclude_from_Automation__c 27 | Account.External_ID__c 28 | CustomField 29 | 30 | 31 | Account_Hierarchy_Builder 32 | Data_Quality_Alert_Message 33 | Find_Duplicate_Accounts_in_Heirarchy 34 | Map_Branch_to_Hierarchy 35 | Map_HQ_to_Hierarchy 36 | Map_Single_Location_to_Hierarchy 37 | Map_True_Branch_to_Hierarchy 38 | Flow 39 | 40 | 41 | Admin 42 | Profile 43 | 44 | 45 | Account.Mailing_Address_Fields_Are_Required 46 | Account.US_Phone_Number_Has_Ten_Digits 47 | Account.Valid_Email_Format_Syntax 48 | ValidationRule 49 | 50 | 51.0 51 | -------------------------------------------------------------------------------- /force-app/main/default/classes/FindDuplicateAccounts.cls: -------------------------------------------------------------------------------- 1 | /** Author: Shoby Abdi, Program Lead B2B Solution Architect Program 2 | For Learning Lab: Designing Data Strategies for Complex Customer Relationships 3 | 4 | Purpose of this class is to be used by Invokable Action from a Flow Screen on an Account Record. 5 | This class traverses Account records heirarchy and returns all children record associated 6 | to account. Then using retrieved data new DataCloud classes eval records for duplicates against 7 | existing record within heirarchy. Returns all Account records matching this Account. 8 | **/ 9 | 10 | global class FindDuplicateAccounts { 11 | 12 | @InvocableMethod(label='findDuplicateAccountsInHeirarchy' description='Iterate through Account Records in Heirarchy to find Duplicates') 13 | global static List reviewAccountRecords(List accountRecord) { 14 | List al = FindDuplicateAccounts.getAccountHeirarchy(accountRecord[0].accountRecord); 15 | 16 | //This is a very magic method 17 | Datacloud.FindDuplicatesResult[] foundDuplicateResults = Datacloud.FindDuplicates.findDuplicates(al); 18 | 19 | Set accountUniques = new Set(); 20 | for (Datacloud.FindDuplicatesResult findDupeResult : foundDuplicateResults) { 21 | for (Datacloud.DuplicateResult dupeResult : findDupeResult.getDuplicateResults()) { 22 | for (Datacloud.MatchResult matchResult : dupeResult.getMatchResults()) { 23 | for (Datacloud.MatchRecord matchRecord : matchResult.getMatchRecords()) { 24 | if(matchRecord.getMatchConfidence() > 0) { 25 | accountUniques.add(matchRecord.getRecord().Id); 26 | } 27 | } 28 | } 29 | } 30 | } 31 | if(accountUniques.size() > 0) { 32 | List duplicateAcountsFound = [select Id, Name from Account where Id in: accountUniques]; 33 | AccountFlowOutput output = new AccountFlowOutput(); 34 | output.duplicateAccounts = duplicateAcountsFound; 35 | List listAccounts = new List(); 36 | listAccounts.add(output); 37 | return listAccounts; 38 | } 39 | else { 40 | return null; 41 | } 42 | } 43 | 44 | public static List getAccountHeirarchy(Account account) { 45 | Boolean topTier = false; 46 | Set accountIds = new Set(); 47 | while(!topTier) { 48 | Account currentRecord = [select ParentId, Parent.ParentId, Parent.Parent.ParentId, 49 | Parent.Parent.Parent.ParentId, Parent.Parent.Parent.Parent.ParentId, 50 | Parent.Parent.Parent.Parent.Parent.ParentId from Account where 51 | Id=:account.Id]; 52 | accountIds.add(account.Id); 53 | 54 | if(currentRecord.ParentId != null) accountIds.add(currentRecord.ParentId); 55 | else topTier = true; 56 | 57 | if(currentRecord.Parent.ParentId != null) accountIds.add(currentRecord.ParentId); 58 | else topTier = true; 59 | 60 | if(currentRecord.Parent.Parent.ParentId != null) accountIds.add(currentRecord.Parent.ParentId); 61 | else topTier = true; 62 | 63 | if(currentRecord.Parent.Parent.Parent.ParentId != null) accountIds.add(currentRecord.Parent.Parent.ParentId); 64 | else topTier = true; 65 | 66 | if(currentRecord.Parent.Parent.Parent.Parent.ParentId != null) accountIds.add(currentRecord.Parent.Parent.Parent.Parent.ParentId); 67 | else topTier = true; 68 | 69 | if(currentRecord.Parent.Parent.Parent.Parent.Parent.ParentId != null) accountIds.add(currentRecord.Parent.Parent.Parent.Parent.Parent.ParentId); 70 | else topTier = true; 71 | } 72 | 73 | List accountsToReturn = [select Id, Name from Account where ParentId in: accountIds]; 74 | return accountsToReturn; 75 | } 76 | 77 | global class AccountFlowInput { 78 | @InvocableVariable (required=true) 79 | global Account accountRecord; 80 | } 81 | 82 | global class AccountFlowOutput { 83 | @InvocableVariable (required=true) 84 | global List duplicateAccounts; 85 | } 86 | } -------------------------------------------------------------------------------- /force-app/main/default/flows/Data_Quality_Alert_Message.flow-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Toast message calling to attention that the data quality is below 80%. 5 | Data_Quality_Below_80 6 | 7 | 132 8 | 398 9 | c:showToast 10 | component 11 | CurrentTransaction 12 | 13 | message 14 | 15 | DataQualityScorebelow80MessageTemplate 16 | 17 | 18 | 19 | type 20 | 21 | warning 22 | 23 | 24 | true 25 | 26 | 52.0 27 | 28 | Checks the Data Quality Score and Asks the rep to address the missing data. 29 | What_is_the_Data_Quality_Score 30 | 31 | 176 32 | 278 33 | Default Outcome 34 | 35 | Above_80 36 | and 37 | 38 | VAR_Account_ID.Data_Quality_Score__c 39 | GreaterThanOrEqualTo 40 | 41 | 80.0 42 | 43 | 44 | 45 | 46 | 47 | Below_80 48 | and 49 | 50 | VAR_Account_ID.Data_Quality_Score__c 51 | LessThan 52 | 53 | 80.0 54 | 55 | 56 | 57 | Data_Quality_Below_80 58 | 59 | 60 | 61 | 62 | This Flow launches when an Account record opens and checks if the Data Quality Score is below 80%. 63 | Data Quality Alert Message {!$Flow.CurrentDateTime} 64 | 65 | 66 | BuilderType 67 | 68 | LightningFlowBuilder 69 | 70 | 71 | 72 | CanvasMode 73 | 74 | AUTO_LAYOUT_CANVAS 75 | 76 | 77 | 78 | OriginBuilderType 79 | 80 | LightningFlowBuilder 81 | 82 | 83 | Flow 84 | 85 | Queries the Current Account Record and gets the primary fields used in the Data Quality Score 86 | Get_Current_Account_Record 87 | 88 | 176 89 | 158 90 | false 91 | 92 | What_is_the_Data_Quality_Score 93 | 94 | and 95 | 96 | Id 97 | EqualTo 98 | 99 | VAR_Account_ID.Id 100 | 101 | 102 | true 103 | Account 104 | true 105 | 106 | DefaultMode 107 | 108 | 50 109 | 0 110 | 111 | Get_Current_Account_Record 112 | 113 | 114 | Active 115 | 116 | This is the message body is for the toast screen that calls out the data quality score is below 80%. 117 | DataQualityScorebelow80MessageTemplate 118 | true 119 | Oh no! It looks like the data quality score is not up to standards. Please take a look at the following fields and make sure we have the data and it is up to date. Remember Data Quality is how we understand our Customers. Better data makes everything work better. 120 | 121 | Fields to check: 122 | Account's Legal Name, 123 | Billing and Shipping Addresses (Street, Postal Code, and Country), and the 124 | Phone, 125 | Website, 126 | Industry. 127 | 128 | 129 | The variable that take the Account ID passed into it. 130 | VAR_Account_ID 131 | SObject 132 | false 133 | true 134 | true 135 | Account 136 | 137 | 138 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![image](https://partners.salesforce.com/servlet/servlet.FileDownload?file=00P4V00000rWbwsUAC) 2 | [Click Here For More Information On the Certification](http://sfdc.co/B2BSolutionArchitectCurriculum-PLC) 3 | 4 | # Codebase for the Designing Data Strategies for Complex Customer Relationships 5 | 6 | The codebase you find here is related to a Learning Lab created by the B2B Solution Architect Program. The codebase is meant for education purposes and is not built for purposes of production. 7 | 8 | ### Note 9 | 10 | You will see a file within the repository called _config.yml. Its purpose is to create the Github Page you see based on the Readme.md. To ignore it within your pulls do the following: 11 | * Add _config.yml to your .gitignore file 12 | * Add **/_config.yml to your .forceignore file 13 | 14 | ## Learning Lab Videos 15 | 16 | Feel free to engage in the Learning Lab or simply take the repo here and work at your own pace. You will find videos related to the lab at our Video hub [here](https://b2bsa.hubs.vidyard.com/watch/MuRadsvtYnG1tDUsLtzxx2). 17 | 18 | ## Learning Lab Courses 19 | 20 | To fully engage in the Learning Lab or at least understand the context of this codebase we recommend taking the following courses in Partner Learning Camp: 21 | * [Architect a B2B Customer-Centric Data Strategy](https://sfdc.co/PLC-B2BDataStrategy) 22 | * [Customer-Centric Data Strategy with your Accounts](https://sfdc.co/PLC-CustomerCentricAccounts) 23 | * [Customer-Centric Data Strategy with your Contacts](https://sfdc.co/PLC-CustomerCentricContacts) 24 | * [Customer-Centric Data Strategy with your Transactions](https://sfdc.co/PLC-CustomerCentricTransactions) 25 | 26 | ## Repo Inventory 27 | 28 | * FindDuplicateAccountsinHeirarchy.flow - The purpose of this flow is to navigate the entire Account hierarchy on a specific Account record and find duplicates related to the corporate name of the Account record thats been created. This is a screen flow versus a record triggered flow because account data could be coming from multiple sources and duplicate names is not an indication that one account is not unique versus the other. 29 | * FindDuplicateAccounts.cls - Purpose of this class is to be used by Invokable Action from a Flow Screen on an Account Record. This class traverses Account records heirarchy and returns all children record associated to account. Then using retrieved data new DataCloud classes eval records for duplicates against existing record within heirarchy. Returns all Account records matching this Account. 30 | * Account.matchingRule-meta.xml - Metadata file for custom Matching Role on Account object by Company Name 31 | * Account.Finding_Same_Name.duplicateRule-meta.xml - Metadata file for Duplicate Rule on Account record to use the Matching Rule 32 | 33 | ## Org Setup 34 | 35 | One of the capabilities afforded to partners is to be able to create SDOs, or Simple Demo Orgs, within Partner Learning Camp. The Simple Demo Org (SDO), Industry Demo Orgs (IDOs), and the Smartbytes Demo Org all give you the features and data you need to start showcasing the technologythat quickly demonstrates value and closes deals. 36 | 37 | For the purposes of this lab we will be using SDOs created from Partner Learning Camp. The data and metadata required to work through this lab will be within an SDO today with the ability to create additional data and metadata for the purposes of this Lab. 38 | 39 | Partners Learners will go to Partner Learning Camp to complete the SDO Fundamentals course to access the Demo Org Tab, which houses the Demo Org Request Form. From here, Partners can request auto-provisioning for 8 different Demo Orgs. Here are the steps required: 40 | 41 | 1. Step 1: Complete the SDO Fundamentals Course 42 | * [Access Partner Learning Camp](https://partnerlearningcamp.salesforce.com/login?ec=302&startURL=%2Fs%2Flearner-dashboard) 43 | * Search “Simple Demo Org Fundamentals” 44 | * Hover over course Card to see details 45 | * Click “Enroll” 46 | * Complete the course to access the “Demo Org” Tab 47 | 3. Step 2: Submit the Demo Org Request Form 48 | * Click the “Demo Org” Tab 49 | * Select the “Demo Type” you want to request 50 | * Read details on the right side (changes based on selected demo org) 51 | * Check your information. Your username will auto-populate. 52 | * Check the box for the Master Subscription Agreement after reading 53 | * Click “Submit” 54 | 6. Step 3: Click the Demo Org Link 55 | * After the request has been submitted, the Partner Learner will receive an email with a link to access the provisioned Demo Org. 56 | * Auto-provisioning takes approximately 1 hour to complete. 57 | 58 | ## Deploy this Codebase 59 | 60 | Thanks to Andrew Fawcett [@andyinthecloud](https://twitter.com/andyinthecloud) we have this incredible single click process to deploy the code in this Github repo to the org you just generated 61 | 62 | [https://githubsfdeploy.herokuapp.com/app/githubdeploy/b2bsolutionarchitectprogram/b2bdatastratlearninglabv1](https://githubsfdeploy.herokuapp.com/app/githubdeploy/b2bsolutionarchitectprogram/b2bdatastratlearninglabv1) 63 | 64 | To learn more about githubsfdeploy please check out his Github Repo: [https://github.com/afawcett/githubsfdeploy](https://github.com/afawcett/githubsfdeploy) 65 | 66 | While this is the easiest way to deploy you may choose other options. If so we recommend SFDX. 67 | 68 | ## Metadata To Add 69 | 70 | ## Data Setup 71 | 1. Load the CSV Account file to your SDO org. 72 | * We recommend using Data Loader 73 | * This lab aims to show how to take an unstructured and unlinked set of customer data and convert it into a future state model that aligns into the best practices of a B2B environment. For this scenario, the focus on foundational objects relevant to Accounts and their data model, quality, clean up, automation and alignment of business processes. The Account Object is the primary focus of the experiment. However, the Lead, Contact, Opportunity, and Case objects may also be referenced. 74 | 75 | ## Assumptions 76 | 1. Advanced Admin skill set 77 | * Ability to set and configure a core Sales Cloud instance. 78 | * Basic SOQL queries 79 | 2. Use of Data Loader or Data Import Wizard or other tools; 80 | * About Salesforce Data Loader https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/data_loader.htm 81 | * Data Loader io https://dataloader.io/ 82 | * Chrome Extension with Tooling API https://chrome.google.com/webstore/detail/salesforce-inspector/aodjmnfhjibkcdimpodiifdjnnncaafh?hl=en 83 | 3. Learners have WorkBench or a SDLC environment to deploy with 84 | 85 | ## Disclaimers 86 | 1. Guidance is directionally accurate, but due to changes in customer data, external applications, and platform, some elements may need to be massaged to deploy and function correctly. 87 | 2. The data in this example references a real world entity and uses sample data, but is not from actual source customer data. If using the D&B optimizer, the source data is supplied from them. 88 | 3. Do not use actual customer data for this workshop. 89 | 4. Do not use the example configuration, change set in a customer deployment as is. 90 | 5. Everything provided is “As Is” without any promise or guarantee of functionality or any commitment of current or future support. The examples are for use during the workshop and end at its conclusion. 91 | 6. The design and implementation is for illustration only. Do not implement this pattern without careful consideration and ensure that the design meets the customer's current and future needs. 92 | 93 | -------------------------------------------------------------------------------- /force-app/main/default/flows/Find_Duplicate_Accounts_in_Heirarchy.flow-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Find_Duplicate_Accounts 5 | 6 | 182 7 | 278 8 | FindDuplicateAccounts 9 | apex 10 | 11 | Are_There_Duplicates 12 | 13 | 14 | Fault_Screen 15 | 16 | Automatic 17 | 18 | accountRecord 19 | 20 | Account_Record 21 | 22 | 23 | 24 | Duplicate_Records 25 | duplicateAccounts 26 | 27 | 28 | 51.0 29 | 30 | Are_There_Duplicates 31 | 32 | 182 33 | 398 34 | 35 | Dupes_Found_Screen 36 | 37 | Default Outcome 38 | 39 | There_are_no_duplicates 40 | and 41 | 42 | Duplicate_Records 43 | IsNull 44 | 45 | true 46 | 47 | 48 | 49 | Dupe_Not_Found 50 | 51 | 52 | 53 | 54 | Find Duplicate Accounts in Heirarchy {!$Flow.CurrentDateTime} 55 | 56 | 57 | BuilderType 58 | 59 | LightningFlowBuilder 60 | 61 | 62 | 63 | CanvasMode 64 | 65 | AUTO_LAYOUT_CANVAS 66 | 67 | 68 | 69 | OriginBuilderType 70 | 71 | LightningFlowBuilder 72 | 73 | 74 | Flow 75 | SystemModeWithoutSharing 76 | 77 | Dupe_Not_Found 78 | 79 | 50 80 | 518 81 | true 82 | true 83 | true 84 | 85 | No_Dupes_Found 86 | <p>There are no duplicates associated to this Account within the Hierarchy. Congratulations! </p> 87 | DisplayText 88 | 89 | true 90 | true 91 | 92 | 93 | Dupes_Found_Screen 94 | 95 | 314 96 | 518 97 | true 98 | true 99 | true 100 | 101 | Dupe_Account_Data 102 | <p><u>The following Ids related to the Accounts in this Hierarchy are found as duplicates</u></p> 103 | DisplayText 104 | 105 | 106 | Duplicate_Records_Text 107 | <p>{!Duplicate_Records}</p><p><br></p><p>{!Duplicate_Records_Text}</p> 108 | DisplayText 109 | 110 | true 111 | true 112 | 113 | 114 | Fault_Screen 115 | 116 | 578 117 | 398 118 | true 119 | true 120 | true 121 | 122 | Fault_Message 123 | <p><span style="color: rgb(255, 0, 0);">There has been a fault error with this flow, please try again</span></p> 124 | DisplayText 125 | 126 | true 127 | false 128 | 129 | 130 | Find_Account_Duplicates 131 | 132 | 182 133 | 158 134 | true 135 | true 136 | true 137 | 138 | Find_Duplicate_Accounts 139 | 140 | 141 | Find_Duplicates_Text 142 | <p>Click Next to Scan This Account for Duplicates</p> 143 | DisplayText 144 | 145 | true 146 | true 147 | 148 | 149 | 56 150 | 0 151 | 152 | Find_Account_Duplicates 153 | 154 | 155 | Active 156 | 157 | DuplicateRecordsText 158 | false 159 | <p>{!Duplicate_Records}</p> 160 | 161 | 162 | Account_Record 163 | SObject 164 | false 165 | true 166 | false 167 | Account 168 | 169 | 170 | Duplicate_Records 171 | SObject 172 | true 173 | true 174 | false 175 | Account 176 | 177 | 178 | -------------------------------------------------------------------------------- /force-app/main/default/flows/Map_HQ_to_Hierarchy.flow-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | 5 | Is_Found_Parent_a_Branch_or_Single_Location 6 | 7 | 310 8 | 227 9 | Default Outcome 10 | 11 | Yes 12 | or 13 | 14 | v_FoundAccount.Entity_Type__c 15 | EqualTo 16 | 17 | Branch 18 | 19 | 20 | 21 | Create_GU 22 | 23 | 24 | 25 | 26 | No_Branch 27 | and 28 | 29 | v_FoundAccount.Entity_Type__c 30 | NotEqualTo 31 | 32 | Branch 33 | 34 | 35 | 36 | v_FoundAccount.DNB_D_U_N_S_Number__c 37 | NotEqualTo 38 | 39 | objAccountToMap.DNB_D_U_N_S_Number__c 40 | 41 | 42 | 43 | Assign_Found_Account_as_Parent 44 | 45 | 46 | 47 | 48 | 49 | Parent_Record_Found 50 | 51 | 300 52 | 52 53 | 54 | Create_GU 55 | 56 | Is Not Found 57 | 58 | Is_Found 59 | and 60 | 61 | v_FoundAccount.Id 62 | IsNull 63 | 64 | false 65 | 66 | 67 | 68 | v_FoundAccount.Entity_Type__c 69 | NotEqualTo 70 | 71 | Branch 72 | 73 | 74 | 75 | Is_Found_Parent_a_Branch_or_Single_Location 76 | 77 | 78 | 79 | 80 | Map HQ Accounts under GU Account 81 | Map HQ to Hierarchy {!$Flow.CurrentDateTime} 82 | 83 | 84 | BuilderType 85 | 86 | LightningFlowBuilder 87 | 88 | 89 | 90 | OriginBuilderType 91 | 92 | LightningFlowBuilder 93 | 94 | 95 | AutoLaunchedFlow 96 | 97 | Create_GU 98 | 99 | 556 100 | 60 101 | v_NewGU.Id 102 | 103 | Update_New_Branch_Account 104 | 105 | 106 | Account_Process_Ran__c 107 | 108 | true 109 | 110 | 111 | 112 | DNB_D_U_N_S_Number__c 113 | 114 | objAccountToMap.D_B_GU_DUNS__c 115 | 116 | 117 | 118 | Name 119 | 120 | objAccountToMap.D_B_GU_Business_Name__c 121 | 122 | 123 | 124 | OwnerId 125 | 126 | objAccountToMap.OwnerId 127 | 128 | 129 | 130 | RecordTypeId 131 | 132 | objAccountToMap.RecordTypeId 133 | 134 | 135 | Account 136 | 137 | 138 | Get_Account_to_Map 139 | 140 | 103 141 | 192 142 | false 143 | 144 | Search_GU 145 | 146 | and 147 | 148 | Id 149 | EqualTo 150 | 151 | recordId 152 | 153 | 154 | Account 155 | objAccountToMap 156 | Id 157 | D_B_GU_DUNS__c 158 | D_B_GU_Business_Name__c 159 | RecordTypeId 160 | OwnerId 161 | DNB_D_U_N_S_Number__c 162 | 163 | 164 | Search_GU 165 | 166 | 165 167 | 50 168 | false 169 | 170 | Parent_Record_Found 171 | 172 | and 173 | 174 | DNB_D_U_N_S_Number__c 175 | EqualTo 176 | 177 | objAccountToMap.D_B_GU_DUNS__c 178 | 179 | 180 | Account 181 | v_FoundAccount 182 | Id 183 | Name 184 | D_B_GU_DUNS__c 185 | D_B_GU_Business_Name__c 186 | ParentId 187 | D_B_DU_Business_Name__c 188 | D_B_DU_DUNS__c 189 | DNB_D_U_N_S_Number__c 190 | Entity_Type__c 191 | 192 | 193 | Assign_Found_Account_as_Parent 194 | 195 | 316 196 | 520 197 | and 198 | 199 | Id 200 | EqualTo 201 | 202 | objAccountToMap.Id 203 | 204 | 205 | 206 | Account_Process_Ran__c 207 | 208 | false 209 | 210 | 211 | 212 | ParentId 213 | 214 | v_FoundAccount.Id 215 | 216 | 217 | Account 218 | 219 | 220 | Update_New_Branch_Account 221 | 222 | 556 223 | 225 224 | and 225 | 226 | Id 227 | EqualTo 228 | 229 | objAccountToMap.Id 230 | 231 | 232 | 233 | Account_Process_Ran__c 234 | 235 | false 236 | 237 | 238 | 239 | ParentId 240 | 241 | v_NewGU.Id 242 | 243 | 244 | Account 245 | 246 | Get_Account_to_Map 247 | Active 248 | 249 | New account to be mapped 250 | objAccountToMap 251 | SObject 252 | false 253 | false 254 | false 255 | Account 256 | 257 | 258 | recordId 259 | String 260 | false 261 | true 262 | false 263 | 264 | 265 | v_FoundAccount 266 | SObject 267 | false 268 | false 269 | false 270 | Account 271 | 272 | 273 | v_NewAccount 274 | SObject 275 | false 276 | false 277 | false 278 | Account 279 | 280 | 281 | v_NewGU 282 | SObject 283 | false 284 | false 285 | false 286 | Account 287 | 288 | 289 | -------------------------------------------------------------------------------- /force-app/main/default/flows/Map_True_Branch_to_Hierarchy.flow-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | 5 | Found_GU 6 | 7 | 789 8 | 186 9 | 10 | Create_GU 11 | 12 | GU Not Found 13 | 14 | Found_GU_Acc 15 | and 16 | 17 | objGUAccount 18 | IsNull 19 | 20 | false 21 | 22 | 23 | 24 | Is_HQ_same_as_GU 25 | 26 | 27 | 28 | 29 | 30 | HQ_Found 31 | 32 | 297 33 | 51 34 | 35 | Create_HQ 36 | 37 | Is Not Found 38 | 39 | Is_Found 40 | and 41 | 42 | v_FoundAccount.Id 43 | IsNull 44 | 45 | false 46 | 47 | 48 | 49 | Assign_Found_HQ_as_Parent 50 | 51 | 52 | 53 | 54 | 55 | Is_HQ_same_as_GU 56 | 57 | 936 58 | 182 59 | Default Outcome 60 | 61 | HQ_GU 62 | and 63 | 64 | objAccountToMap.D_B_HQ_DUNS__c 65 | NotEqualTo 66 | 67 | objAccountToMap.D_B_GU_DUNS__c 68 | 69 | 70 | 71 | Make_GU_Parent_of_HQ 72 | 73 | 74 | 75 | 76 | This sub flow maps a true D&B Branch to the Account Hierarchy 77 | Map True Branch to Hierarchy {!$Flow.CurrentDateTime} 78 | 79 | 80 | BuilderType 81 | 82 | LightningFlowBuilder 83 | 84 | 85 | 86 | OriginBuilderType 87 | 88 | LightningFlowBuilder 89 | 90 | 91 | AutoLaunchedFlow 92 | 93 | Create_GU 94 | 95 | 795 96 | 322 97 | vGUAccountID 98 | 99 | Make_New_GU_Parent_of_HQ 100 | 101 | 102 | DNB_D_U_N_S_Number__c 103 | 104 | objAccountToMap.D_B_GU_DUNS__c 105 | 106 | 107 | 108 | Name 109 | 110 | objAccountToMap.D_B_GU_Business_Name__c 111 | 112 | 113 | 114 | OwnerId 115 | 116 | objAccountToMap.OwnerId 117 | 118 | 119 | 120 | RecordTypeId 121 | 122 | objAccountToMap.RecordTypeId 123 | 124 | 125 | Account 126 | 127 | 128 | Create_HQ 129 | 130 | 484 131 | 49 132 | vHQAccountId 133 | 134 | Make_New_Account_the_HQ 135 | 136 | 137 | DNB_D_U_N_S_Number__c 138 | 139 | objAccountToMap.D_B_HQ_DUNS__c 140 | 141 | 142 | 143 | Name 144 | 145 | objAccountToMap.D_B_HQ_Business_Name__c 146 | 147 | 148 | 149 | OwnerId 150 | 151 | objAccountToMap.OwnerId 152 | 153 | 154 | 155 | RecordTypeId 156 | 157 | objAccountToMap.RecordTypeId 158 | 159 | 160 | Account 161 | 162 | 163 | Search_GU_Account 164 | 165 | 796 166 | 48 167 | false 168 | 169 | Found_GU 170 | 171 | and 172 | 173 | DNB_D_U_N_S_Number__c 174 | EqualTo 175 | 176 | objAccountToMap.D_B_GU_DUNS__c 177 | 178 | 179 | Account 180 | objGUAccount 181 | Id 182 | 183 | 184 | Search_HQ 185 | 186 | 166 187 | 57 188 | false 189 | 190 | HQ_Found 191 | 192 | and 193 | 194 | DNB_D_U_N_S_Number__c 195 | EqualTo 196 | 197 | objAccountToMap.D_B_HQ_DUNS__c 198 | 199 | 200 | Account 201 | v_FoundAccount 202 | Id 203 | Name 204 | D_B_GU_DUNS__c 205 | D_B_GU_Business_Name__c 206 | ParentId 207 | D_B_DU_Business_Name__c 208 | D_B_DU_DUNS__c 209 | DNB_D_U_N_S_Number__c 210 | Entity_Type__c 211 | 212 | 213 | Assign_Found_HQ_as_Parent 214 | 215 | 308 216 | 217 217 | and 218 | 219 | Id 220 | EqualTo 221 | 222 | objAccountToMap.Id 223 | 224 | 225 | 226 | Account_Process_Ran__c 227 | 228 | false 229 | 230 | 231 | 232 | ParentId 233 | 234 | v_FoundAccount.Id 235 | 236 | 237 | Account 238 | 239 | 240 | Make_GU_Parent_of_HQ 241 | 242 | 1128 243 | 183 244 | and 245 | 246 | Id 247 | EqualTo 248 | 249 | vHQAccountId 250 | 251 | 252 | 253 | ParentId 254 | 255 | objGUAccount.Id 256 | 257 | 258 | Account 259 | 260 | 261 | Make HQ DUNS the Account D&B Number 262 | Make_New_Account_the_HQ 263 | 264 | 655 265 | 48 266 | 267 | Search_GU_Account 268 | 269 | and 270 | 271 | Id 272 | EqualTo 273 | 274 | objAccountToMap.Id 275 | 276 | 277 | 278 | Account_Process_Ran__c 279 | 280 | false 281 | 282 | 283 | 284 | ParentId 285 | 286 | vHQAccountId 287 | 288 | 289 | Account 290 | 291 | 292 | Make_New_GU_Parent_of_HQ 293 | 294 | 795 295 | 448 296 | and 297 | 298 | Id 299 | EqualTo 300 | 301 | vHQAccountId 302 | 303 | 304 | 305 | ParentId 306 | 307 | vGUAccountID 308 | 309 | 310 | Account 311 | 312 | Search_HQ 313 | Active 314 | 315 | objAccountToMap 316 | SObject 317 | false 318 | true 319 | false 320 | Account 321 | 322 | 323 | objGUAccount 324 | SObject 325 | false 326 | false 327 | false 328 | Account 329 | 330 | 331 | v_FoundAccount 332 | SObject 333 | false 334 | false 335 | false 336 | Account 337 | 338 | 339 | vGUAccountID 340 | String 341 | false 342 | false 343 | false 344 | 345 | 346 | Keep ID of the nearly created HQ Account 347 | vHQAccountId 348 | String 349 | false 350 | false 351 | false 352 | 353 | 354 | -------------------------------------------------------------------------------- /force-app/main/default/flows/Map_Single_Location_to_Hierarchy.flow-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | 5 | Found_GU_Parent 6 | 7 | 716 8 | 470 9 | 10 | Create_GU_Parent 11 | 12 | GU Not Found 13 | 14 | Found_GU_Parent_Record 15 | and 16 | 17 | objFoundGU 18 | IsNull 19 | 20 | false 21 | 22 | 23 | 24 | Make_GU_HQ_Parent 25 | 26 | 27 | 28 | 29 | 30 | GU_Exists 31 | 32 | 650 33 | 233 34 | 35 | Create_GU 36 | 37 | GU Doesn't Exist 38 | 39 | c_GU_Exists 40 | and 41 | 42 | objFoundGU.Id 43 | IsNull 44 | 45 | false 46 | 47 | 48 | 49 | Is_Parent_GU 50 | 51 | 52 | 53 | 54 | 55 | Is_Found_HQ_a_Branch_or_Single_Location 56 | 57 | 333 58 | 228 59 | 60 | c_Assign_Found_HQ_as_Parent 61 | 62 | No 63 | 64 | c_Yes 65 | or 66 | 67 | objFoundParent.Entity_Type__c 68 | EqualTo 69 | 70 | Branch 71 | 72 | 73 | 74 | Search_GU 75 | 76 | 77 | 78 | 79 | 80 | Is_Parent_a_GU 81 | 82 | 420 83 | 403 84 | 85 | Search_GU_Parent 86 | 87 | Not GU 88 | 89 | GU 90 | and 91 | 92 | objAccountToMap.D_B_Parent_DUNS__c 93 | EqualTo 94 | 95 | objAccountToMap.D_B_GU_DUNS__c 96 | 97 | 98 | 99 | 100 | 101 | 102 | Is_Parent_GU 103 | 104 | 864 105 | 106 106 | Default Outcome 107 | 108 | Yes_Parent_GU 109 | and 110 | 111 | objAccountToMap.D_B_Parent_DUNS__c 112 | NotEqualTo 113 | 114 | objAccountToMap.D_B_GU_DUNS__c 115 | 116 | 117 | 118 | Make_Found_GU_Parent_of_Branch 119 | 120 | 121 | 122 | 123 | 124 | Parent_Found 125 | 126 | 147 127 | 232 128 | 129 | Create_Parent 130 | 131 | Parent Not Found 132 | 133 | c_Parent_Found 134 | and 135 | 136 | objFoundParent.Id 137 | IsNull 138 | 139 | false 140 | 141 | 142 | 143 | Is_Found_HQ_a_Branch_or_Single_Location 144 | 145 | 146 | 147 | 148 | This subflow maps a Single Location Account to the Hierarchy 149 | Map Single Location to Hierarchy {!$Flow.CurrentDateTime} 150 | 151 | 152 | BuilderType 153 | 154 | LightningFlowBuilder 155 | 156 | 157 | 158 | OriginBuilderType 159 | 160 | LightningFlowBuilder 161 | 162 | 163 | AutoLaunchedFlow 164 | 165 | Create_GU 166 | 167 | 830 168 | 292 169 | vNewGUId 170 | 171 | Make_New_GU_parent 172 | 173 | 174 | Account_Process_Ran__c 175 | 176 | true 177 | 178 | 179 | 180 | DNB_D_U_N_S_Number__c 181 | 182 | objAccountToMap.D_B_GU_DUNS__c 183 | 184 | 185 | 186 | Name 187 | 188 | objAccountToMap.D_B_GU_Business_Name__c 189 | 190 | 191 | 192 | OwnerId 193 | 194 | objAccountToMap.OwnerId 195 | 196 | 197 | 198 | RecordTypeId 199 | 200 | objAccountToMap.RecordTypeId 201 | 202 | 203 | Account 204 | 205 | 206 | Create_GU_Parent 207 | 208 | 942 209 | 422 210 | vNewGUId 211 | 212 | Make_GU_New_HQ_Parent 213 | 214 | 215 | DNB_D_U_N_S_Number__c 216 | 217 | objAccountToMap.D_B_GU_DUNS__c 218 | 219 | 220 | 221 | Name 222 | 223 | objAccountToMap.D_B_GU_Business_Name__c 224 | 225 | 226 | 227 | OwnerId 228 | 229 | objAccountToMap.OwnerId 230 | 231 | 232 | 233 | RecordTypeId 234 | 235 | objAccountToMap.RecordTypeId 236 | 237 | 238 | Account 239 | 240 | 241 | Create_Parent 242 | 243 | 156 244 | 400 245 | vParentID 246 | 247 | Assign_New_Parent 248 | 249 | 250 | DNB_D_U_N_S_Number__c 251 | 252 | objAccountToMap.D_B_Parent_DUNS__c 253 | 254 | 255 | 256 | Name 257 | 258 | objAccountToMap.D_B_Parent_Business_Name__c 259 | 260 | 261 | 262 | OwnerId 263 | 264 | objAccountToMap.OwnerId 265 | 266 | 267 | 268 | RecordTypeId 269 | 270 | objAccountToMap.RecordTypeId 271 | 272 | 273 | Account 274 | 275 | 276 | Search_GU 277 | 278 | 524 279 | 231 280 | false 281 | 282 | GU_Exists 283 | 284 | and 285 | 286 | DNB_D_U_N_S_Number__c 287 | EqualTo 288 | 289 | objAccountToMap.D_B_GU_DUNS__c 290 | 291 | 292 | Account 293 | objFoundGU 294 | Id 295 | Name 296 | DNB_D_U_N_S_Number__c 297 | Account_Process_Ran__c 298 | 299 | 300 | Search_GU_Parent 301 | 302 | 570 303 | 399 304 | false 305 | 306 | Found_GU_Parent 307 | 308 | and 309 | 310 | DNB_D_U_N_S_Number__c 311 | EqualTo 312 | 313 | objAccountToMap.D_B_GU_DUNS__c 314 | 315 | 316 | Account 317 | objFoundGU 318 | Id 319 | 320 | 321 | Search_Parent 322 | 323 | 155 324 | 50 325 | false 326 | 327 | Parent_Found 328 | 329 | and 330 | 331 | DNB_D_U_N_S_Number__c 332 | EqualTo 333 | 334 | objAccountToMap.D_B_Parent_DUNS__c 335 | 336 | 337 | Account 338 | objFoundParent 339 | Id 340 | Name 341 | DNB_D_U_N_S_Number__c 342 | Account_Process_Ran__c 343 | ParentId 344 | D_B_GU_Business_Name__c 345 | D_B_GU_DUNS__c 346 | D_B_DU_Business_Name__c 347 | D_B_DU_DUNS__c 348 | Entity_Type__c 349 | 350 | 351 | Assign_New_Parent 352 | 353 | 290 354 | 445 355 | 356 | Is_Parent_a_GU 357 | 358 | and 359 | 360 | Id 361 | EqualTo 362 | 363 | objAccountToMap.Id 364 | 365 | 366 | 367 | ParentId 368 | 369 | vParentID 370 | 371 | 372 | Account 373 | 374 | 375 | c_Assign_Found_HQ_as_Parent 376 | 377 | 343 378 | 54 379 | and 380 | 381 | Id 382 | EqualTo 383 | 384 | objAccountToMap.Id 385 | 386 | 387 | 388 | Account_Process_Ran__c 389 | 390 | false 391 | 392 | 393 | 394 | ParentId 395 | 396 | objFoundParent.Id 397 | 398 | 399 | Account 400 | 401 | 402 | Make_Found_GU_Parent_of_Branch 403 | 404 | 1015 405 | 102 406 | and 407 | 408 | Id 409 | EqualTo 410 | 411 | objAccountToMap.Id 412 | 413 | 414 | 415 | Account_Process_Ran__c 416 | 417 | false 418 | 419 | 420 | 421 | ParentId 422 | 423 | objFoundGU.Id 424 | 425 | 426 | Account 427 | 428 | 429 | Make_GU_HQ_Parent 430 | 431 | 939 432 | 536 433 | and 434 | 435 | Id 436 | EqualTo 437 | 438 | vParentID 439 | 440 | 441 | 442 | ParentId 443 | 444 | objFoundGU.Id 445 | 446 | 447 | Account 448 | 449 | 450 | Make_GU_New_HQ_Parent 451 | 452 | 1082 453 | 421 454 | and 455 | 456 | Id 457 | EqualTo 458 | 459 | vParentID 460 | 461 | 462 | 463 | ParentId 464 | 465 | vNewGUId 466 | 467 | 468 | Account 469 | 470 | 471 | Make New GU parent of new Branch 472 | Make_New_GU_parent 473 | 474 | 966 475 | 292 476 | and 477 | 478 | Id 479 | EqualTo 480 | 481 | objAccountToMap.Id 482 | 483 | 484 | 485 | Account_Process_Ran__c 486 | 487 | false 488 | 489 | 490 | 491 | ParentId 492 | 493 | vNewGUId 494 | 495 | 496 | Account 497 | 498 | Search_Parent 499 | Active 500 | 501 | objAccountToMap 502 | SObject 503 | false 504 | true 505 | false 506 | Account 507 | 508 | 509 | objFoundGU 510 | SObject 511 | false 512 | false 513 | false 514 | Account 515 | 516 | 517 | objFoundParent 518 | SObject 519 | false 520 | false 521 | false 522 | Account 523 | 524 | 525 | objNewGU 526 | SObject 527 | false 528 | false 529 | false 530 | Account 531 | 532 | 533 | Account ID 534 | recordId 535 | String 536 | false 537 | true 538 | false 539 | 540 | 541 | vNewGUId 542 | String 543 | false 544 | false 545 | false 546 | 547 | 548 | vParentID 549 | String 550 | false 551 | false 552 | false 553 | 554 | 555 | -------------------------------------------------------------------------------- /force-app/main/default/profiles/Admin.profile-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Audience 5 | ALL 6 | 7 | 8 | FindDuplicateAccounts 9 | true 10 | 11 | false 12 | 13 | true 14 | Account.Account_Process_Ran__c 15 | true 16 | 17 | 18 | true 19 | Account.DNB_D_U_N_S_Number__c 20 | true 21 | 22 | 23 | true 24 | Account.D_B_DU_Business_Name__c 25 | true 26 | 27 | 28 | true 29 | Account.D_B_DU_DUNS__c 30 | true 31 | 32 | 33 | true 34 | Account.D_B_GU_Business_Name__c 35 | true 36 | 37 | 38 | true 39 | Account.D_B_GU_DUNS__c 40 | true 41 | 42 | 43 | true 44 | Account.D_B_HQ_Business_Name__c 45 | true 46 | 47 | 48 | true 49 | Account.D_B_HQ_DUNS__c 50 | true 51 | 52 | 53 | true 54 | Account.D_B_Location_Type__c 55 | true 56 | 57 | 58 | true 59 | Account.D_B_Parent_Business_Name__c 60 | true 61 | 62 | 63 | true 64 | Account.D_B_Parent_DUNS__c 65 | true 66 | 67 | 68 | true 69 | Account.D_B_Update_Completed__c 70 | true 71 | 72 | 73 | false 74 | Account.Data_Quality_Score__c 75 | true 76 | 77 | 78 | false 79 | Account.Entity_Type__c 80 | true 81 | 82 | 83 | true 84 | Account.Exclude_from_Automation__c 85 | true 86 | 87 | 88 | true 89 | Account.External_ID__c 90 | true 91 | 92 | 93 | 255.255.255.255 94 | 0.0.0.0 95 | 96 | 97 | undefined 98 | 37.228.232.73 99 | 37.228.232.71 100 | 101 | Salesforce 102 | 103 | true 104 | AIViewInsightObjects 105 | 106 | 107 | true 108 | ActivateContract 109 | 110 | 111 | true 112 | ActivateOrder 113 | 114 | 115 | true 116 | ActivitiesAccess 117 | 118 | 119 | true 120 | AddDirectMessageMembers 121 | 122 | 123 | true 124 | AllowObjectDetectionTraining 125 | 126 | 127 | true 128 | AllowUniversalSearch 129 | 130 | 131 | true 132 | AllowViewKnowledge 133 | 134 | 135 | true 136 | ApexRestServices 137 | 138 | 139 | true 140 | ApiEnabled 141 | 142 | 143 | true 144 | ApproveContract 145 | 146 | 147 | true 148 | ArchiveArticles 149 | 150 | 151 | true 152 | AssignPermissionSets 153 | 154 | 155 | true 156 | AssignTopics 157 | 158 | 159 | true 160 | AssignUserToSkill 161 | 162 | 163 | true 164 | AuthorApex 165 | 166 | 167 | true 168 | BulkMacrosAllowed 169 | 170 | 171 | true 172 | CanAccessCE 173 | 174 | 175 | true 176 | CanInsertFeedSystemFields 177 | 178 | 179 | true 180 | CanUseNewDashboardBuilder 181 | 182 | 183 | true 184 | CanVerifyComment 185 | 186 | 187 | true 188 | ChangeDashboardColors 189 | 190 | 191 | true 192 | ChatterEditOwnPost 193 | 194 | 195 | true 196 | ChatterEditOwnRecordPost 197 | 198 | 199 | true 200 | ChatterFileLink 201 | 202 | 203 | true 204 | ChatterInternalUser 205 | 206 | 207 | true 208 | ChatterInviteExternalUsers 209 | 210 | 211 | true 212 | ChatterOwnGroups 213 | 214 | 215 | true 216 | ConnectOrgToEnvironmentHub 217 | 218 | 219 | true 220 | ConsentApiUpdate 221 | 222 | 223 | true 224 | ContentAdministrator 225 | 226 | 227 | true 228 | ContentWorkspaces 229 | 230 | 231 | true 232 | ConvertLeads 233 | 234 | 235 | true 236 | CreateCustomizeDashboards 237 | 238 | 239 | true 240 | CreateCustomizeFilters 241 | 242 | 243 | true 244 | CreateCustomizeReports 245 | 246 | 247 | true 248 | CreateDashboardFolders 249 | 250 | 251 | true 252 | CreateLtngTempFolder 253 | 254 | 255 | true 256 | CreatePackaging 257 | 258 | 259 | true 260 | CreateReportFolders 261 | 262 | 263 | true 264 | CreateTopics 265 | 266 | 267 | true 268 | CreateWorkBadgeDefinition 269 | 270 | 271 | true 272 | CreateWorkspaces 273 | 274 | 275 | true 276 | CustomizeApplication 277 | 278 | 279 | true 280 | DataExport 281 | 282 | 283 | true 284 | DecisionTableExecUserAccess 285 | 286 | 287 | true 288 | DelegatedTwoFactor 289 | 290 | 291 | true 292 | DeleteActivatedContract 293 | 294 | 295 | true 296 | DeleteTopics 297 | 298 | 299 | true 300 | DistributeFromPersWksp 301 | 302 | 303 | true 304 | EditActivatedOrders 305 | 306 | 307 | true 308 | EditBillingInfo 309 | 310 | 311 | true 312 | EditBrandTemplates 313 | 314 | 315 | true 316 | EditCaseComments 317 | 318 | 319 | true 320 | EditEvent 321 | 322 | 323 | true 324 | EditHtmlTemplates 325 | 326 | 327 | true 328 | EditKnowledge 329 | 330 | 331 | true 332 | EditMyDashboards 333 | 334 | 335 | true 336 | EditMyReports 337 | 338 | 339 | true 340 | EditOppLineItemUnitPrice 341 | 342 | 343 | true 344 | EditPublicDocuments 345 | 346 | 347 | true 348 | EditPublicFilters 349 | 350 | 351 | true 352 | EditPublicTemplates 353 | 354 | 355 | true 356 | EditReadonlyFields 357 | 358 | 359 | true 360 | EditTask 361 | 362 | 363 | true 364 | EditTopics 365 | 366 | 367 | true 368 | EditTranslation 369 | 370 | 371 | true 372 | EinsteinArticleRecUser 373 | 374 | 375 | true 376 | EmailMass 377 | 378 | 379 | true 380 | EmailSingle 381 | 382 | 383 | true 384 | EnableCommunityAppLauncher 385 | 386 | 387 | true 388 | EnableNotifications 389 | 390 | 391 | true 392 | ExportReport 393 | 394 | 395 | true 396 | FieldServiceAccess 397 | 398 | 399 | true 400 | GiveRecognitionBadge 401 | 402 | 403 | true 404 | ImportCustomObjects 405 | 406 | 407 | true 408 | ImportLeads 409 | 410 | 411 | true 412 | ImportPersonal 413 | 414 | 415 | true 416 | InboundMigrationToolsUser 417 | 418 | 419 | true 420 | InstallPackaging 421 | 422 | 423 | true 424 | LightningConsoleAllowedForUser 425 | 426 | 427 | true 428 | LightningExperienceUser 429 | 430 | 431 | true 432 | ListEmailSend 433 | 434 | 435 | true 436 | ManageAnalyticSnapshots 437 | 438 | 439 | true 440 | ManageAuthProviders 441 | 442 | 443 | true 444 | ManageBusinessHourHolidays 445 | 446 | 447 | true 448 | ManageC360AConnections 449 | 450 | 451 | true 452 | ManageCMS 453 | 454 | 455 | true 456 | ManageCallCenters 457 | 458 | 459 | true 460 | ManageCases 461 | 462 | 463 | true 464 | ManageCategories 465 | 466 | 467 | true 468 | ManageCertificates 469 | 470 | 471 | true 472 | ManageContentPermissions 473 | 474 | 475 | true 476 | ManageContentProperties 477 | 478 | 479 | true 480 | ManageContentTypes 481 | 482 | 483 | true 484 | ManageCustomPermissions 485 | 486 | 487 | true 488 | ManageCustomReportTypes 489 | 490 | 491 | true 492 | ManageDashbdsInPubFolders 493 | 494 | 495 | true 496 | ManageDataCategories 497 | 498 | 499 | true 500 | ManageDataIntegrations 501 | 502 | 503 | true 504 | ManageDynamicDashboards 505 | 506 | 507 | true 508 | ManageEmailClientConfig 509 | 510 | 511 | true 512 | ManageEntitlements 513 | 514 | 515 | true 516 | ManageExchangeConfig 517 | 518 | 519 | true 520 | ManageHealthCheck 521 | 522 | 523 | true 524 | ManageHubConnections 525 | 526 | 527 | true 528 | ManageInteraction 529 | 530 | 531 | true 532 | ManageInternalUsers 533 | 534 | 535 | true 536 | ManageIpAddresses 537 | 538 | 539 | true 540 | ManageKnowledge 541 | 542 | 543 | true 544 | ManageKnowledgeImportExport 545 | 546 | 547 | true 548 | ManageLeads 549 | 550 | 551 | true 552 | ManageLoginAccessPolicies 553 | 554 | 555 | true 556 | ManageMobile 557 | 558 | 559 | true 560 | ManageMyS1App 561 | 562 | 563 | true 564 | ManageNetworks 565 | 566 | 567 | true 568 | ManagePackageLicenses 569 | 570 | 571 | true 572 | ManagePartnerNetConn 573 | 574 | 575 | true 576 | ManagePartners 577 | 578 | 579 | true 580 | ManagePasswordPolicies 581 | 582 | 583 | true 584 | ManageProfilesPermissionsets 585 | 586 | 587 | true 588 | ManagePropositions 589 | 590 | 591 | true 592 | ManagePvtRptsAndDashbds 593 | 594 | 595 | true 596 | ManageQuotas 597 | 598 | 599 | true 600 | ManageRecommendationStrategies 601 | 602 | 603 | true 604 | ManageReleaseUpdates 605 | 606 | 607 | true 608 | ManageRemoteAccess 609 | 610 | 611 | true 612 | ManageReportsInPubFolders 613 | 614 | 615 | true 616 | ManageRoles 617 | 618 | 619 | true 620 | ManageSandboxes 621 | 622 | 623 | true 624 | ManageSearchPromotionRules 625 | 626 | 627 | true 628 | ManageSharing 629 | 630 | 631 | true 632 | ManageSolutions 633 | 634 | 635 | true 636 | ManageSubscriptions 637 | 638 | 639 | true 640 | ManageSynonyms 641 | 642 | 643 | true 644 | ManageTerritories 645 | 646 | 647 | true 648 | ManageTranslation 649 | 650 | 651 | true 652 | ManageTrustMeasures 653 | 654 | 655 | true 656 | ManageUnlistedGroups 657 | 658 | 659 | true 660 | ManageUsers 661 | 662 | 663 | true 664 | MassInlineEdit 665 | 666 | 667 | true 668 | MergeTopics 669 | 670 | 671 | true 672 | ModerateChatter 673 | 674 | 675 | true 676 | ModifyAllData 677 | 678 | 679 | true 680 | ModifyDataClassification 681 | 682 | 683 | true 684 | ModifyMetadata 685 | 686 | 687 | true 688 | NewReportBuilder 689 | 690 | 691 | true 692 | OutboundMigrationToolsUser 693 | 694 | 695 | true 696 | OverrideForecasts 697 | 698 | 699 | true 700 | Packaging2 701 | 702 | 703 | true 704 | Packaging2Delete 705 | 706 | 707 | true 708 | PrivacyDataAccess 709 | 710 | 711 | true 712 | PublishArticles 713 | 714 | 715 | true 716 | PublishPackaging 717 | 718 | 719 | true 720 | PublishTranslation 721 | 722 | 723 | true 724 | RemoveDirectMessageMembers 725 | 726 | 727 | true 728 | ResetPasswords 729 | 730 | 731 | true 732 | RunReports 733 | 734 | 735 | true 736 | ScheduleJob 737 | 738 | 739 | true 740 | ScheduleReports 741 | 742 | 743 | true 744 | SelectFilesFromSalesforce 745 | 746 | 747 | true 748 | SendCustomNotifications 749 | 750 | 751 | true 752 | SendSitRequests 753 | 754 | 755 | true 756 | ShareInternalArticles 757 | 758 | 759 | true 760 | ShowCompanyNameAsUserBadge 761 | 762 | 763 | true 764 | SocialInsightsLogoAdmin 765 | 766 | 767 | true 768 | SolutionImport 769 | 770 | 771 | true 772 | SubmitForTranslation 773 | 774 | 775 | true 776 | SubmitMacrosAllowed 777 | 778 | 779 | true 780 | SubscribeDashboardRolesGrps 781 | 782 | 783 | true 784 | SubscribeDashboardToOtherUsers 785 | 786 | 787 | true 788 | SubscribeReportRolesGrps 789 | 790 | 791 | true 792 | SubscribeReportToOtherUsers 793 | 794 | 795 | true 796 | SubscribeReportsRunAsUser 797 | 798 | 799 | true 800 | SubscribeToLightningDashboards 801 | 802 | 803 | true 804 | SubscribeToLightningReports 805 | 806 | 807 | true 808 | TagManager 809 | 810 | 811 | true 812 | TransactionalEmailSend 813 | 814 | 815 | true 816 | TransferAnyCase 817 | 818 | 819 | true 820 | TransferAnyEntity 821 | 822 | 823 | true 824 | TransferAnyLead 825 | 826 | 827 | true 828 | UseFulfillmentAPIs 829 | 830 | 831 | true 832 | UseOrderManagementAPIs 833 | 834 | 835 | true 836 | UseReturnOrder 837 | 838 | 839 | true 840 | UseReturnOrderAPIs 841 | 842 | 843 | true 844 | UseTeamReassignWizards 845 | 846 | 847 | true 848 | UseWebLink 849 | 850 | 851 | true 852 | ViewAllData 853 | 854 | 855 | true 856 | ViewAllForecasts 857 | 858 | 859 | true 860 | ViewAllProfiles 861 | 862 | 863 | true 864 | ViewAllUsers 865 | 866 | 867 | true 868 | ViewArchivedArticles 869 | 870 | 871 | true 872 | ViewDataAssessment 873 | 874 | 875 | true 876 | ViewDataCategories 877 | 878 | 879 | true 880 | ViewDraftArticles 881 | 882 | 883 | true 884 | ViewEventLogFiles 885 | 886 | 887 | true 888 | ViewFlowUsageAndFlowEventData 889 | 890 | 891 | true 892 | ViewHealthCheck 893 | 894 | 895 | true 896 | ViewHelpLink 897 | 898 | 899 | true 900 | ViewMyTeamsDashboards 901 | 902 | 903 | true 904 | ViewPublicDashboards 905 | 906 | 907 | true 908 | ViewPublicReports 909 | 910 | 911 | true 912 | ViewRoles 913 | 914 | 915 | true 916 | ViewSetup 917 | 918 | 919 | true 920 | ViewTrustMeasures 921 | 922 | 923 | true 924 | ViewUserPII 925 | 926 | 927 | true 928 | WorkCalibrationUser 929 | 930 | 931 | -------------------------------------------------------------------------------- /force-app/main/default/flows/Account_Hierarchy_Builder.flow-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActionCallType 6 | 7 | flow 8 | 9 | 10 | 11 | flowSelection 12 | 13 | Map Branch to Hierarchy 14 | 15 | 16 | myRule_1_A1 17 | 18 | 100 19 | 200 20 | Map_Branch_to_Hierarchy 21 | flow 22 | 23 | myRule_1_A2 24 | 25 | CurrentTransaction 26 | 27 | 28 | dataType 29 | 30 | String 31 | 32 | 33 | 34 | isRequired 35 | 36 | false 37 | 38 | 39 | 40 | leftHandSideLabel 41 | 42 | recordId 43 | 44 | 45 | 46 | maxOccurs 47 | 48 | 1.0 49 | 50 | 51 | 52 | objectType 53 | 54 | 55 | 56 | 57 | 58 | rightHandSideType 59 | 60 | Reference 61 | 62 | 63 | recordId 64 | 65 | myVariable_current.Id 66 | 67 | 68 | 69 | 70 | 71 | ActionCallType 72 | 73 | flow 74 | 75 | 76 | 77 | flowSelection 78 | 79 | Map HQ to Hierarchy 80 | 81 | 82 | myRule_3_A1 83 | 84 | 300 85 | 200 86 | Map_HQ_to_Hierarchy 87 | flow 88 | 89 | myRule_3_A2 90 | 91 | CurrentTransaction 92 | 93 | 94 | dataType 95 | 96 | String 97 | 98 | 99 | 100 | isRequired 101 | 102 | false 103 | 104 | 105 | 106 | leftHandSideLabel 107 | 108 | recordId 109 | 110 | 111 | 112 | maxOccurs 113 | 114 | 1.0 115 | 116 | 117 | 118 | objectType 119 | 120 | 121 | 122 | 123 | 124 | rightHandSideType 125 | 126 | Reference 127 | 128 | 129 | recordId 130 | 131 | myVariable_current.Id 132 | 133 | 134 | 135 | 49.0 136 | 137 | 138 | index 139 | 140 | 0.0 141 | 142 | 143 | myDecision 144 | 145 | 50 146 | 0 147 | 148 | myDecision2 149 | 150 | default 151 | 152 | myRule_1 153 | 1 AND 2 AND 3 AND (4 OR 5 OR 6) 154 | 155 | 156 | inputDataType 157 | 158 | Boolean 159 | 160 | 161 | 162 | leftHandSideType 163 | 164 | Boolean 165 | 166 | 167 | 168 | operatorDataType 169 | 170 | Boolean 171 | 172 | 173 | 174 | rightHandSideType 175 | 176 | Boolean 177 | 178 | 179 | myVariable_current.Exclude_from_Automation__c 180 | EqualTo 181 | 182 | false 183 | 184 | 185 | 186 | 187 | inputDataType 188 | 189 | String 190 | 191 | 192 | 193 | leftHandSideType 194 | 195 | String 196 | 197 | 198 | 199 | operatorDataType 200 | 201 | String 202 | 203 | 204 | 205 | rightHandSideType 206 | 207 | String 208 | 209 | 210 | myVariable_current.Entity_Type__c 211 | EqualTo 212 | 213 | Branch 214 | 215 | 216 | 217 | 218 | inputDataType 219 | 220 | Boolean 221 | 222 | 223 | 224 | leftHandSideType 225 | 226 | Boolean 227 | 228 | 229 | 230 | operatorDataType 231 | 232 | Boolean 233 | 234 | 235 | 236 | rightHandSideType 237 | 238 | Boolean 239 | 240 | 241 | myVariable_current.D_B_Update_Completed__c 242 | EqualTo 243 | 244 | true 245 | 246 | 247 | 248 | 249 | inputDataType 250 | 251 | Boolean 252 | 253 | 254 | 255 | leftHandSideType 256 | 257 | String 258 | 259 | 260 | 261 | operatorDataType 262 | 263 | String 264 | 265 | 266 | 267 | rightHandSideType 268 | 269 | Boolean 270 | 271 | 272 | myVariable_current.D_B_HQ_DUNS__c 273 | IsNull 274 | 275 | false 276 | 277 | 278 | 279 | 280 | inputDataType 281 | 282 | Boolean 283 | 284 | 285 | 286 | leftHandSideType 287 | 288 | String 289 | 290 | 291 | 292 | operatorDataType 293 | 294 | String 295 | 296 | 297 | 298 | rightHandSideType 299 | 300 | Boolean 301 | 302 | 303 | myVariable_current.D_B_Parent_DUNS__c 304 | IsNull 305 | 306 | false 307 | 308 | 309 | 310 | 311 | inputDataType 312 | 313 | Boolean 314 | 315 | 316 | 317 | leftHandSideType 318 | 319 | String 320 | 321 | 322 | 323 | operatorDataType 324 | 325 | String 326 | 327 | 328 | 329 | rightHandSideType 330 | 331 | Boolean 332 | 333 | 334 | myVariable_current.D_B_GU_DUNS__c 335 | IsNull 336 | 337 | false 338 | 339 | 340 | 341 | myRule_1_A1 342 | 343 | 344 | 345 | 346 | 347 | 348 | index 349 | 350 | 1.0 351 | 352 | 353 | myDecision2 354 | 355 | 50 356 | 0 357 | 358 | myDecision4 359 | 360 | default 361 | 362 | myRule_3 363 | and 364 | 365 | 366 | inputDataType 367 | 368 | Boolean 369 | 370 | 371 | 372 | leftHandSideType 373 | 374 | Boolean 375 | 376 | 377 | 378 | operatorDataType 379 | 380 | Boolean 381 | 382 | 383 | 384 | rightHandSideType 385 | 386 | Boolean 387 | 388 | 389 | myVariable_current.Exclude_from_Automation__c 390 | EqualTo 391 | 392 | false 393 | 394 | 395 | 396 | 397 | inputDataType 398 | 399 | String 400 | 401 | 402 | 403 | leftHandSideType 404 | 405 | String 406 | 407 | 408 | 409 | operatorDataType 410 | 411 | String 412 | 413 | 414 | 415 | rightHandSideType 416 | 417 | String 418 | 419 | 420 | myVariable_current.Entity_Type__c 421 | EqualTo 422 | 423 | HQ 424 | 425 | 426 | 427 | 428 | inputDataType 429 | 430 | Boolean 431 | 432 | 433 | 434 | leftHandSideType 435 | 436 | Boolean 437 | 438 | 439 | 440 | operatorDataType 441 | 442 | Boolean 443 | 444 | 445 | 446 | rightHandSideType 447 | 448 | Boolean 449 | 450 | 451 | myVariable_current.D_B_Update_Completed__c 452 | EqualTo 453 | 454 | true 455 | 456 | 457 | 458 | myRule_3_A1 459 | 460 | 461 | 462 | 463 | 464 | 465 | index 466 | 467 | 2.0 468 | 469 | 470 | myDecision4 471 | 472 | 50 473 | 0 474 | default 475 | 476 | myRule_5 477 | and 478 | 479 | 480 | inputDataType 481 | 482 | Boolean 483 | 484 | 485 | 486 | leftHandSideType 487 | 488 | Boolean 489 | 490 | 491 | 492 | operatorDataType 493 | 494 | Boolean 495 | 496 | 497 | 498 | rightHandSideType 499 | 500 | Boolean 501 | 502 | 503 | myVariable_current.D_B_Update_Completed__c 504 | EqualTo 505 | 506 | true 507 | 508 | 509 | 510 | myRule_5_A1 511 | 512 | 513 | 514 | 515 | Account Hierarchy Builder Process trigger 516 | Account_Hierarchy_Builder-3_InterviewLabel 517 | 518 | 519 | ObjectType 520 | 521 | Account 522 | 523 | 524 | 525 | ObjectVariable 526 | 527 | myVariable_current 528 | 529 | 530 | 531 | OldObjectVariable 532 | 533 | myVariable_old 534 | 535 | 536 | 537 | TriggerType 538 | 539 | onAllChanges 540 | 541 | 542 | Workflow 543 | 544 | 545 | evaluationType 546 | 547 | always 548 | 549 | 550 | 551 | extraTypeInfo 552 | 553 | 554 | isChildRelationship 555 | 556 | false 557 | 558 | 559 | 560 | reference 561 | 562 | [Account] 563 | 564 | 565 | 566 | referenceTargetField 567 | 568 | myRule_1_A2 569 | 570 | 100 571 | 300 572 | and 573 | 574 | 575 | implicit 576 | 577 | true 578 | 579 | 580 | Id 581 | EqualTo 582 | 583 | myVariable_current.Id 584 | 585 | 586 | 587 | 588 | dataType 589 | 590 | Boolean 591 | 592 | 593 | 594 | isRequired 595 | 596 | false 597 | 598 | 599 | 600 | leftHandSideLabel 601 | 602 | D&B Update Completed 603 | 604 | 605 | 606 | leftHandSideReferenceTo 607 | 608 | 609 | 610 | 611 | 612 | rightHandSideType 613 | 614 | Boolean 615 | 616 | 617 | D_B_Update_Completed__c 618 | 619 | false 620 | 621 | 622 | Account 623 | 624 | 625 | 626 | evaluationType 627 | 628 | always 629 | 630 | 631 | 632 | extraTypeInfo 633 | 634 | 635 | isChildRelationship 636 | 637 | false 638 | 639 | 640 | 641 | reference 642 | 643 | [Account] 644 | 645 | 646 | 647 | referenceTargetField 648 | 649 | myRule_3_A2 650 | 651 | 300 652 | 300 653 | and 654 | 655 | 656 | implicit 657 | 658 | true 659 | 660 | 661 | Id 662 | EqualTo 663 | 664 | myVariable_current.Id 665 | 666 | 667 | 668 | 669 | dataType 670 | 671 | Boolean 672 | 673 | 674 | 675 | isRequired 676 | 677 | false 678 | 679 | 680 | 681 | leftHandSideLabel 682 | 683 | D&B Update Completed 684 | 685 | 686 | 687 | leftHandSideReferenceTo 688 | 689 | 690 | 691 | 692 | 693 | rightHandSideType 694 | 695 | Boolean 696 | 697 | 698 | D_B_Update_Completed__c 699 | 700 | false 701 | 702 | 703 | Account 704 | 705 | 706 | 707 | evaluationType 708 | 709 | always 710 | 711 | 712 | 713 | extraTypeInfo 714 | 715 | 716 | isChildRelationship 717 | 718 | false 719 | 720 | 721 | 722 | reference 723 | 724 | [Account] 725 | 726 | 727 | 728 | referenceTargetField 729 | 730 | myRule_5_A1 731 | 732 | 500 733 | 200 734 | and 735 | 736 | 737 | implicit 738 | 739 | true 740 | 741 | 742 | Id 743 | EqualTo 744 | 745 | myVariable_current.Id 746 | 747 | 748 | 749 | 750 | dataType 751 | 752 | Boolean 753 | 754 | 755 | 756 | isRequired 757 | 758 | false 759 | 760 | 761 | 762 | leftHandSideLabel 763 | 764 | D&B Update Completed 765 | 766 | 767 | 768 | leftHandSideReferenceTo 769 | 770 | 771 | 772 | 773 | 774 | rightHandSideType 775 | 776 | Boolean 777 | 778 | 779 | D_B_Update_Completed__c 780 | 781 | false 782 | 783 | 784 | Account 785 | 786 | myDecision 787 | Active 788 | 789 | myVariable_current 790 | SObject 791 | false 792 | true 793 | true 794 | Account 795 | 796 | 797 | myVariable_old 798 | SObject 799 | false 800 | true 801 | false 802 | Account 803 | 804 | 805 | --------------------------------------------------------------------------------