Add a Gift to a Batch (Power Automate)

Hello:

I am attempting to add a gift to a batch in the Sky Developer Cohort environment. I am using the AddGiftToBatch connector in Power Automate. I keep getting an HTTP 400 Bad Request error. I have been attempting to debug this for several hours, and I am at a loss on what could possibly be wrong. Here is the JSON that the Connector is creating.

{

"host": {

"connectionReferenceName": "shared_blackbaudgifts",

"operationId": "AddGiftToBatch"

},

"parameters": {

"batch_id": "XXXXXX",

"body/gifts/constituent_id": "260",

"body/gifts/amount/value": 100,

"body/gifts/date": "2023-12-26T00:00:00Z",

"body/gifts/type": "Donation",

"body/gifts/gift_splits": [

{

"fund_id": "6",

"amount/value": 100,

"campaign_id": "3"

}

],

"body/gifts/payments/payment_method": "CreditCard",

"body/gifts/is_anonymous": true,

"body/gifts/subtype": "OnlineGiving",

"body/gifts/reference": "Gift Designation: Natural Disaster Relief Fund",

"body/gifts/post_status": "NotPosted",

"body/gifts/post_date": "2023-12-26T00:00:00Z",

"body/gifts/receipts/status": "NeedsReceipt",

"body/gifts/receipts/amount/value": 100,

"body/gifts/receipts/date": "2023-12-26T00:00:00Z"

}

}

-JW

Comments

  • @Jeremy Wrinkle
    i'm assuming you are getting the “json” from “peek code” on the action, try to screenshot the action directly.

    2nd is to make sure all “table” and “record” value is existing in the RE instance:
    Fund system record id of 6 exists
    Campaign system record id of 3 exists
    gift subtype of OnlineGiving exist

  • @Alex Wong

    Thank you for taking the time to respond. Attached is the screenshot of the relevant part of the flow.

    I have steps that verified that the campaign and fund exists. And the Online Giving was selected from the drop down menu.

    76b305333289bdab308f48e5970c1170-huge-sc
  • @Jeremy Wrinkle

    • your screenshot is somehow showing 2 Subtype=OnlineGiving, i'm going to assume it has to do with the way you screenshot as the Flow Action shouldn't have 2.
    • Is Constituency=Gift Designation: Natural Disaster Relief Fund a valid value? I'm going to assume yes, if it came from “drop down” selection, but if it's “typed” then you want to check if it's a valid gift constituency table entry.
    • Try using date only in the 3 dates (gift date, receipt date, post date): YYYY-MM-DD
    • basic stuff like
      • constituent id is a correct constituent system record id, not constituent lookup id
      • batch id is an active “not approved" batch
  • @Alex Wong

    I figured it out. After making the adjustments you suggested, I realized that I was putting the batch number in the Batch field. It requires the System Record ID for the batch.

    Thank you for your help and have a Happy New Year.

  • @Jeremy Wrinkle
    Glad you figure it out.

    The Batch field if you select from drop down.. then it should be the name of the batch that comes up (only not yet approved batch) and shown with the name of the batch, however, “underlyingly” flow has the system record id that is what get passed into the API call in the end. However, if you are “entering” a value yourselves, then it needs to be the batch system record id.

Categories