Loading
Feature Degradation | Agentforce Voice Read More
Nonprofit Success Pack (NPSP) Managed Package
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Recurring Donations Schedules API

          Recurring Donations Schedules API

          Write Apex to access information about the Recurring Donation Schedule object using the Schedules API.

          The Recurring Donations Schedules API is intended to meet the needs of customers and partners who require visibility into the protected Recurring Donation Schedule object. The Schedules API returns all Schedules associated with a Recurring Donation, including current, past, and paused schedules.

          In addition to the Schedules API, we provide an Installments API which returns the projected installments generated from the schedules associated with the Recurring Donation.

          Call Format

          • Global Class implementing the API: npsp.Callable_API

          • Global Method: npsp.call()

          • Parameters: Map<String, Object>

          Name Datatype Required Description
          RecordIds string Yes Recurring Donation Id.

          JSON Response Format

          The JSON response format shows Schedule information listed by Recurring Donation Id.

          Name Datatype Required Description
          statusReason string No Additional details for the Schedule. For example, a paused reason for a paused schedule.
          startDate Date Yes The Schedule start date.
          scheduleId string Yes The Id of this Schedule record.
          recurringDonationId string Yes The Recurring Donation record this Schedule relates to.
          paymentMethod string No Payment method for this Schedule. For example, Check, Credit Card, ACH, etc.
          lastModifiedDate date Yes The date this Schedule was last modified.
          isPause boolean Yes Identifies a paused Schedule. Pauses are implemented with a Schedule which runs in parallel with other Schedules. Installments which fall between startDate and endDate inclusive of a paused Schedule are skipped.
          isCurrent boolean Yes Identifies a Schedule as currently running where startDate <= today and endDate is null or >= today.
          isActive boolean Yes Identifies a Schedule as currently running or is a future Schedule where: endDate is null or >= today. All Schedules where isActive == true are considered in the creation of upcoming installments.
          installmentPeriod string Yes Defines the installment schedule along with Installment Frequency. For example, if Installment Period is Monthly and Installment Frequency is 3, the schedule would be defined as "every 3 months".
          installmentFrequency integer Yes Defines the installment schedule along with Installment Period. For example, if Installment Period is Monthly and Installment Frequency is 3, the schedule would be defined as "every 3 months".
          installmentAmount integer Yes The amount for each installment Opportunity.
          endDate date No The Schedule end date.
          dayOfMonth string No Sets the specific day of the month for future installment Opportunities when the Installment Period is Monthly.
          currencyCode string Yes The currency ISO code for this Schedule. For example, USD.
          createdDate date Yes The date this Schedule record was created.
          campaignId string No The Campaign record this Schedule relates to.

          Code Sample and JSON Response

          In this example, we want to know Schedule information for two specific Recurring Donations.

          Code Sample

          Map <String, Object> callMap = new Map<String, Object>();
          
          callMap.put('RecordIds', new Set<Id>{'a092D000003Vp8pQAC','a092D000003V4ngQAC'});
          
          npsp.Callable_API apiTest = new npsp.Callable_API();
          String jsonResponse = String.valueOf(apiTest.call('rd2.queryschedules', callMap));
          

          JSON Reponse

          {
            "a092D000003Vp8pQAC": [
            {
              "statusReason": null,
              "startDate": "2020-11-04",
              "scheduleId": "a0n2D000001B1mFQAS",
              "recurringDonationId": "a092D000003Vp8pQAC",
              "paymentMethod": "Check",
              "lastModifiedDate": "2020-11-04T21:06:00.000Z",
              "isPause": false,
              "isCurrent": true,
              "isActive": true,
              "installmentPeriod": "Monthly",
              "installmentFrequency": 1,
              "installmentAmount": 100,
              "endDate": null,
              "dayOfMonth": "4",
              "currencyCode": "USD",
              "createdDate": "2020-11-04T21:06:00.000Z",
              "campaignId": null
            }
          ],
          "a092D000003V4ngQAC": [
            {
              "statusReason": null,
              "startDate": "2017-11-01",
              "scheduleId": "a0n2D000001B0AnQAK",
              "recurringDonationId": "a092D000003V4ngQAC",
              "paymentMethod": "Check",
              "lastModifiedDate": "2020-11-04T17:42:56.000Z",
              "isPause": false,
              "isCurrent": true,
              "isActive": true,
              "installmentPeriod": "Monthly",
              "installmentFrequency": 1,
              "installmentAmount": 100,
              "endDate": null,
              "dayOfMonth": "1",
              "currencyCode": "USD",
              "createdDate": "2020-11-03T00:09:31.000Z",
              "campaignId": null
            }
           ]
          }
          
           
          Loading
          Salesforce Help | Article