Skip to content

NEW FEATURE: Person account matching #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4779748
updated gitignore
tcdahlberg Dec 6, 2024
ebcb0cd
updated gitignore
tcdahlberg Dec 6, 2024
6898dd4
Added fields for person account matching configurations
tcdahlberg Dec 6, 2024
69b68ab
Added layouts and permissions for person account matching
tcdahlberg Dec 6, 2024
5747a99
Added educloud org definition, fixed permissions for educloud
tcdahlberg Dec 7, 2024
ac2df1f
consolidated and optimized duplicate matching class
tcdahlberg Dec 8, 2024
a6b50b8
fixed values for person account match setup
tcdahlberg Dec 8, 2024
867cabd
Permissions, test work-half done
tcdahlberg Jan 3, 2025
eb06bac
added robot framework front-end testing samples
tcdahlberg Jan 8, 2025
0f89e84
robot test update
tcdahlberg Jan 17, 2025
cf5ad0a
fixed person account matching added new PA field
tcdahlberg Feb 3, 2025
9a2d4d2
Added sorting to get last modified correctly
tcdahlberg Feb 4, 2025
23302ba
fixed trigger firing out of step from update on next page
tcdahlberg Feb 6, 2025
f45a412
removed state/ctry assignment from test class to not conflict with st…
tcdahlberg Feb 6, 2025
a18118e
Added check of old reg for update contact matching
tcdahlberg Feb 10, 2025
162cb68
fixed Lead trigger test to use insert not update
tcdahlberg Feb 10, 2025
3dfbb0d
Added check for empty match log to not skip
tcdahlberg Feb 10, 2025
3ce849f
Added ability to skip matching for guests
tcdahlberg Feb 10, 2025
b2ab8b5
Merge branch 'master' of https://github.com/SFDO-Community/Summit-Eve…
tcdahlberg Feb 10, 2025
ac94f85
Merge branch 'master' into person_account_matching2
tcdahlberg May 2, 2025
2b1132f
optimized shared person account detector method
tcdahlberg May 9, 2025
38b7e21
update from master
tcdahlberg Jun 10, 2025
f307ebe
set dev to install edu cloud
tcdahlberg Jun 26, 2025
ff3c36f
Added person account custom metadata matching, fixed bug
tcdahlberg Jul 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ robot/SummitEventsApp/results/

# Illuminated Cloud (IntelliJ IDEA)
IlluminatedCloud
.IlluminatedCloud
out
.idea
*.iml

# CumulusCI
Expand Down
8 changes: 7 additions & 1 deletion cumulusci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,13 @@ plans:

orgs:
scratch:

dev_namespaced:
config_file: orgs/namespaced.json
days: 7
namespaced: true
namespaced: true

dev:
config_file: orgs/educloud.json
days: 7
namespaced: false
10 changes: 6 additions & 4 deletions datasets/snowfakery/school_recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
probability: 50%
pick: ${{fake.city}} University
BillingCity:
fake: city
fake: City
BillingStreet:
fake: street_address
fake: StreetAddress
BillingState:
fake: state
fake: State
BillingCountry:
fake: country
fake: CurrentCountry
Phone:
fake: PhoneNumber
Industry: Education
870 changes: 453 additions & 417 deletions force-app/main/default/classes/SummitEventsContactMatching.cls

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions force-app/main/default/classes/SummitEventsShared.cls
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,12 @@ public with sharing class SummitEventsShared {
return pickList;
}

// Test to see if person accounts are enabled.
public static Boolean personAccountsEnabled()
{
return Schema.SObjectType.Account.fields.getMap().containsKey( 'isPersonAccount' );
}

