Passing multiple constituent codes in the List Constituents action in Power Automate
Options
The List Constituents endpoint in SKY API allows you to pass multiple constituent codes in a single request. If your database makes extensive use of constituent codes, like ours does, this is a very useful way of narrowing down the results that the endpoint returns.
But as far as I can tell, the List Constituent action in the Power Automate connector only allows you to pass a single constituent code. Am I correct in that? Or is there some sort of delimiter that would allow me to pass more than one?
Are there plans to update the connector to allow passing more than one constituent code? I know that a workaround would be to create a list using the constituent codes and then select that list in the connector, but I'd like to be able to pass at least some of these codes dynamically.
But as far as I can tell, the List Constituent action in the Power Automate connector only allows you to pass a single constituent code. Am I correct in that? Or is there some sort of delimiter that would allow me to pass more than one?
Are there plans to update the connector to allow passing more than one constituent code? I know that a workaround would be to create a list using the constituent codes and then select that list in the connector, but I'd like to be able to pass at least some of these codes dynamically.
Tagged:
0
Comments
-
Hi Ben,
Good observation! You are correct in that, currently, the Power Automate connector List constituents action only supports specifying a single value for the constituent code filter, even though the underlying ListConstituents endpoint in the SKY API supports multiple values. I'll try to provide some explanation and possible workaround here.
OpenApi v2 (and OpenApi v3) has a mechanism to describearray
query parameters (i.e., parameters that can accept a list of values). When you define a query parameter as anarray
you can specify acollectionFormat
property to indicate the way the array items can be expressed. There are a few options:
-csv
(the default value)
-ssv
(space-separated values)
-tsv
(tab-separated values)
-pipes
(pipe-separated values)
-multi
(multiple instances)
Most (but not all) of the array parameters in SKY API are implemented using ascollectionFormat: multi
, which means you can specify multiple instances of the parameter like:?constituent_code=foo&constituent_code=bar
(that may look like an odd phrasing, but it handles cases where the parameter values have a delimiter in them (like "Board, Past member").
Thecsv
format means you can treat the parameter as a comma-separated list of values (assuming the values don't have commas in them). So the equivalent phrasing to the above would be:?constituent_code=foo,bar
It turns out that some of the operations in the SKY APIs actually support both techniques. For example, you can callListGifts
and filter the list of funds using EITHERcsv
ormulti
. So both of these work and are equivalent (and the backend will interpret this as a logical OR and return gifts to either fund 6 OR fund 7:?fund_id=6,7
?fund_id=6&fund_id=7
Currently, Power Automate connectors ONLY supportcsv
format forarray
parameters. But the implementation for this endpoint on the Blackbaud side ONLY supportsmulti
. So right now in the Power Automate UI you can only specify a single constituent code filter (but note that otherarray
query parameters on that operation do supportcsv
so you can provide comma-separated values in the UI). In order to make it more obvious which parameters supportcsv
, we recently updated the hint text in the connector to be of the form "Represents a comma-separated list of...".
Right now we don't have plans to change the connector definition because it would require a change to the underlying API. But we'll keep a pulse on this, and if that stance changes in the future we'll let you know.
In the meantime, in addition to the workaround you mentioned of creating a list that itself is pre-filtered you could also use multiple actions within the flow (where each action provides a different constituent code for the filter). and then process the aggregated results (note that you may need to account for duplicates if a constituent has multiple constituent codes). Using a pre-filtered list is preferred if possible because you can avoid multiple calls from the flow and push that filtering/de-duplication work to the Blackbaud server instead. But if you need to dynamically specify multiple constituent codes to filter, you'll have to use multiple actions in your flow.
(btw - we are aware of a bug in the OpenApi being emitted by our developer portal where array parameters are being reported astype: string
instead oftype: array
withcollectionFormat
details - the docs are correct though)
I hope this helps - please let us know if you have any questions, and thanks for the feedback!2 -
Thanks Ben Lambert, for taking the time to fill in the background. Very helpful information, and it also made me realize that I had misunderstood the API functionality. I thought it would return only the records that had ALL of the constituent codes I passed, but I see now that it returns the records with ANY of the constituent codes passed. So building a list of records that have two specific codes is always going to involve two calls - whether you're using the BB connector in Automate or using the API directly.
In Automate, the relevant expression would be intersection(), which takes multiple collections and returns the items that appear in all of them. So that's a good option to have for instances where I need to do this dynamically.
Thanks again for the clarification.2
Categories
- All Categories
- 2 Blackbaud Community Help
- High Education Program Advisory Group (HE PAG)
- BBCRM PAG Discussions
- Luminate CRM DC Users Group
- DC Luminate CRM Users Group
- Luminate PAG
- 186 bbcon®
- 1.4K Blackbaud Altru®
- 389 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 14 donorCentrics®
- 355 Blackbaud eTapestry®
- 2.4K Blackbaud Financial Edge NXT®
- 616 Blackbaud Grantmaking™
- 542 Blackbaud Education Management Solutions for Higher Education
- 3.1K Blackbaud Education Management Solutions for K-12 Schools
- 909 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 207 JustGiving® from Blackbaud®
- 6.2K Blackbaud Raiser's Edge NXT®
- 3.5K SKY Developer
- 236 ResearchPoint™
- 116 Blackbaud Tuition Management™
- 160 Organizational Best Practices
- 232 The Tap (Just for Fun)
- 30 Blackbaud Community Challenges
- Blackbaud Consultant’s Community
- 18 PowerUp Challenges
- 3 Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 Raiser's Edge NXT PowerUp Challenge: Events
- 3 Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 Raiser's Edge NXT PowerUp Challenge #1 (Query)
- 71 Blackbaud Community All-Stars Discussions
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 743 Community News
- 2.8K Jobs Board
- Community Help Blogs
- 52 Blackbaud SKY® Reporting Announcements
- Blackbaud Consultant’s Community
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
- Blackbaud Francophone Group
- Blackbaud Community™ Discussions
- Blackbaud Francophone Group