Profile matching and merging in integration scripts

2019-10-08 19:37:00.0

The video below shows setting up a system integration process to import profile (ie customer) data from a remote source.

This process matched existing customers where possible, and when new information allows existing profiles to be identified as duplicates merges them.

This is just a simple introduction, the matching API offers many more factors for matching profiles.

Source code used in the demo











function checkCusts(firstName, surName, phone, email) {   
    var matchReq = userManager.newProfileMatchRequest().or();
    // this will return all profiles matching all given non-blank params
    if( email ) {
    if( phone ) {
    var matched = userManager.findMatching(matchReq);"Matched {} profiles", matched.size());
    if( matched.size() == 0 ) {
        nextStep.exec(firstName, surName, phone, email, null);
    } else if( matched.size() == 1) {
        var existing = matched.get(0);
        nextStep.exec(firstName, surName, phone, email, existing.userName);
    } else {
        // Choose the first as the merge target. Merge others into that, and then continue with it
        var mergeDest = matched.get(0);
        userManager.mergeProfiles(mergeDest, matched);
        nextStep.exec(firstName, surName, phone, email, mergeDest.userName);


Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro labore architecto fuga tempore omnis aliquid, rerum numquam deleniti ipsam earum velit aliquam deserunt, molestiae officiis mollitia accusantium suscipit fugiat esse magnam eaque cumque, iste corrupti magni? Illo dicta saepe, maiores fugit aliquid consequuntur aut, rem ex iusto dolorem molestias obcaecati eveniet vel voluptatibus recusandae illum, voluptatem! Odit est possimus nesciunt.