How to handle multiple matches when searching for a constituent

Hello,

I'm looking to build data integrations from our fundraising platforms to Raiser's Edge. I know I will need to look for existing constituents based on the data associated with a new transaction in one of those platforms, such as name, email and phone. I can use the Get constituent list (search) endpoint from the NXT Data Integration API.

This works fine when the search returns 0 matches or 1 match, but I'm not sure how to handle it if it returns multiple results. This may happen where multiple people with the same name are in our database, or where multiple records share a single email address (e.g. family members).

Is there a way to specify that the results are sorted in order of the closeness of the match? Then I could set it up to use the record with the closest match. Or is there another way to handle this situation?

Thanks for your help!

Comments

  • Tim McVicker
    Tim McVicker Blackbaud Employee
    Sixth Anniversary Kudos 1 Name Dropper Participant

    @Alex Feuchtwanger
    Hey Alex! Have you seen the GetDuplicateSearchResults Constituent endpoint? That searches across constituents based on the criteria you provide (like name, address, email, etc) and returns a list of matches with a rank score. You could then choose the constituent that had the highest score (if there were any matches). This endpoint is a little newer than the NXT Data Integration one you are using, I think.

    Does that endpoint have what you need?

  • @Tim McVicker
    Hi Tim! Thanks very much, that's exactly what I need. It's tricky to find the right endpoint, especially across multiple APIs!

    As you say, the next thing I would need to do is identify the constituent with the highest score. I'm working in Azure Logic Apps. Can you offer any suggestions about how I would achieve that in this tool?

    My current thinking is:

    • Create array variable for ranks and use for each loop to add each rank to array
    • Set a new variable = max of all the ranks
    • For each search result, if rank = max rank, then update that constituent record

    I've not tested it yet because we've not yet got an NXT test environment.

Categories