//Method to test object and field availability for current user (Guest user)
public static String checkFieldGuestAccess(String objectApiName, String fieldName, String requiredFieldType, Boolean testCreatable, String qualifierLabel) {
String returnError = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@
<identifier>record_item_005</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Use_Matching_for_Guest_Registrations__c</fieldItem>
<identifier>RecordUse_Matching_for_Guest_Registrations__cField</identifier>
</fieldInstance>
</itemInstances>
<name>Facet-cb142f92-98ca-47b5-b688-5a65a1518288</name>
<type>Facet</type>
</flexiPageRegions>
Expand Down Expand Up @@ -2384,6 +2394,34 @@
<name>Facet-57eb38be-3210-48bd-8fee-0f9c6d7bd56c</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Use_Matching_for_Guest_Registrations__c</fieldItem>
<identifier>RecordUse_Matching_for_Guest_Registrations_cField</identifier>
</fieldInstance>
</itemInstances>
<name>Facet-514308ce-1507-4296-99b2-0e45ac514a1f</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>body</name>
<value>Facet-514308ce-1507-4296-99b2-0e45ac514a1f</value>
</componentInstanceProperties>
<componentName>flexipage:column</componentName>
<identifier>flexipage_column5</identifier>
</componentInstance>
</itemInstances>
<name>Facet-d418ff69-6281-4da5-a203-16d51050c2fe</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<fieldInstance>
Expand Down Expand Up @@ -2476,6 +2514,88 @@
<name>Facet-514adf7f-50da-4869-8bfa-25344d64cd70</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Person_Matching_Rules__c</fieldItem>
<identifier>RecordPerson_Matching_Rules_cField</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Person_Creation_Duplicate_Rule__c</fieldItem>
<identifier>RecordPerson_Creation_Duplicate_Rule_cField</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Custom_Metadata_Person_Matching_Method__c</fieldItem>
<identifier>RecordCustom_Metadata_Person_Matching_Method_cField</identifier>
</fieldInstance>
</itemInstances>
<name>Facet-ac8e3d0b-870a-4b48-a3b5-52fd82d4ebd9</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Person_Matching_No_Match_Behavior__c</fieldItem>
<identifier>RecordPerson_Matching_No_Match_Behavior_cField</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Person_Matching_Multiple_Match_Behavior__c</fieldItem>
<identifier>RecordPerson_Matching_Multiple_Match_Behavior_cField</identifier>
</fieldInstance>
</itemInstances>
<name>Facet-0cab5c79-911b-4bd1-a8ac-25bfa23229eb</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>body</name>
<value>Facet-ac8e3d0b-870a-4b48-a3b5-52fd82d4ebd9</value>
</componentInstanceProperties>
<componentName>flexipage:column</componentName>
<identifier>flexipage_column3</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>body</name>
<value>Facet-0cab5c79-911b-4bd1-a8ac-25bfa23229eb</value>
</componentInstanceProperties>
<componentName>flexipage:column</componentName>
<identifier>flexipage_column4</identifier>
</componentInstance>
</itemInstances>
<name>Facet-b0202753-acc5-45d9-aba9-87e527f49ad9</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<fieldInstance>
Expand Down Expand Up @@ -2569,6 +2689,24 @@
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>columns</name>
<value>Facet-d418ff69-6281-4da5-a203-16d51050c2fe</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>horizontalAlignment</name>
<value>false</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>label</name>
<value>Guest Registration Matching</value>
</componentInstanceProperties>
<componentName>flexipage:fieldSection</componentName>
<identifier>flexipage_fieldSection3</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
Expand All @@ -2587,6 +2725,24 @@
<identifier>flexi_field_sec_22</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>columns</name>
<value>Facet-b0202753-acc5-45d9-aba9-87e527f49ad9</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>horizontalAlignment</name>
<value>false</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>label</name>
<value>Person Account Matching</value>
</componentInstanceProperties>
<componentName>flexipage:fieldSection</componentName>
<identifier>flexipage_fieldSection2</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
Expand Down Expand Up @@ -3091,7 +3247,7 @@
</componentInstanceProperties>
<componentInstanceProperties>
<name>title</name>
<value>Contact &amp; Lead Matching</value>
<value>Registration Matching</value>
</componentInstanceProperties>
<componentName>flexipage:tab</componentName>
<identifier>flex_tab_17</identifier>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
<behavior>Edit</behavior>
<field>Contact__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Person_Account__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Lead__c</field>
Expand Down Expand Up @@ -122,10 +126,6 @@
<behavior>Readonly</behavior>
<field>UG_Parking_Pass_Link__c</field>
</layoutItems>
<layoutItems>
<behavior>Readonly</behavior>
<field>Registrant_Id_QR_Code__c</field>
</layoutItems>
</layoutColumns>
<layoutColumns>
<layoutItems>
Expand Down Expand Up @@ -250,6 +250,10 @@
<behavior>Edit</behavior>
<field>New_Lead_Created__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>New_Person_Account_Created__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Matching_Log__c</field>
Expand Down Expand Up @@ -349,10 +353,6 @@
<behavior>Edit</behavior>
<field>Registrant_Date_of_Birth__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Registrant_Date_of_Birth_Text__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Registrant_Gender__c</field>
Expand Down Expand Up @@ -806,7 +806,7 @@
<showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
<showSubmitAndAttachButton>false</showSubmitAndAttachButton>
<summaryLayout>
<masterLabel>00hDd000000XLcS</masterLabel>
<masterLabel>00h6t000003YwxN</masterLabel>
<sizeX>4</sizeX>
<sizeY>0</sizeY>
<summaryLayoutStyle>Default</summaryLayoutStyle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
<excludeButtons>ChangeOwnerOne</excludeButtons>
<excludeButtons>ChangeRecordType</excludeButtons>
<excludeButtons>OpenSlackRecordChannel</excludeButtons>
<excludeButtons>PrintableView</excludeButtons>
<excludeButtons>Share</excludeButtons>
<excludeButtons>Submit</excludeButtons>
Expand Down Expand Up @@ -704,6 +705,10 @@
<editHeading>true</editHeading>
<label>Contact Matching</label>
<layoutColumns>
<layoutItems>
<behavior>Edit</behavior>
<field>Use_Matching_for_Guest_Registrations__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Contact_Matching_Rules__c</field>
Expand Down Expand Up @@ -807,11 +812,6 @@
</miniLayout>
<platformActionList>
<actionListContext>Record</actionListContext>
<platformActionListItems>
<actionName>Edit</actionName>
<actionType>StandardButton</actionType>
<sortOrder>0</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>Delete</actionName>
<actionType>StandardButton</actionType>
Expand All @@ -822,6 +822,11 @@
<actionType>StandardButton</actionType>
<sortOrder>2</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>Edit</actionName>
<actionType>StandardButton</actionType>
<sortOrder>0</sortOrder>
</platformActionListItems>
</platformActionList>
<relatedLists>
<fields>NAME</fields>
Expand Down Expand Up @@ -895,7 +900,7 @@
<showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
<showSubmitAndAttachButton>false</showSubmitAndAttachButton>
<summaryLayout>
<masterLabel>00h6t000003YwxO</masterLabel>
<masterLabel>00h8N000007w9nU</masterLabel>
<sizeX>4</sizeX>
<sizeY>0</sizeY>
<summaryLayoutStyle>Default</summaryLayoutStyle>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"></CustomObject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<label>Summit Events Person Matching Mapping</label>
<pluralLabel>Summit Events Person Matching Mappings</pluralLabel>
<visibility>Public</visibility>
</CustomObject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Matching_Only__c</fullName>
<defaultValue>false</defaultValue>
<description>Only select if this is to be used in a matching rule, but value should not be added to the Person Account record.</description>
<fieldManageability>DeveloperControlled</fieldManageability>
<inlineHelpText>Only select if this is to be used in a matching rule, but value should not be added to the Person Account record.</inlineHelpText>
<label>Matching Only</label>
<type>Checkbox</type>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Person_Account_Field_API_Name__c</fullName>
<externalId>false</externalId>
<fieldManageability>SubscriberControlled</fieldManageability>
<label>Person Account Field API Name</label>
<length>255</length>
<required>true</required>
<type>Text</type>
<unique>false</unique>
</CustomField>
Loading