Table of Contents

Search

  1. Preface
  2. Introduction to Business Entity Services
  3. EJB Business Entity Service Calls
  4. REST Business Entity Service Calls
  5. REST APIs for Data Director
  6. SOAP Business Entity Service Calls
  7. Cross-reference Records and BVT Calculations Services
  8. Supporting Corporate Linkage Service
  9. External Calls to Cleanse, Analyze, and Transform Data
  10. Appendix A: Using REST APIs to Add Records
  11. Appendix B: Using REST APIs to Upload Files
  12. Appendix C: Using REST APIs to Manage Reports

Test the Merge Logic

Test the Merge Logic

To test the merge logic that prevents telephone numbers from merging, use the MergePreview API .
  1. To create two Person business entities, use the Create API.
    POST https://<host>:<port>/cmx/cs/<ors>/Person?systemName=Admin { firstName: "John", Addresses: { item: [ { cityName: "Toronto" } ] }, TelephoneNumbers: { item:[ { phoneNum: "111-11-11" } ] } }
    POST https://<host>:<port>/cmx/cs/<ors>/Person?systemName=Admin { firstName: "John", Addresses: { item: [ { cityName: "Ottawa" } ] }, TelephoneNumbers: { item:[ { phoneNum: "222-22-22" } ] } }
    The response includes the following sample row IDs:
    • Person: 161923, 161924
    • Addresses: 2123, 2124
    • TelephoneNumbers: 101723, 101724
  2. To preview the merged Person business entities, run the PreviewMerge API.
    POST https://<host>:<port>/cmx/cs/<ors>/Person/161923?action=previewMerge&depth=2 { keys: [ { rowid: "161924" } ] }
    The response includes two addresses and two telephone numbers.
    { "Person": { "rowidObject": "161923 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.878-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.879-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Person: , Bill", "partyType": "Person", "displayName": "Bill", "firstName": "Bill", "TelephoneNumbers": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "101723 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.904-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.905-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "111-1111 ", "phoneCountryCd": "1" }, { "rowidObject": "101724 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.768-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.769-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "222-2222 ", "phoneCountryCd": "1" } ] }, "Addresses": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "2123 ", "creator": "admin", "createDate": "2016-10-20T09:50:37.956-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.956-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses", "Address": { "rowidObject": "2121 ", "creator": "admin", "createDate": "2016-10-20T09:50:36.922-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.923-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Address", "cityName": "Toronto" } }, { "rowidObject": "2124 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.790-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.790-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses", "Address": { "rowidObject": "2122 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.777-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.777-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Address", "cityName": "Ottawa" } } ] } } }
  3. Run the PreviewMerge API with the merge overrides.
    The overrides trigger the external call that prevents the telephone numbers from merging.
    POST https://<host>:<port>/cmx/cs/<ors>/Person/161923?action=previewMerge&depth=3 { keys: [ { rowid: "161923" } ], overrides: { Person: { Addresses: { item:[ { rowidObject: "2123", MERGE: { item:[{key:{rowid: "2124"}}], $original: { item:[null] } } } ] }, TelephoneNumbers: { item:[ { rowidObject: "101723", MERGE: { item:[{key:{rowid: "101724"}}], $original: { item:[null] } } } ] } } } }
    The response contains a single address and two telephone numbers:
    { "Person": { "rowidObject": "161923 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.878-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.879-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Person: , Bill", "partyType": "Person", "displayName": "Bill", "firstName": "Bill", "TelephoneNumbers": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "101723 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.904-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.905-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "111-1111 ", "phoneCountryCd": "1" }, { "rowidObject": "101724 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.768-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.769-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "222-2222 ", "phoneCountryCd": "1" } ] }, "Addresses": { "link": [], "firstRecord": 1, "recordCount": 1, "pageSize": 1, "item": [ { "rowidObject": "2123 ", "creator": "admin", "createDate": "2016-10-20T09:50:37.956-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.956-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses" } ] }, "PersonDetails": { "link": [], "recordCount": 0, "pageSize": 0, "item": [] } } }

0 COMMENTS

We’d like to hear from you!