Extract first gift date in power automate

Hello, I am creating a flow that runs everynight, i want a job to list any gifts/ constituents where their first gift date = today, anyone know where I can find first gift date? can't see it under get constituent, or lifetime giving?

Comments

  • Hey @Ashley Gelderblom, there's a couple of ways you could accomplish this, but the easiest would be to use the new HTTP Request action. You can use the Constituent API and there's an endpoint for First Gift.

    cbeaffe75888d7f4ca8ad56dbdf1e8f4-huge-im

    You'll need to pass the constituent ID for each gift you pull from the list of gifts to this path: /constituent/v1/constituents/{constituent Id}/givingsummary/first

    So you'll pull the list of gifts for today, for example:

    b520070e5be60c1ff6a47e54ce00c409-huge-im

    Next, use the Send an HTTP Request action from the Blackbaud SKY Add-in connector. You'll want to leave the default request type to GET and then create an expression to concatenate the necessary parts of the relative path for the HTTP request:

    concat('/constituent/v1/constituents/', items('Apply_toeach')?['constituentid'],' /givingsummary/first'])

    f412d1311eb4bb35c0d33548ded42116-huge-im
    9db9f5510abb86de8831aebc40cee1bc-huge-im

    Once, that runs, you'll get the below JSON object with the date of first gift for each constituent you pass into the path. From there, add the additional logic to check if that day is equal to today.

    59e2a181bcf73e52cf7d2f11d12434d5-huge-im

  • @Matt Thacker
    amazing, I think I can work with this, thanks for your comprehensive reply

  • @Ashley Gelderblom (and Matt!),

    Note that the RENXT Gifts connector contains actions for getting a constituent's first/greatest/latest/lifetime giving (we debated whether to put these actions in the RENXT Constituents connector but ultimately decided to co-locate them with other gift functionality in the Gifts connector).

    For example:

    https://learn.microsoft.com/en-us/connectors/blackbaudgifts/#get-constituent-first-gift

    4b381ec5d6e866e249af72b2b17bce0e-huge-im

    So I think you can do this without needing the Send an HTTP Request action.

    I would approach this by building a flow that runs on a recurrence (each night) and use the List Gifts action (also from the RENXT Gifts connector) to list gifts added <today> by specifying a filter for either “Start gift date” or “Added on or after” (depending on how you define “today”). You could also define a list in NXT if you have more criteria (what types of gifts to include, etc.) and then reference that list in the ListGifts action instead of providing date criteria in the flow.

    For each gift returned, you'll know the gift system record ID and the constituent system record ID. You can get the constituent's first gift (using the constituent ID) and compare the gift ID of that result with the current gift ID in your loop. If they match, then the current gift is the constituent's first gift.

    Hope this helps - let us know if you run into any problems!

  • @Ben Lambert
    Thanks Ben - where exactly do I get the Constituents first gift? which connector?

  • @Ben Lambert ah never mind - I found it, thanks