Chilkat Online Tools

delphiDll / Salesforce Platform APIs / Create Commitments

Back to Collection Items

var
http: HCkHttp;
success: Boolean;
json: HCkJsonObject;
resp: HCkHttpResponse;
sbResponseBody: HCkStringBuilder;
jResp: HCkJsonObject;
respStatusCode: Integer;
success: Boolean;
Href: PWideChar;
Id: PWideChar;
GiftcommitmentscheduleHref: PWideChar;
GiftcommitmentscheduleId: PWideChar;
GifttransactionHref: PWideChar;
GifttransactionId: PWideChar;
PaymentinstrumentHref: PWideChar;
PaymentinstrumentId: PWideChar;
AccountHref: PWideChar;
AccountId: PWideChar;
j: Integer;
count_j: Integer;
href: PWideChar;
id: PWideChar;
successes: Integer;
failures: Integer;
notProcessed: Integer;
i: Integer;
count_i: Integer;

begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

http := CkHttp_Create();

// Use this online tool to generate code from sample JSON: Generate Code to Create JSON

// The following JSON is sent in the request body.

// {
//   "processingOptions": {
//     "donorOptions": {
//       "defaultUpdateLogic": "update_all"
//     }
//   },
//   "commitments": [
//     {
//       "amount": 150.25,
//       "currencyIsoCode": "USD",
//       "transactionPeriod": "monthly",
//       "transactionInterval": 3,
//       "transactionDay": "5",
//       "startDate": "2024-07-06",
//       "endDate": "2024-08-06",
//       "campaign": {
//         "id": "<SFDC_CAMPAIGN_ID>"
//       },
//       "outreachSourceCode": {
//         "id": "<SFDC_OUTREACH_SOURCE_CODE_ID>",
//         "sourceCode": "AnimalEmailCampaign2023"
//       },
//       "donor": {
//         "donorType": "individual",
//         "id": "<SFDC_ACCOUNT_ID>",
//         "firstName": "Test",
//         "lastName": "Donor",
//         "phone": "510-434-8920",
//         "email": "test.donor@salesforce.com",
//         "address": [
//           {
//             "addressType": "mailing",
//             "street": "123 Main Street",
//             "city": "Oakland",
//             "state": "CA",
//             "postalCode": "94610",
//             "country": "US"
//           }
//         ],
//         "accountCustomFields": [
//           {
//             "fieldName": "<VALID_CUSTOM_FIELD_API_NAME>",
//             "fieldValue": "string"
//           }
//         ]
//       },
//       "paymentInstrument": {
//         "type": "credit card",
//         "accountHolderName": "test donor",
//         "expiryMonth": "10",
//         "expiryYear": "2026",
//         "last4": "4585",
//         "cardBrand": "visa",
//         "bankName": "chase",
//         "digitalWalletProvider": "apple pay",
//         "bankAccountHolderType": "primary",
//         "bankAccountType": "checking",
//         "bankAccountNumber": "123456",
//         "bankCode": "HBUK",
//         "gatewayName": "stripe",
//         "processorName": "test processor",
//         "processorPaymentReference": "string",
//         "gatewayReference": "string"
//       },
//       "designations": [
//         {
//           "designationId": "<SFDC_GIFT_DESIGNATION_ID>",
//           "percent": 10
//         }
//       ],
//       "firstTransaction": {
//         "amount": 150.25,
//         "receivedDate": "2024-07-06",
//         "donorCoverAmount": 0.25,
//         "transactionStatus": "Unpaid",
//         "gatewayTransactionFee": 0.75,
//         "processorTransactionFee": 0.45,
//         "processorReference": "cls-1247586928747",
//         "gatewayReference": "102656693ac3ca6e0cdafbfe89ab99",
//         "lastGatewayResponseCode": "invalid_cvc",
//         "lastGatewayErrorMessage": "The card’s security code is invalid. Check the card’s security code or use a different card.",
//         "lastGatewayProcessedDateTime": "2023-07-06T21:57:51Z"
//       },
//       "giftCommitmentCustomFields": [
//         {
//           "fieldName": "<VALID_CUSTOM_FIELD_API_NAME>",
//           "fieldValue": "string"
//         }
//       ],
//       "giftCommitmentScheduleCustomFields": [
//         {
//           "fieldName": "<VALID_CUSTOM_FIELD_API_NAME>",
//           "fieldValue": "string"
//         }
//       ]
//     }
//   ]
// }

