Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

NfP365 CRM API is a module for developers to integrate Drupal with NfP 365 CRM — Microsoft Dynamics 365 designed for the Non-for-Profit sector.

It provides connectivity to the following APIs offered by Mhance (a Microsoft Solutions Partner):

  • WebAPI
  • OpenAPI

Each API includes resources such as Donations, Orders, Campaigns, etc.

Setup

After installing the module, you must provide credentials for both the OpenAPI and WebAPI.

Go to: /admin/config/services/nfp365-crm-api and enter the required credentials.

Debug Mode

On the same configuration page (/admin/config/services/nfp365-crm-api), you can enable Debug Mode.

When Debug Mode is enabled, Drupal logs all requests and responses made using the API connection.

Examples

// Request via OpenApi client.
/* @var \Drupal\nfp365_crm_api\Http\OpenApiClient $openApi */
$openApi = \Drupal::service('nfp365_crm_api.manager')->getOpenApiClient();
$response = $openApi->paymentProcessors()->all();
foreach ($response->PaymentProcessors as $paymentProcessor) {
  // Process each payment processor.
}

// Request via WebApi client.
/* @var \Drupal\nfp365_crm_api\Http\WebApiClient $webApi */
$webApi = \Drupal::service('nfp365_crm_api.manager')->getWebApiClient();
$response = $webApi->campaigns()->all();
$campaigns = $response->getData();
foreach ($campaigns as $campaign) {
  // Process each campaign.
}

// Additional methods for $response are also available.
$response->getStatusCode();   // Returns HTTP status code (e.g., 200)
$response->getReasonPhrase(); // Returns HTTP reason phrase (e.g., 'OK')
// etc...

How to Add a New Resource

An example for OpenAPI:

  1. Create a class and place it in the /src/Resources/OpenAPI/ folder. You can find existing examples there for reference.
  2. Add a new method to the /src/Http/OpenApiClient.php file.

Activity

Total releases
3
First release
Dec 2024
Latest release
1 year ago
Release cadence
32 days
Stability
67% stable

Release Timeline

Releases

Version Type Release date
2.0.1 Stable Feb 12, 2025
2.0.0 Stable Jan 22, 2025
2.0.0-beta5 Pre-release Dec 10, 2024