EMS - API Documentation - PersonMerge
Markedsrelatert informasjon finnes her….
Introduction
Person merge
Duplicate records (persons) may be introduced to the system. Duplicate person records may be merged and processed. When two or more person records are merged, a new person record is created with a new PersonId. This new PersonId is used as the foreign key to the membership, payment and other person related entities.
The 3.party are informed of person merge function through the Service Bus Queue.
There will be an information message (changeType = 9) about the affected record before it’s changed or created.
3.party should expect the following sequence of messages in case of person merge:
Insert message for New Person with Merged person IDs
Old person 1 message with change type 2
Old person 2 message with change type 2
Information message about New organization/club Membership
a. Information message about New Person with Merged person IDs
b. Add new Membership message with Merged Membership IDsInformation message about old organization/club membership
a. Information message about old person 1
b. Soft delete old membership (Old person 1 Club membership(s))Information message about old organization/club membership
a. Information message about old person 2
b. Soft delete old membership (Old person 2 Club membership(s))Information message about New organization/Gren for new person
a. Information message about New Person with Merged person IDs
b. Add new ActiveMembership message with Merged ActiveMembership IDsInformation message about old organization/Gren membership
a. Information message about old person 1
b. Soft delete old Activemembership (Old person 1 Gren membership(s))Information message about old organization/Gren membership
a. Information message about old person 2
b. Soft delete old Activemembership (Old person 2 Gren membership(s))
10. Update Sports number for new person from old person 1
11. Update Sports number for new person from old person 2
12. Delete old gren Membership person 1
13. Delete old club Membership person 1
14. Delete old gren Membership person 2
15. Delete old club Membership person 2
16. Delete old person 1
17. Delete old person 2
It is the 3.party´s responsibility to read person merge messages and process them on their side, remove duplicate person records and maintain consistency with NIF data.
Example of messages 3. party should expect when duplicate person records are merged.
Insert message for New Person with Merged person IDs
"body": { "PersonId": 8339484, "SportNo": "M010620TRO03", "GenderId": 1, "BirthDate": "2020-06-01T00:00:00", "IsDead": false, "DeathDate": null, "IsDeleted": false, "IsValidated": false, "LastName": "Adolfsen", "FirstName": "Trond", "AccountId": null, "CitizenshipRegionId": 1500152, "ProfilePictureId": null, "AddressLine1": "Oslo", "AddressLine2": null, "PostCode": "0010", "City": "OSLO", "PostCodeId": 14892, "Country": "Norge", "CountryId": 1500152, "Email": "Trond.Adolfsen@mailinator.com", "Email2": null, "Email3": null, "PrivatePhone": null, "WorkPhone": null, "MobilePhone": null, "RegistrationPhone": null, "RegistrationPhoneCountryCode": null, "IsSecretAddress": false, "IsSecretPrivatePhone": false, "IsSecretWorkPhone": false, "IsSecretMobilePhone": false, "IsSecretEmail": false, "IsSecretEmail2": null, "IsSecretEmail3": null, "OrgIdOwner": 19426, "MergedPersonIds": "8339482,8339483" }
Information message about New organization/club Membership
"body": { "OrgId": 19426, "OrgNo": "KL01010001", "OrgName": "Idd Sportsklubb", "Abbreviation": "Idd Sportsklubb", "DescribingName": "Idd Sportsklubb", "OrgTypeId": 5, "AccountId": 5284797, "IsActive": true, "SportId": 16, "TerminationDate": null, "TerminationReasonId": null, "Comment": null, "OrganisationNumber": "883927842", "MunicipalityId": 500001, "FoundedDate": "2005-05-31T00:00:00", "AddressLine1": "Idd sportsklubb", "AddressLine2": "PB 7 Risum", "PostCode": "1761", "City": "HALDEN", "PostCodeId": 215339, "Country": "Norge", "CountryId": 1500152, "VisitAddressLine1": "Aspedammenveien 46", "VisitAddressLine2": "1766", "VisitPostCode": "HALDEN", "VisitCity": null, "VisitPostCodeId": 10946, "Email": "info@iddsk.no", "Homepage": "www.iddsk.no", "Telephone1": null, "Telephone2": "09876542", "MobilePhone": "87654321", "Fax": null, "IsSecretAddress": false, "IsSecretTelephone1": false, "IsSecretTelephone2": false, "IsSecretMobilePhone": false, "IsSecretFax": false, "IsSecretEmail": false, "Longitude": "5.347138599999994", "Latitude": "60.4837661", "OrgIdOwner": 19426, "ParentOrgId": null, "ParentOrgTypeId": null }
Information message about New Person with Merged person IDs
"body": {
"PersonId": 8339484,
"SportNo": "M010620TRO03",
"GenderId": 1,
"BirthDate": "2020-06-01T00:00:00",
"IsDead": false,
"DeathDate": null,
"IsDeleted": false,
"IsValidated": false,
"LastName": "Adolfsen",
"FirstName": "Trond",
"AccountId": null,
"CitizenshipRegionId": 1500152,
"ProfilePictureId": null,
"AddressLine1": "Oslo",
"AddressLine2": null,
"PostCode": "0010",
"City": "OSLO",
"PostCodeId": 14892,
"Country": "Norge",
"CountryId": 1500152,
"Email": "Trond.Adolfsen@mailinator.com",
"Email2": null,
"Email3": null,
"PrivatePhone": null,
"WorkPhone": null,
"MobilePhone": null,
"RegistrationPhone": null,
"RegistrationPhoneCountryCode": null,
"IsSecretAddress": false,
"IsSecretPrivatePhone": false,
"IsSecretWorkPhone": false,
"IsSecretMobilePhone": false,
"IsSecretEmail": false,
"IsSecretEmail2": null,
"IsSecretEmail3": null,
"OrgIdOwner": 19426,
"MergedPersonIds": "8339482,8339483"
}
4. Add new Membership message with Merged Membership IDs
5. Information message about old organization/club membership
6. Information message about old person 1
7. Soft delete old membership (Old person 1 Club membership(s))
8. Information message about old organization/club membership
9. Information message about old person 2
10. Soft delete old membership (Old person 2 Club membership(s))
11. Information message about New organization/Gren for new person
12. Information message about New Person with Merged person IDs
13. Add new ActiveMembership message with Merged ActiveMembership IDs
14. Information message about old organization/Gren membership
15. Information message about old person 1
16. Soft delete old Activemembership (Old person 1 Gren membership(s))
17. Information message about old organization/Gren membership
18. Information message about old person 2
19. Soft delete old Activemembership (Old person 2 Gren membership(s))
20. Update Sports number for new person from old person 1
21. Update Sports number for new person from old person 2
22. Delete old gren Membership person 1
23. Delete old club Membership person 1
24. Delete old gren Membership person 2
25. Delete old club Membership person 2
26. Delete old person 1
27. Delete old person 2