json := CkJsonObject_Create();
CkJsonObject_UpdateString(json,'processingOptions.donorOptions.defaultUpdateLogic','update_all');
CkJsonObject_UpdateNumber(json,'commitments[0].amount','150.25');
CkJsonObject_UpdateString(json,'commitments[0].currencyIsoCode','USD');
CkJsonObject_UpdateString(json,'commitments[0].transactionPeriod','monthly');
CkJsonObject_UpdateInt(json,'commitments[0].transactionInterval',3);
CkJsonObject_UpdateString(json,'commitments[0].transactionDay','5');
CkJsonObject_UpdateString(json,'commitments[0].startDate','2024-07-06');
CkJsonObject_UpdateString(json,'commitments[0].endDate','2024-08-06');
CkJsonObject_UpdateString(json,'commitments[0].campaign.id','<SFDC_CAMPAIGN_ID>');
CkJsonObject_UpdateString(json,'commitments[0].outreachSourceCode.id','<SFDC_OUTREACH_SOURCE_CODE_ID>');
CkJsonObject_UpdateString(json,'commitments[0].outreachSourceCode.sourceCode','AnimalEmailCampaign2023');
CkJsonObject_UpdateString(json,'commitments[0].donor.donorType','individual');
CkJsonObject_UpdateString(json,'commitments[0].donor.id','<SFDC_ACCOUNT_ID>');
CkJsonObject_UpdateString(json,'commitments[0].donor.firstName','Test');
CkJsonObject_UpdateString(json,'commitments[0].donor.lastName','Donor');
CkJsonObject_UpdateString(json,'commitments[0].donor.phone','510-434-8920');
CkJsonObject_UpdateString(json,'commitments[0].donor.email','test.donor@salesforce.com');
CkJsonObject_UpdateString(json,'commitments[0].donor.address[0].addressType','mailing');
CkJsonObject_UpdateString(json,'commitments[0].donor.address[0].street','123 Main Street');
CkJsonObject_UpdateString(json,'commitments[0].donor.address[0].city','Oakland');
CkJsonObject_UpdateString(json,'commitments[0].donor.address[0].state','CA');
CkJsonObject_UpdateString(json,'commitments[0].donor.address[0].postalCode','94610');
CkJsonObject_UpdateString(json,'commitments[0].donor.address[0].country','US');
CkJsonObject_UpdateString(json,'commitments[0].donor.accountCustomFields[0].fieldName','<VALID_CUSTOM_FIELD_API_NAME>');
CkJsonObject_UpdateString(json,'commitments[0].donor.accountCustomFields[0].fieldValue','string');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.type','credit card');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.accountHolderName','test donor');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.expiryMonth','10');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.expiryYear','2026');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.last4','4585');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.cardBrand','visa');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.bankName','chase');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.digitalWalletProvider','apple pay');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.bankAccountHolderType','primary');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.bankAccountType','checking');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.bankAccountNumber','123456');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.bankCode','HBUK');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.gatewayName','stripe');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.processorName','test processor');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.processorPaymentReference','string');
CkJsonObject_UpdateString(json,'commitments[0].paymentInstrument.gatewayReference','string');
CkJsonObject_UpdateString(json,'commitments[0].designations[0].designationId','<SFDC_GIFT_DESIGNATION_ID>');
CkJsonObject_UpdateInt(json,'commitments[0].designations[0].percent',10);
CkJsonObject_UpdateNumber(json,'commitments[0].firstTransaction.amount','150.25');
CkJsonObject_UpdateString(json,'commitments[0].firstTransaction.receivedDate','2024-07-06');
CkJsonObject_UpdateNumber(json,'commitments[0].firstTransaction.donorCoverAmount','0.25');
CkJsonObject_UpdateString(json,'commitments[0].firstTransaction.transactionStatus','Unpaid');
CkJsonObject_UpdateNumber(json,'commitments[0].firstTransaction.gatewayTransactionFee','0.75');
CkJsonObject_UpdateNumber(json,'commitments[0].firstTransaction.processorTransactionFee','0.45');
CkJsonObject_UpdateString(json,'commitments[0].firstTransaction.processorReference','cls-1247586928747');
CkJsonObject_UpdateString(json,'commitments[0].firstTransaction.gatewayReference','102656693ac3ca6e0cdafbfe89ab99');
CkJsonObject_UpdateString(json,'commitments[0].firstTransaction.lastGatewayResponseCode','invalid_cvc');
CkJsonObject_UpdateString(json,'commitments[0].firstTransaction.lastGatewayErrorMessage','The card’s security code is invalid. Check the card’s security code or use a different card.');
CkJsonObject_UpdateString(json,'commitments[0].firstTransaction.lastGatewayProcessedDateTime','2023-07-06T21:57:51Z');
CkJsonObject_UpdateString(json,'commitments[0].giftCommitmentCustomFields[0].fieldName','<VALID_CUSTOM_FIELD_API_NAME>');
CkJsonObject_UpdateString(json,'commitments[0].giftCommitmentCustomFields[0].fieldValue','string');
CkJsonObject_UpdateString(json,'commitments[0].giftCommitmentScheduleCustomFields[0].fieldName','<VALID_CUSTOM_FIELD_API_NAME>');
CkJsonObject_UpdateString(json,'commitments[0].giftCommitmentScheduleCustomFields[0].fieldValue','string');

// Adds the "Authorization: Bearer <access_token>" header.
CkHttp_putAuthToken(http,'<access_token>');

resp := CkHttp_PostJson3(http,'https://domain.com/services/data/v{{version}}/connect/fundraising/commitments','application/json',json);
if (CkHttp_getLastMethodSuccess(http) = False) then
  begin
    Memo1.Lines.Add(CkHttp__lastErrorText(http));
    Exit;
  end;

sbResponseBody := CkStringBuilder_Create();
CkHttpResponse_GetBodySb(resp,sbResponseBody);

jResp := CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,sbResponseBody);
CkJsonObject_putEmitCompact(jResp,False);

Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkJsonObject__emit(jResp));

respStatusCode := CkHttpResponse_getStatusCode(resp);
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkHttpResponse__header(resp));
    Memo1.Lines.Add('Failed.');
    CkHttpResponse_Dispose(resp);
    Exit;
  end;
