crm_membership
CRM Membership provides a flexible framework for managing memberships
in Drupal. It allows for the creation and management of different types of
memberships with configurable terms, durations, and renewal logic.
The module is part of the Drupal CRM ecosystem, providing a foundation for building complex membership management systems with custom business logic.
Key Features
Contact-based Memberships
Memberships are tied to CRM Contact entities.
Flexible Term Management
Different term calculation strategies via plugins.
Lifecycle Events
Activation, renewal, expiration, and cancellation workflows.
Extensible Architecture
Designed for customization through plugins and event subscribers.
Architecture
This module is built on a flexible, plugin-based architecture centered around membership lifecycle management. See the developer docs link in the sidebar for details.
The key components include:
Entities
Membership Entity
The primary content entity representing a membership record, linking Contact entities to a target Contact entity where they are considered a member of.
Membership Type
Configurable bundles that define different membership categories and their behaviors.
Membership Period Entity
Tracks individual time periods within a membership's lifecycle, including start/end dates and specific Contact entities that are considered members during that period.
Membership Term Plugin System
Extensible plugins define term calculation logic. Custom plugins can be implemented for project-specific membership term calculation logic and the module provides three built-in plugins:
FixedDuration
Memberships with fixed start/end dates (e.g. membership for a full calendar year).
RollingDuration
Memberships that renew on a rolling basis (e.g., 1 year from activation).
Lifetime
Permanent memberships without expiration
Services and Integration
MembershipService
Service providing membership-related functionality including membership status checks.
Event System
Dispatches events for integration with other modules.
Queue Worker
Handles membership expiration processing on cron.
CRM Membership Ecosystem
- Member Platform plans to use CRM Membership to track memberships
- CRM Membership Commerce - integrates with Drupal Commerce
Have another project that integrates with or uses CRM Membership? Open an issue for it to be added here!
See other projects in the Drupal CRM ecosystem.
How to Contribute
Drupal Slack
Drupal Slack
If you haven't already, join Drupal Slack then find us in the #crm channel where we collaborate on CRM issues.
Issue Queue
The best way to dive in is to find an issue in the issue queue that you can help with and get to it. Be bold and take action!
Develop CRM Membership using DDEV ⚙
If you haven't already, install DDEV.
git clone [email protected]:project/crm_membership.git cd crm_membership ddev config --project-type=drupal --docroot=web --php-version=8.4 --corepack-enable --project-name=crm-membership ddev add-on get ddev/ddev-drupal-contrib ddev add-on get ddev/ddev-selenium-standalone-chrome ddev start ddev poser ddev symlink-project ddev drush site:install -y ddev drush pm:install crm_membership -y ddev drush config:export -y ddev drush user:login