Get constituent prospect status- Flow fails if empty

I have a flow that pulls in prospect status but when its empty I get the following error:

Action 'Get_constituent_prospect_status' failed

[{"message":"The requested operation could not be fulfilled","error_name":"RequestNotFulfilled","error_code":404,"raw_message":"The requested operation could not be fulfilled","error_args":[]}]

I can't figure out how to look at the Get Items before it runs. This is run by one person at a time.

I can't filter the array, there are no trigger conditions under settings. I have tried doing a condition if empty but it doesn't get that far.

3b067e6a5270d6a53c3415b920fa6aa2-huge-im
33619c07f8a4743e7690a9dd8a9748cc-huge-im

Thanks,

Carolyn

Comments

  • Glen Hutson
    Glen Hutson Blackbaud Employee
    Tenth Anniversary Kudos 5 First Reply Name Dropper

    @Carolyn Grant
    We're checking with folks here at Blackbaud to see if we can make an adjustment to that API Endpoint / Connector action. In the mean time, this may be an alternative solution (or may prompt ideas from others).

    After that "Get constituent prospect status" action, create a Condition. Once you create that condition, click the three dots the right and select “Configure run after”.

    ee0d234b5ef57050a4ed77b84e9e9ea4-huge-im

    On the resulting screen, check: “is successful” and “has failed” and then click done:

    a3e58ff0af62372f3f2ddd830b2d5933-huge-im

    In the Condition Value, select expression and enter

    length(coalesce(outputs('Get_constituent_prospect_status')?['body/status'],''))

    And then “is greater than” and 1 . The on the yes side, put in what you want to happen when there is a status and on the no side when there is no status.

    77b79fd312ef2637013bf7daf1b77f18-huge-im

    What this is doing:

    • Making the condition run regardless if the “Get constituent prospect status” passes or fails.
    • The coalesce function is a short-hand if/then to say "hey, if there is a status use that, if not, replace it with an empty result". Empty and null are two different things.
    • The length part of the expression returns how long the status result is.
      • If it's greater than 1, then there's something really there and follow the ‘yes’. Otherwise, follow the ‘no’.

  • @Glen Hutson

    THANK YOU!! That worked!

    I had tried to do configure run after on the next item in my flow but it didn't work. I read about the coalesce function in Google but I wasn't sure if it would work here so thank you for your expertise.

Categories