CkHttpResponse_Dispose(resp);

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// {
//   "successes": 1,
//   "failures": 0,
//   "notProcessed": 0,
//   "details": [
//     {
//       "success": true,
//       "links": {
//         "giftcommitment": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>",
//           "id": "<SFDC_GIFT_COMMITMENT_ID>"
//         },
//         "giftcommitmentschedule": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>",
//           "id": "<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>"
//         },
//         "giftdefaultdesignation": [
//           {
//             "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_DEFAULT_DESIGNATION_ID>",
//             "id": "<SFDC_GIFT_DEFAULT_DESIGNATION_ID>"
//           }
//         ],
//         "gifttransaction": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_TRANSACTION_ID>",
//           "id": "<SFDC_GIFT_TRANSACTION_ID>"
//         },
//         "paymentinstrument": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>",
//           "id": "<SFDC_PAYMENT_INSTRUMENT_ID>"
//         },
//         "account": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_ACCOUNT_ID>",
//           "id": "<SFDC_ACCOUNT_ID>"
//         }
//       }
//     },
//     {
//       "success": true,
//       "links": {
//         "giftcommitment": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>",
//           "id": "<SFDC_GIFT_COMMITMENT_ID>"
//         },
//         "giftcommitmentschedule": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>",
//           "id": "<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>"
//         },
//         "giftdefaultdesignation": [
//           {
//             "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_DEFAULT_DESIGNATION_ID>",
//             "id": "<SFDC_GIFT_DEFAULT_DESIGNATION_ID>"
//           }
//         ],
//         "gifttransaction": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_TRANSACTION_ID>",
//           "id": "<SFDC_GIFT_TRANSACTION_ID>"
//         },
//         "paymentinstrument": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>",
//           "id": "<SFDC_PAYMENT_INSTRUMENT_ID>"
//         },
//         "account": {
//           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_ACCOUNT_ID>",
//           "id": "<SFDC_ACCOUNT_ID>"
//         }
//       }
//     }
//   ]
// }

// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

successes := CkJsonObject_IntOf(jResp,'successes');
failures := CkJsonObject_IntOf(jResp,'failures');
notProcessed := CkJsonObject_IntOf(jResp,'notProcessed');
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'details');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    success := CkJsonObject_BoolOf(jResp,'details[i].success');
    Href := CkJsonObject__stringOf(jResp,'details[i].links.giftcommitment.href');
    Id := CkJsonObject__stringOf(jResp,'details[i].links.giftcommitment.id');
    GiftcommitmentscheduleHref := CkJsonObject__stringOf(jResp,'details[i].links.giftcommitmentschedule.href');
    GiftcommitmentscheduleId := CkJsonObject__stringOf(jResp,'details[i].links.giftcommitmentschedule.id');
    GifttransactionHref := CkJsonObject__stringOf(jResp,'details[i].links.gifttransaction.href');
    GifttransactionId := CkJsonObject__stringOf(jResp,'details[i].links.gifttransaction.id');
    PaymentinstrumentHref := CkJsonObject__stringOf(jResp,'details[i].links.paymentinstrument.href');
    PaymentinstrumentId := CkJsonObject__stringOf(jResp,'details[i].links.paymentinstrument.id');
    AccountHref := CkJsonObject__stringOf(jResp,'details[i].links.account.href');
    AccountId := CkJsonObject__stringOf(jResp,'details[i].links.account.id');
    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'details[i].links.giftdefaultdesignation');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        href := CkJsonObject__stringOf(jResp,'details[i].links.giftdefaultdesignation[j].href');
        id := CkJsonObject__stringOf(jResp,'details[i].links.giftdefaultdesignation[j].id');
        j := j + 1;
      end;

    i := i + 1;
  end;

CkHttp_Dispose(http);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-d '{
  "processingOptions": {
    "donorOptions": {
      "defaultUpdateLogic": "update_all"
    }
  },
  "commitments": [
    {
      "amount": 150.25,
      "currencyIsoCode": "USD",
      "transactionPeriod": "monthly",
      "transactionInterval": 3,
      "transactionDay": "5",
      "startDate": "2024-07-06",
      "endDate": "2024-08-06",
      "campaign": {
        "id": "<SFDC_CAMPAIGN_ID>"
      },
      "outreachSourceCode": {
        "id": "<SFDC_OUTREACH_SOURCE_CODE_ID>",
        "sourceCode": "AnimalEmailCampaign2023"
      },
      "donor": {
        "donorType": "individual",
        "id": "<SFDC_ACCOUNT_ID>",
        "firstName": "Test",
        "lastName": "Donor",
        "phone": "510-434-8920",
        "email": "test.donor@salesforce.com",
        "address": [
          {
            "addressType": "mailing",
            "street": "123 Main Street",
            "city": "Oakland",
            "state": "CA",
            "postalCode": "94610",
            "country": "US"
          }
        ],
        "accountCustomFields": [
          {
            "fieldName": "<VALID_CUSTOM_FIELD_API_NAME>",
            "fieldValue": "string"
          }
        ]
      },
      "paymentInstrument": {
        "type": "credit card",
        "accountHolderName": "test donor",
        "expiryMonth": "10",
        "expiryYear": "2026",
        "last4": "4585",
        "cardBrand": "visa",
        "bankName": "chase",
        "digitalWalletProvider": "apple pay",
        "bankAccountHolderType": "primary",
        "bankAccountType": "checking",
        "bankAccountNumber": "123456",
        "bankCode": "HBUK",
        "gatewayName": "stripe",
        "processorName": "test processor",
        "processorPaymentReference": "string",
        "gatewayReference": "string"
      },
      "designations": [
        {
          "designationId": "<SFDC_GIFT_DESIGNATION_ID>",
          "percent": 10
        }
      ],
      "firstTransaction": {
        "amount": 150.25,
        "receivedDate": "2024-07-06",
        "donorCoverAmount": 0.25,
        "transactionStatus": "Unpaid",
        "gatewayTransactionFee": 0.75,
        "processorTransactionFee": 0.45,
        "processorReference": "cls-1247586928747",
        "gatewayReference": "102656693ac3ca6e0cdafbfe89ab99",
        "lastGatewayResponseCode": "invalid_cvc",
        "lastGatewayErrorMessage": "The card’s security code is invalid. Check the card’s security code or use a different card.",
        "lastGatewayProcessedDateTime": "2023-07-06T21:57:51Z"
      },
      "giftCommitmentCustomFields": [
        {
          "fieldName": "<VALID_CUSTOM_FIELD_API_NAME>",
          "fieldValue": "string"
        }
      ],
      "giftCommitmentScheduleCustomFields": [
        {
          "fieldName": "<VALID_CUSTOM_FIELD_API_NAME>",
          "fieldValue": "string"
        }
      ]
    }
  ]
}'
https://domain.com/services/data/v{{version}}/connect/fundraising/commitments

