Persona + Need + Purpose
As a
GA User
I want to
Improve the creation of “Review Duplicate Outcome” cases to include the link or information to/of record being changed and what are those changes in the case itself.
So that
we can easily know which cases need to be reviewed. We fine tune the process so that users do not have to deal with cases which are not adding information to whether duplicates exist such as when cosmetic changes changed on contact’s address from “Australia” to “AUSTRALIA”
Acceptance Criteria:
Re-use the existing flow “Usyd Contact Address History Tracking”
Optimize the flow
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 “USYD Contact Address History Tracking (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.
4. Call the sub-flow [USYD Contact Address History Tracking (subflow)] from the Main Flow (Contact Main Flow)
5. As the output of the sub-flow, the triggering record is being updated with all the necessary updates made from the subflow. And lastly, the triggering record(Contact) is being updated.
UNIT TESTING STEPS
Scenarios
#1 Update a Contact record with a Duplicate Outcome Review 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:
Contact Mailing City
Contact Mailing Street
Contact Mailing State/Province
Contact Mailing ZIP/Postal Code
Contact Mailing Country
Mobile Phone
Business Email
Other Email
Personal Email
School Email
Updated the Contact Maling Street from sampaguita → Nangka and Save.
Expected Output: A duplicate case will be created and from the Case Description field, the update will be logged.
Actual Output: Duplicate case is created and changes are logged to the Case Description field.
#2 Update a Contact record with an existing Duplicate Case
Log in as a Gift Administration User
Go to any contact record that has an existing Duplicate Case record
Update any of the following fields from the Contact record:
Contact Mailing City
Contact Mailing Street
Contact Mailing State/Province
Contact Mailing ZIP/Postal Code
Contact Mailing Country
Mobile Phone
Business Email
Other Email
Personal Email
School Email
Updated the Contact Maling Street from Nangka → naNGkA and Save.
Expected Output: Since a duplicate Case is already existing and change was only cosmetic (text-casing, space or punctuation), only update the Case Description field with the changes made on the Contact record.
Actual Output: Did not create another duplicate Case record but instead used the existing one and updated the Case’s Description field.
COMPONENTS ADDED/MODIFIED
Component Name | API Name | Type | Parent Object | Operation (New/Update) |
USYD Contact Address History Tracking (subflow) | USYD_Contact_Address_History_Tracking_subflow | Flow | Contact | New |
UsydContactInvocableClass | UsydContactInvocableClass | Apex Class | N/A | New |
UsydContactInvocableClassTest | UsydContactInvocableClassTest | Apex Class | N/A | New |
USYD Contact Main Flow | USYD_Contact_Main_Flow | Flow | New |