PROPOSAL FOR API NOTIFICATION OF PENDING DONATIONS

Proposal Summary

This proposal covers the scope of sending transaction details to the portal while converting and cancelling the pending donation record.

Requirement

  • The requirement includes sending Pending Donation details to the API portal while changing the status of Pending Donation record to “Converted”. The request body contains the following details.
	{
    “status”: Status of the Pending Donation record, 
    “donationId” : Internal Id of the Pending Donation record, 
    “donationAmount” : Amount of donation, 
    “referenceId” : Donor Portal reference Id in Pending Donation,
    “referenceNo” : The Document # field of the Pending Donation, 
    “employeeId” : The user who converts the ‘Pending Donation’ to ‘Incoming Fund’
   }
  • Also, the request body that sends to API portal when the status of Pending Donation record is changed to “Cancelled” contains the following data.
    {
     “status”: Status of the Pending Donation record, 
     “donationId” : Internal Id of the Pending Donation record, 
     “referenceId” : Donor Portal reference Id in Pending Donation, 
     “transactionDate” : The created date of Pending Donation,
     “employeeId” : The user who cancels Pending Donation. 
    }

Deliverables

  • Add a new functionality for sending a notification to the Portal through an API POST request.
  • The two API requests will be triggered on converting the Pending Donation to Incoming Fund or cancelling a Pending Donation.
  • The API request while converting the pending donation record will have the request body as shown.
   {
    “status”: Status of the Pending Donation record, 
    “donationId” : Internal Id of the Pending Donation record, 
    “donationAmount” : Amount of donation, 
    “referenceId” : Donor Portal reference Id in Pending Donation,
    “referenceNo” : The Document # field of the Pending Donation, 
    “employeeId” : The user who converts the ‘Pending Donation’ to ‘Incoming Fund’
   }
  • The API request while canceling the pending donation record will have the request body as shown.
    {
     “status”: Status of the Pending Donation record, 
     “donationId” : Internal Id of the Pending Donation record, 
     “referenceId” : Donor Portal reference Id in Pending Donation, 
     “transactionDate” : The created date of Pending Donation,
     “employeeId” : The user who cancels Pending Donation. 
    }
  • Each key in the request body will have an object with the following structure to show the value and text of the corresponding body field
  { 
   "value":””,
   "text":””
  }
For example, status :{ value: ”2”, text:”Converted”}
  • If more details need to be transferred apart from the above-mentioned request body, the request body needs to be dynamically adjusted. For that, transaction saved searches will be created for “Pending donation conversion” and “Pending donation cancellation” in NetSuite and add the required field in the saved search with required key for the API request body as label.

Assumptions

  • The function to create the payload to insert notification to DB should be handled from portal side and does not include in our scope
  • The correct Portal URL for posting the data, along with the API credentials and details on the request structure is provided from your side. 
  • If more body fields values are needed using the transaction search, the necessary key of the request body should be provided as custom label. Else, the standard field label will be taken as key.

Risks

  • The saved searches in NetSuite that are created for generating request body can only be used for fetching body field details. Line level details cannot be fetched because of duplication of body level due to multiple lines.
  • If criteria of the created saved searches are modified, it will affect the working flow. The results of the saved searches can be modified to add additional body fields.  

Leave a comment

Your email address will not be published. Required fields are marked *