Postman Collection Item JSON

{
  "name": "Create Commitments",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"processingOptions\": {\n    \"donorOptions\": {\n      \"defaultUpdateLogic\": \"update_all\"\n    }\n  },\n  \"commitments\": [\n    {\n      \"amount\": 150.25,\n      \"currencyIsoCode\": \"USD\",\n      \"transactionPeriod\": \"monthly\",\n      \"transactionInterval\": 3,\n      \"transactionDay\": \"5\",\n      \"startDate\": \"2024-07-06\",\n      \"endDate\": \"2024-08-06\",\n      \"campaign\": {\n        \"id\": \"<SFDC_CAMPAIGN_ID>\"\n      },\n      \"outreachSourceCode\": {\n        \"id\": \"<SFDC_OUTREACH_SOURCE_CODE_ID>\",\n        \"sourceCode\": \"AnimalEmailCampaign2023\"\n      },\n      \"donor\": {\n        \"donorType\": \"individual\",\n        \"id\": \"<SFDC_ACCOUNT_ID>\",\n        \"firstName\": \"Test\",\n        \"lastName\": \"Donor\",\n        \"phone\": \"510-434-8920\",\n        \"email\": \"test.donor@salesforce.com\",\n        \"address\": [\n          {\n            \"addressType\": \"mailing\",\n            \"street\": \"123 Main Street\",\n            \"city\": \"Oakland\",\n            \"state\": \"CA\",\n            \"postalCode\": \"94610\",\n            \"country\": \"US\"\n          }\n        ],\n        \"accountCustomFields\": [\n          {\n            \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n            \"fieldValue\": \"string\"\n          }\n        ]\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      },\n      \"designations\": [\n        {\n          \"designationId\": \"<SFDC_GIFT_DESIGNATION_ID>\",\n          \"percent\": 10\n        }\n      ],\n      \"firstTransaction\": {\n        \"amount\": 150.25,\n        \"receivedDate\": \"2024-07-06\",\n        \"donorCoverAmount\": 0.25,\n        \"transactionStatus\": \"Unpaid\",\n        \"gatewayTransactionFee\": 0.75,\n        \"processorTransactionFee\": 0.45,\n        \"processorReference\": \"cls-1247586928747\",\n        \"gatewayReference\": \"102656693ac3ca6e0cdafbfe89ab99\",\n        \"lastGatewayResponseCode\": \"invalid_cvc\",\n        \"lastGatewayErrorMessage\": \"The card’s security code is invalid. Check the card’s security code or use a different card.\",\n        \"lastGatewayProcessedDateTime\": \"2023-07-06T21:57:51Z\"\n      },\n      \"giftCommitmentCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ],\n      \"giftCommitmentScheduleCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ]\n    }\n  ]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "connect",
        "fundraising",
        "commitments"
      ]
    },
    "description": "Create gift transactions with related new or matched donors, optional transaction designations, and payment instrument metadata. Supports custom fields for the donor account and gift transaction.\n\n## Required Attributes:\n\n- commitments.amount\n    \n- commitments.transactionPeriod\n    \n- commitments.startDate\n    \n- donor.donorType (\"individual\" or \"organization\")\n    \n- donor.lastName\n    \n- donor.organization\n    \n- paymentinstrument.type\n    \n\nAll other attributes are optional can be left as an empty string or just removed from the request body entirely. The only exceptions to this are:\n\n- CustomFields collections - These cannot be left in the request body as an empty collection or wit an empty string for the FieldName.\n    \n\n### Validated Property Formats (an empty string is considered valid)\n\n- DateTime - YYYY-MM-DDTHH:MM:SSZ\n- Date - YYYY-MM-DD\n- Email - a valid formatted email address\n    \n\n#### Other Attributes\n\n- OutreachSource -- This is optional. Be sure to create the OutreachSourceCode record in the system if passing a value\n- Will accept **either** an OutreachSourceCode.id (SalesforceId) or an OutreachSourceCode.Code.\n    \n\n#### Custom fields\n\n- The field_value can be a text string (inc. for a date data-type) or a numeric value (without quotes)\n- Do not include an empty collection or an empty fieldName in the request body"
  },
  "response": [
    {
      "name": "Status201-CreateCommitmentSuccess",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"processingOptions\": {\n    \"donorOptions\": {\n      \"defaultUpdateLogic\": \"update_all\"\n    }\n  },\n  \"commitments\": [\n    {\n      \"amount\": 150.25,\n      \"currencyIsoCode\": \"USD\",\n      \"transactionPeriod\": \"monthly\",\n      \"transactionInterval\": 3,\n      \"transactionDay\": \"5\",\n      \"startDate\": \"2024-07-06\",\n      \"endDate\": \"2024-08-06\",\n      \"campaign\": {\n        \"id\": \"<SFDC_CAMPAIGN_ID>\"\n      },\n      \"outreachSourceCode\": {\n        \"id\": \"<SFDC_OUTREACH_SOURCE_CODE_ID>\",\n        \"sourceCode\": \"AnimalEmailCampaign2023\"\n      },\n      \"donor\": {\n        \"donorType\": \"individual\",\n        \"id\": \"<SFDC_ACCOUNT_ID>\",\n        \"firstName\": \"Test\",\n        \"lastName\": \"Donor\",\n        \"phone\": \"510-434-8920\",\n        \"email\": \"test.donor@salesforce.com\",\n        \"address\": [\n          {\n            \"addressType\": \"mailing\",\n            \"street\": \"123 Main Street\",\n            \"city\": \"Oakland\",\n            \"state\": \"CA\",\n            \"postalCode\": \"94610\",\n            \"country\": \"US\"\n          }\n        ],\n        \"accountCustomFields\": [\n          {\n            \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n            \"fieldValue\": \"string\"\n          }\n        ]\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      },\n      \"designations\": [\n        {\n          \"designationId\": \"<SFDC_GIFT_DESIGNATION_ID>\",\n          \"percent\": 10\n        }\n      ],\n      \"firstTransaction\": {\n        \"amount\": 150.25,\n        \"receivedDate\": \"2024-07-06\",\n        \"donorCoverAmount\": 0.25,\n        \"transactionStatus\": \"Unpaid\",\n        \"gatewayTransactionFee\": 0.75,\n        \"processorTransactionFee\": 0.45,\n        \"processorReference\": \"cls-1247586928747\",\n        \"gatewayReference\": \"102656693ac3ca6e0cdafbfe89ab99\",\n        \"lastGatewayResponseCode\": \"invalid_cvc\",\n        \"lastGatewayErrorMessage\": \"The card’s security code is invalid. Check the card’s security code or use a different card.\",\n        \"lastGatewayProcessedDateTime\": \"2023-07-06T21:57:51Z\"\n      },\n      \"giftCommitmentCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ],\n      \"giftCommitmentScheduleCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ]\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"successes\": 1,\n    \"failures\": 0,\n    \"notProcessed\": 0,\n    \"details\": [\n        {\n            \"success\": true,\n            \"links\": {\n                \"giftcommitment\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n                    \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n                },\n                \"giftcommitmentschedule\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>\",\n                    \"id\": \"<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>\"\n                },\n                \"giftdefaultdesignation\": [\n                    {\n                        \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_DEFAULT_DESIGNATION_ID>\",\n                        \"id\": \"<SFDC_GIFT_DEFAULT_DESIGNATION_ID>\"\n                    }\n                ],\n                \"gifttransaction\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_TRANSACTION_ID>\",\n                    \"id\": \"<SFDC_GIFT_TRANSACTION_ID>\"\n                },\n                \"paymentinstrument\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n                    \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n                },\n                \"account\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_ACCOUNT_ID>\",\n                    \"id\": \"<SFDC_ACCOUNT_ID>\"\n                }\n            }\n        },\n        {\n            \"success\": true,\n            \"links\": {\n                \"giftcommitment\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n                    \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n                },\n                \"giftcommitmentschedule\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>\",\n                    \"id\": \"<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>\"\n                },\n                \"giftdefaultdesignation\": [\n                    {\n                        \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_DEFAULT_DESIGNATION_ID>\",\n                        \"id\": \"<SFDC_GIFT_DEFAULT_DESIGNATION_ID>\"\n                    }\n                ],\n                \"gifttransaction\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_TRANSACTION_ID>\",\n                    \"id\": \"<SFDC_GIFT_TRANSACTION_ID>\"\n                },\n                \"paymentinstrument\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n                    \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n                },\n                \"account\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_ACCOUNT_ID>\",\n                    \"id\": \"<SFDC_ACCOUNT_ID>\"\n                }\n            }\n        }\n    ]\n}"
    },
    {
      "name": "Status201-CreateCommitmentRequestValidationFailure",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"processingOptions\": {\n    \"donorOptions\": {\n      \"defaultUpdateLogic\": \"update_all\"\n    }\n  },\n  \"commitments\": [\n    {\n      \"amount\": 150.25,\n      \"currencyIsoCode\": \"USD\",\n      \"transactionPeriod\": \"monthly\",\n      \"transactionInterval\": 3,\n      \"transactionDay\": \"5\",\n      \"startDate\": \"2024-07-06\",\n      \"endDate\": \"2024-08-06\",\n      \"outreachSourceCode\": {\n        \"id\": \"INVALID SOURCE CODE ID\"\n      },\n      \"donor\": {\n        \"donorType\": \"individual\",\n        \"id\": \"<SFDC_ACCOUNT_ID>\",\n        \"organizationName\": \"test organization\",\n        \"firstName\": \"Test\",\n        \"lastName\": \"Donor\",\n        \"phone\": \"510-434-8920\",\n        \"email\": \"test.donor@salesforce.com\",\n        \"address\": [\n          {\n            \"addressType\": \"mailing\",\n            \"street\": \"123 Main Street\",\n            \"city\": \"Oakland\",\n            \"state\": \"CA\",\n            \"postalCode\": \"94610\",\n            \"country\": \"US\"\n          }\n        ],\n        \"accountCustomFields\": [\n          {\n            \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n            \"fieldValue\": \"string\"\n          }\n        ]\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      },\n      \"designations\": [\n        {\n          \"designationId\": \"<SFDC_GIFT_DESIGNATION_ID>\",\n          \"percent\": 10\n        }\n      ],\n      \"firstTransaction\": {\n        \"amount\": 150.25,\n        \"receivedDate\": \"2024-07-06\",\n        \"donorCoverAmount\": 0.25,\n        \"transactionStatus\": \"Unpaid\",\n        \"gatewayTransactionFee\": 0.75,\n        \"processorTransactionFee\": 0.45,\n        \"processorReference\": \"cls-1247586928747\",\n        \"gatewayReference\": \"102656693ac3ca6e0cdafbfe89ab99\",\n        \"lastGatewayResponseCode\": \"invalid_cvc\",\n        \"lastGatewayErrorMessage\": \"The card’s security code is invalid. Check the card’s security code or use a different card.\",\n        \"lastGatewayProcessedDateTime\": \"2023-07-06T21:57:51Z\"\n      },\n      \"giftCommitmentCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ],\n      \"giftCommitmentScheduleCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ]\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"successes\": 0,\n    \"failures\": 1,\n    \"notProcessed\": 0,\n    \"details\": [\n        {\n            \"success\": false,\n            \"errors\": {\n                \"field\": \"outreachSourceCode.id\",\n                \"message\": \"<invalid id message>\"\n            }\n        }\n    ]\n}"
    },
    {
      "name": "Status201-CreateCommitmentDatabaseFailure",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"processingOptions\": {\n    \"donorOptions\": {\n      \"defaultUpdateLogic\": \"update_all\"\n    }\n  },\n  \"commitments\": [\n    {\n      \"amount\": 5.00,\n      \"currencyIsoCode\": \"USD\",\n      \"transactionPeriod\": \"monthly\",\n      \"transactionInterval\": 3,\n      \"transactionDay\": \"5\",\n      \"startDate\": \"2024-07-06\",\n      \"endDate\": \"2024-08-06\",\n      \"outreachSourceCode\": {\n        \"id\": \"<SFDC_OUTREACH_SOURCE_CODE_ID>\"\n      },\n      \"donor\": {\n        \"donorType\": \"individual\",\n        \"id\": \"<SFDC_ACCOUNT_ID>\",\n        \"firstName\": \"Test\",\n        \"lastName\": \"Donor\",\n        \"phone\": \"510-434-8920\",\n        \"email\": \"test.donor@salesforce.com\",\n        \"address\": [\n          {\n            \"addressType\": \"mailing\",\n            \"street\": \"123 Main Street\",\n            \"city\": \"Oakland\",\n            \"state\": \"CA\",\n            \"postalCode\": \"94610\",\n            \"country\": \"US\"\n          }\n        ],\n        \"accountCustomFields\": [\n          {\n            \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n            \"fieldValue\": \"string\"\n          }\n        ]\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      },\n      \"designations\": [\n        {\n          \"designationId\": \"<SFDC_GIFT_DESIGNATION_ID>\",\n          \"percent\": 10\n        }\n      ],\n      \"firstTransaction\": {\n        \"amount\": 150.25,\n        \"receivedDate\": \"2024-07-06\",\n        \"donorCoverAmount\": 0.25,\n        \"transactionStatus\": \"Unpaid\",\n        \"gatewayTransactionFee\": 0.75,\n        \"processorTransactionFee\": 0.45,\n        \"processorReference\": \"cls-1247586928747\",\n        \"gatewayReference\": \"102656693ac3ca6e0cdafbfe89ab99\",\n        \"lastGatewayResponseCode\": \"invalid_cvc\",\n        \"lastGatewayErrorMessage\": \"The card’s security code is invalid. Check the card’s security code or use a different card.\",\n        \"lastGatewayProcessedDateTime\": \"2023-07-06T21:57:51Z\"\n      },\n      \"giftCommitmentCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ],\n      \"giftCommitmentScheduleCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ]\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "// This is a scenario where there is a validation rule on the Gift Commitment Schedule object requiring the amount to be greater than 10.00. One database error occurs for the 5.00 commitment, causing the other two to be rolled back with success of false and no record links.\n{\n    \"successes\": 0,\n    \"failures\": 2,\n    \"notProcessed\": 1,\n    \"details\": [\n        {\n            \"success\": false,\n            \"errors\": {\n                \"message\": \"Amount must be greater than 10.00\"\n            }\n        }\n    ]\n}"
    },
    {
      "name": "Status201-CreateCommitmentSuccessWithExternalIds",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"processingOptions\": {\n    \"donorOptions\": {\n      \"defaultUpdateLogic\": \"update_all\"\n    }\n  },\n  \"commitments\": [\n    {\n      \"amount\": 2500,\n      \"currencyIsoCode\": \"USD\",\n      \"transactionPeriod\": \"monthly\",\n      \"transactionInterval\": 3,\n      \"transactionDay\": \"5\",\n      \"startDate\": \"2024-07-06\",\n      \"endDate\": \"2024-08-06\",\n      \"campaign\": {\n        \"externalId\": {\n            \"fieldName\": \"<EXTERNAL_ID_FIELD_NAME>\",\n            \"fieldValue\": \"<EXTERNAL_ID_FIELD_VALUE>\"\n        }\n      },\n      \"outreachSourceCode\": {\n        \"id\": \"<SFDC_OUTREACH_SOURCE_CODE_ID>\",\n        \"sourceCode\": \"AnimalEmailCampaign2023\"\n      },\n      \"donor\": {\n        \"donorType\": \"individual\",\n        \"externalId\": {\n            \"fieldName\": \"<EXTERNAL_ID_FIELD_NAME>\",\n            \"fieldValue\": \"<EXTERNAL_ID_FIELD_VALUE>\"\n        },\n        \"firstName\": \"Luke\",\n        \"lastName\": \"Smith\",\n        \"phone\": \"510-434-8920\",\n        \"email\": \"l.smith@example.com\",\n        \"address\": [\n          {\n            \"addressType\": \"mailing\",\n            \"street\": \"123 Main Street\",\n            \"city\": \"Oakland\",\n            \"state\": \"CA\",\n            \"postalCode\": \"94610\",\n            \"country\": \"US\"\n          }\n        ],\n        \"accountCustomFields\": [\n          {\n            \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n            \"fieldValue\": \"string\"\n          }\n        ]\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"david chavez\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      },\n      \"designations\": [\n        {\n          \"externalId\": {\n            \"fieldName\": \"<EXTERNAL_ID_FIELD_NAME>\",\n            \"fieldValue\": \"<EXTERNAL_ID_FIELD_VALUE>\"\n        },\n          \"percent\": 10\n        }\n      ],\n      \"firstTransaction\": {\n        \"amount\": 150.25,\n        \"receivedDate\": \"2024-07-06\",\n        \"donorCoverAmount\": 0.25,\n        \"transactionStatus\": \"Unpaid\",\n        \"gatewayTransactionFee\": 0.75,\n        \"processorTransactionFee\": 0.45,\n        \"processorReference\": \"cls-1247586928747\",\n        \"gatewayReference\": \"102656693ac3ca6e0cdafbfe89ab99\",\n        \"lastGatewayResponseCode\": \"invalid_cvc\",\n        \"lastGatewayErrorMessage\": \"The card’s security code is invalid. Check the card’s security code or use a different card.\",\n        \"lastGatewayProcessedDateTime\": \"2023-07-06T21:57:51Z\"\n      },\n      \"giftCommitmentCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ],\n      \"giftCommitmentScheduleCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ]\n    },\n    {\n      \"amount\": 150.25,\n      \"currencyIsoCode\": \"USD\",\n      \"transactionPeriod\": \"monthly\",\n      \"transactionInterval\": 3,\n      \"transactionDay\": \"5\",\n      \"startDate\": \"2024-07-06\",\n      \"endDate\": \"2024-08-06\",\n      \"campaign\": {\n        \"id\": \"<SFDC_CAMPAIGN_ID>\"\n      },\n      \"outreachSourceCode\": {\n        \"id\": \"<SFDC_OUTREACH_SOURCE_CODE_ID>\",\n        \"sourceCode\": \"AnimalEmailCampaign2023\"\n      },\n      \"donor\": {\n        \"donorType\": \"individual\",\n        \"externalId\": {\n            \"fieldName\": \"<EXTERNAL_ID_FIELD_NAME>\",\n            \"fieldValue\": \"<EXTERNAL_ID_FIELD_VALUE>\"\n        },\n        \"firstName\": \"David\",\n        \"lastName\": \"Chavez\",\n        \"phone\": \"510-434-8920\",\n        \"email\": \"d.chavez@example.com\",\n        \"address\": [\n          {\n            \"addressType\": \"mailing\",\n            \"street\": \"123 Main Street\",\n            \"city\": \"Oakland\",\n            \"state\": \"CA\",\n            \"postalCode\": \"94610\",\n            \"country\": \"US\"\n          }\n        ],\n        \"accountCustomFields\": [\n          {\n            \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n            \"fieldValue\": \"string\"\n          }\n        ]\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"david chavez\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      },\n      \"designations\": [\n        {\n          \"externalId\": {\n            \"fieldName\": \"<EXTERNAL_ID_FIELD_NAME>\",\n            \"fieldValue\": \"<EXTERNAL_ID_FIELD_VALUE>\"\n        },\n          \"percent\": 10\n        }\n      ],\n      \"firstTransaction\": {\n        \"amount\": 150.25,\n        \"receivedDate\": \"2024-07-06\",\n        \"donorCoverAmount\": 0.25,\n        \"transactionStatus\": \"Unpaid\",\n        \"gatewayTransactionFee\": 0.75,\n        \"processorTransactionFee\": 0.45,\n        \"processorReference\": \"cls-1247586928747\",\n        \"gatewayReference\": \"102656693ac3ca6e0cdafbfe89ab99\",\n        \"lastGatewayResponseCode\": \"invalid_cvc\",\n        \"lastGatewayErrorMessage\": \"The card’s security code is invalid. Check the card’s security code or use a different card.\",\n        \"lastGatewayProcessedDateTime\": \"2023-07-06T21:57:51Z\"\n      },\n      \"giftCommitmentCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ],\n      \"giftCommitmentScheduleCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ]\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments"
          ]
        }
      },
      "_postman_previewlanguage": null,
      "header": null,
      "cookie": [
      ],
      "body": "{\n    \"successes\": 2,\n    \"failures\": 0,\n    \"notProcessed\": 0,\n    \"details\": [\n        {\n            \"success\": true,\n            \"links\": {\n                \"giftcommitment\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n                    \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n                },\n                \"giftcommitmentschedule\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>\",\n                    \"id\": \"<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>\"\n                },\n                \"giftdefaultdesignation\": [\n                    {\n                        \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_DEFAULT_DESIGNATION_ID>\",\n                        \"id\": \"<SFDC_GIFT_DEFAULT_DESIGNATION_ID>\"\n                    }\n                ],\n                \"gifttransaction\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_TRANSACTION_ID>\",\n                    \"id\": \"<SFDC_GIFT_TRANSACTION_ID>\"\n                },\n                \"paymentinstrument\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n                    \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n                },\n                \"account\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_ACCOUNT_ID>\",\n                    \"id\": \"<SFDC_ACCOUNT_ID>\"\n                }\n            }\n        },\n        {\n            \"success\": true,\n            \"links\": {\n                \"giftcommitment\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n                    \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n                },\n                \"giftcommitmentschedule\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>\",\n                    \"id\": \"<SFDC_GIFT_COMMITMENT_SCHEDULE_ID>\"\n                },\n                \"giftdefaultdesignation\": [\n                    {\n                        \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_DEFAULT_DESIGNATION_ID>\",\n                        \"id\": \"<SFDC_GIFT_DEFAULT_DESIGNATION_ID>\"\n                    }\n                ],\n                \"gifttransaction\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_TRANSACTION_ID>\",\n                    \"id\": \"<SFDC_GIFT_TRANSACTION_ID>\"\n                },\n                \"paymentinstrument\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n                    \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n                },\n                \"account\": {\n                    \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_ACCOUNT_ID>\",\n                    \"id\": \"<SFDC_ACCOUNT_ID>\"\n                }\n            }\n        }\n    ]\n}"
    },
    {
      "name": "Status400-BadRequestError",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"processingOptions\": {\n    \"donorOptions\": {\n      \"defaultUpdateLogic\": \"update_all\"\n    }\n  },\n  \"commitments\": [\n    {\n      \"amount\": 150.25,\n      \"currencyIsoCode\": \"USD\",\n      \"transactionPeriod\": \"monthly\",\n      \"transactionInterval\": 3,\n      \"transactionDay\": \"5\",\n      \"startDate\": \"2024-07-06\",\n      \"endDate\": \"2024-08-06\",\n      \"campaign\": {\n        \"id\": \"<SFDC_CAMPAIGN_ID>\"\n      },\n      \"outreachSourceCode\": {\n        \"id\": \"<SFDC_OUTREACH_SOURCE_CODE_ID>\",\n        \"sourceCode\": \"AnimalEmailCampaign2023\"\n      },\n      \"donor\": {\n        \"donorType\": \"individual\",\n        \"id\": \"<SFDC_ACCOUNT_ID>\",\n        \"firstName\": \"Test\",\n        \"lastName\": \"Donor\",\n        \"phone\": \"510-434-8920\",\n        \"email\": \"test.donor@salesforce.com\",\n        \"address\": [\n          {\n            \"addressType\": \"mailing\",\n            \"street\": \"123 Main Street\",\n            \"city\": \"Oakland\",\n            \"state\": \"CA\",\n            \"postalCode\": \"94610\",\n            \"country\": \"US\"\n          }\n        ],\n        \"accountCustomFields\": [\n          {\n            \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n            \"fieldValue\": \"string\"\n          }\n        ]\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      },\n      \"designations\": [\n        {\n          \"designationId\": \"<SFDC_GIFT_DESIGNATION_ID>\",\n          \"percent\": 10\n        }\n      ],\n      \"firstTransaction\": {\n        \"amount\": 150.25,\n        \"receivedDate\": \"2024-07-06\",\n        \"donorCoverAmount\": 0.25,\n        \"transactionStatus\": \"Unpaid\",\n        \"gatewayTransactionFee\": 0.75,\n        \"processorTransactionFee\": 0.45,\n        \"processorReference\": \"cls-1247586928747\",\n        \"gatewayReference\": \"102656693ac3ca6e0cdafbfe89ab99\",\n        \"lastGatewayResponseCode\": \"invalid_cvc\",\n        \"lastGatewayErrorMessage\": \"The card’s security code is invalid. Check the card’s security code or use a different card.\",\n        \"lastGatewayProcessedDateTime\": \"2023-07-06T21:57:51Z\"\n      },\n      \"giftCommitmentCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ],\n      \"giftCommitmentScheduleCustomFields\": [\n        {\n          \"fieldName\": \"<VALID_CUSTOM_FIELD_API_NAME>\",\n          \"fieldValue\": \"string\"\n        }\n      ]\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "    // Even if the JSON request is valid, this is an example of a 400 error code that will be returned if duplicate matching rules are not active. Any non 200 error code would have a similar response structure.\n    {\n        \"errorCode\": \"UNKNOWN_EXCEPTION\",\n        \"message\": \"Provide active duplicate matching rules on Account and Person Account for donor matching. -- industries.fundraisingops.connect.impl.validator.ValidatorUtil.validateMatchingMethod(ValidatorUtil.java:103)\"\n    }"
    }
  ]
}