List of Gifts by Constituent Code?

Hello developers! Is there a way to pull a list of GIFTS by Constituent Code and Funds? Currently I can get a list of Constituents by Constituent Codes (e.g. ‘Foundation’) and iterate through each Constituent (500+) to search for GIFTS by Constituent ID (and filter with Fund(s)). But this is clunky and slow in Logic Apps. Can I shortcut the search by simply asking for a List of GIFTS for any Donor with Constituent Code of ‘Foundation’, further filtered by a subset list of FUNDS (i.e. there are certain funds I don't want included in the list of GIFTS). Thanks in advance!

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge

    @Cameron Hurst
    First, there is no such shortcut of list gift by donor constituent code. So the idea you in mind is the way to go, however a few “data” type of action will help make your flow easier. (I'm going to assume you are using Power Automate, if not, it will depend on what you use and if that have data function that helps).

    • You will want to get a list of constituent by constituent code, you already know how to do that.
    • then you have to get the constituent system id from the constituent, not sure how you are doing it now, but the efficient way to do this would be to use the SELECT action in flow. Basically you are selecting only the constituent system id from the JSON data returned by the “list constituent by constituent code”. This is a fast operation and does not need a loop.
    • with the SELECT action, you get an array of constituent system id
    • Use the List Gifts action and filter by Constituent ID, here you will use the “join” expression to operate on the SELECT action's array of constituent system id, and join the constituent system id by comma, for example (assuming your SELECT action is named “Select Constituent System ID”):
      • join(body('Select_Constituent_System_ID'), ',')
    37c40c8c3b243572f4a6e5948a73e381-huge-im
    3c7f5aa9088d53a83dc27f5e23116404-huge-im
    2f0124f68e616bb2bc6427ee6cb5feee-huge-im
    You can also filter by Fund ID here in this step too if you already know the fund system record id

    This will work as long as there are not “a lot” of constituent id. I do not know the limit, cuz i have reach that limit before, but forgot how many now. You will get an error if you did reach the limit of number of constituent ID. If you do get an error, you will have to use the POST action for List Gift.

    B/c I reach the limit of how many constituent ID can be used in a GET HTTP request, Blackbaud created a POST HTTP request for the same List Gift endpoint.

    2193c3ca57ab7935615bea07ad7274e3-huge-im

    If you do end up using the POST List Gift endpoint, this is not available directly from Blackbaud connector, so you will have to use the Blackbaud Add-in of Send HTTP Request action. You will not need to use the “join” expression, as the constituent ids will be provided as an array directly via Request Body, so you will simply supply the dynamic content of the SELECT action's output and put that into the request body for criteria by constituent_id

    959d9285c7cd4e87417bcc92d5ccf292-huge-im
  • @Alex Wong Outstanding answer - thank you! I wasn't aware of the POST option and did hit the limit trying to append the array of Constituent_IDs in my GET. The iterative way (querying for each of my 516 Constituent_IDs was taking about 13 minutes (in a Logic App - not Power Automate but same/similar scripting engine). This approach will be a LOT faster. Thanks again Alex!