Persona + Need + Purpose
...
Re-use the existing flow “Usyd Contact Address History Tracking”
Optimize the flow
Is it possible to split Duplicate review from Contact History Tracking so it is easier to identify which flow is doing what?
Execute Contact History Tracking even on contact creation - to follow the same logic as Salesforce Last Modified Date. This eliminates the need for integration to refer to different fields when comparing data time stamps
Don’t update the modified by ad modified date if the email/mobile/address change is cosmetic change as you are checking that anyhow in the flow now as part of this ticket
Add the filter at the entry level/inside the flow depending on best practice - use isnew() and ischanged() fields to trigger when Mailing Address fields, Mobile, Business Email, School email, personal email, Other email updated to trigger this flow
If a duplicate review case exists append what has been changed to description
If no case exists create and add the information of what has been changed at the contact level(based on the current flow) into the case description.
If possible, do not create the case when only cosmetic changes have been made (do a case-insensitive comparison, space, and punctuation) - Hope Step “If a duplicate review case exists append what has been changed to description” help us not create a duplicate and just update the change instead
IMPLEMENTATION
Create a new sub flow called “Track Update on Contact Address Mobile and Email (subflow)” equivalent to “USYD Contact Address History Tracking”
Actions inside this subflow should only be performed once there has been a change in the Email or Mailing Addresses or Mobile on the Contact record
...
3. Create an Invocable Apex Class called “UsydContactInvocableClass” that will handle the checking for the cosmetic changes of the Mailing, Email addresses and Mobile. If cosmetic change has just been made, creation of duplicate case records should not push through.
Note: If cosmetic change is only the change, do not update the corresponding Modified by and Modified Date field of the email/mailing address or mobile.
...
8. Create a New Record Triggered Flow (Fast Field Update/ Before Save) called Contact Before Save. This will be triggered once a contact record is created and its main purpose is to set the corresponding modified by and modified date fields if the mailing, email addresses and mobile are not empty.
Note: This has been as a fast field update since the fields that we are setting is on the triggering record.
...
UNIT TESTING STEPS
Scenarios
#1 Update a Contact record with a Duplicate Outcome Review having a “Not Enough Information“ outcome but without a Case
...
Log in as a Gift Administration User
Go to any contact record that has an existing Duplicate Review Outcome record
Update any of the following fields from the Contact record:
...
Component Name | API Name | Type | Parent Object | Operation (New/Update) | Changes |
Contact Before Save | USYD_ContactBeforeSave | Flow | Contact | New | |
Contact After Save | USYD_ContactAfterSave | Flow | Contact | New | |
Track Update on Contact Address Mobile and Email (subflow) | USYD_Track_Update_on_Contact_Address_Mobile_and_Email_subflow | Flow | Contact | New | |
Assign Appropriate Email as Recipient (subflow) | USYD_Assign_Appropriate_Email_as_Recipient_subflow | Flow | Contact | New | |
Create Or Update Duplicate Outcome Review Case (subflow) | USYD_Create_Or_Update_Duplicate_Outcome_Review_Case_subflow | Flow | Contact | New | |
UsydContactInvocableClass | UsydContactInvocableClass | Apex Class | N/A | New | |
UsydContactInvocableClassTest | UsydContactInvocableClassTest | Apex Class | N/A | New | |
USyd_DMLFlowHelperTest | USyd_DMLFlowHelperTest | Apex Class | N/A | Update | |
Assign Appropriate Email as Recipient | Assign_Appropriate_Email_as_Recipient | Flow | Contact | Update | Deactivated old flow Already deactivated in PROD |
Usyd Contact Address History Tracking | Usyd_Contact_Address_History_Tracking | Flow | Contact | Update | Deactivated old flow |