Webform CiviCRM Integration - Membership rules improvements
Overview
The aim of these proposed changes is to facilitate more complex membership renewal structures in Webforms, for which start and end dates of new and existing memberships can be determined by/and or dependent upon a number of variables. Many organisations allow the purchase of more than one membership type simultaneously, and allow others to be added throughout the course of existing memberships. Often these 'add-on' memberships are not valid without an active 'base' membership and as such their start and end dates should be aligned.
Summary
Phase 1:
Milestone 1 - Membership auto-select and Start Date
- Automatically select by default all membership options that are currently active for the user
- Start date visual changes: Adding all extra fields to membership tab as per mockup (incl help texts)
- Logic for start date +membership types fields
- End date visual changes: Adding all extra fields to membership tab as per mockup (incl help texts but excluding reduce number of instalments to fit shorter period option)
- Logic for end date +membership types fields
- Logic for pro-rate price of membership field
Phase 1
(1) Membership auto-select and Start Date
ID | Requirement | Specification | Notes/ Wireframes | |
---|---|---|---|---|
1 | Checkbox: Automatically/ default select all membership options that are currently active for the user | Current behaviour:When a contact has only one membership and webform offers only 1 membership type to select, then webform will select this membership type on the form. If I have more then one membership and there are multiple memberships available to select, and I already have several of them, webform will only pick one of them to select, even if both of the available options are provided separately as separate memberships on the webform. (Webform doesn't allow multiselect of memberships in one field). Use case:It is possible that a contact may have multiple memberships. When coming to renew, currently only the primary membership would be selected by default and the user would have to select any further memberships again. For example: It may be that they have one "primary membership" and several "add on's" that they have purchased either at the same or a later date. Proposed behaviour:1. If webform is being completed by an existing user/ organisation member, the form should recognise what active membership types the user already has and should pre-select form fields with existing membership types that I have, if they are available on the form. The preferred configuration to support this would therefore be to create multiple "memberships", each with only one option fixed from the webform field configuration side. nb. We are not sure if we need an administrator option for this or we should just improve behaviour for this use case? | Configuration:
Specify base memberships as part of membership 1:
Specify add-ons as part of memberships 2+3: (similar configuration for both types) Webform should select add-ons that I have as well as main membership that I have: | |
2 | Start date visual changes: Add extra fields to webform membership tab (including help texts) | Current behaviour:In Webform/CiviCRM it is not possible to specify the start date of a new membership comparatively to an existing membership. The system will either:
It is not possible to delay the start of the new membership to the end of an existing membership of a different type. Use case:Organisations may wish to defer the start date of a membership to the end date of an existing membership when the contact is changing type. For example when I upgrade from a Junior to a Full membership, this should start only at the end of the Junior membership. Organisations also may also want to make a membership start on a particular date, say when they have a fixed annual start date of membership. Proposed behaviour:
a) Automatic (note: that this may not be immediate if you are renewing or in grace etc). b) User select c) Relative to active membership end date 2. Add a help icon with the following help text to the field label: "'Automatic' indicates that the start date will follow normal CiviCRM rules. i.e. New memberships will start immediately from date of sign-up and renewals will extend memberships. User select will create a new webform date component that the administrator can configure in many ways including adding a fixed or relative start or end date. 'Relative to active membership end date' will modify the start date of the new membership as follows: It will first check whether the user has an existing membership of this type. If so it will follow the automatic membership rules. If the user does not have a membership of this type, it will create a new membership and then check if the user has any active memberships of the relevant types specified. If not then the system will follow automatic membership rules. If so it will set the start date of the new membership to be the day following the end date of the existing active membership. If the user currently has multiple relevant membership types the start date will be one day following the end date of the membership with the latest end date." 3. If user selects "relative to active membership end date" show a select membership types field. Allow multiselect. Required if shown. | https://compucorp.atlassian.net/browse/BASW-336 | |
Logic for start date & membership field types | Start date fieldAutomatic -No change from current behaviour. Current behaviour: When a new membership is created via webform the start date is immediate, unless the contact already has a membership of the same type they are signing up to. In this case the new membership starts the day after the current one ends. Relative to active membership end date -Current behaviour: In webform CiviCRM it is not possible to specify the start date of a new membership comparatively to an existing membership. Proposed behaviour: New membership start date should be set to the day after the end date of the an existing active membership the user currently have. This membership should be among the membership types that are specified in the start date rule configuration. If more than one matching membership exists, pick the one that has the latest end date. If no membership type is selected, new membership will start immediately once the current active membership with the latest end date has expired. Help text will display "If you do not select a membership type, new membership will start immediately once the current active membership with the latest end date has expired" Membership type(s) field
| User select - This has been included in the dropdown options so that the webform admin can implement forced 'automatic' or 'relative to active membership end date' conditionally based on other answers within the form |
(2) End Date
Requirement | Specification | Notes/ Wireframes |
---|---|---|
End date visual changes: Adding all extra fields to membership tab as per mockup (incl help texts but excluding reduce number of instalments to fit shorter period option) | Current behaviour: In Webform CiviCRM it is not possible to specify the end date of a new membership comparatively to an existing membership. The system will:
It is not possible to limit the duration of the new membership so that it ends at the same time that an existing membership ends. It is therefore also not possible to pro-rate the price of a new membership relative to the reduced membership duration if a new membership were to end at the same time as an existing one. Use case: Organisations may wish for a new membership to end at the same time as an existing one, for example if they do not allow the purchase of a new membership type without a specific pre-requisite membership type. Propossed behaviour:
a) Automatic b) User select c) Relative to active membership end date 2. Add a help icon with the following help text to the field label: " "Automatic" indicates that new membership end date will be calculated according to the start date and the membership duration" 3. A "membership type" select field also needs to be added next to the "End Date" field.
4. A "Pro-rate price of membership" check box needs to be added next to the 'membership type' select field. 5. Add a help icon with the following help text to the field label: "If this box is ticket, the membership price will be calculated based on the number of days left until the end date compared to the number of days in a regular membership period". 6. A field to select Payment Installments: with 3 options should be shown:
7. Add help text icon with the following text for the field label: "To do" | ' |
Logic for End Date +membership Types fields | End date field:Automatic -No change from existing behaviour Current behaviour: When a new membership is created via webform the end date is calculated based on the standard membership term and the membership start date. Relative to active membership end date -Current behaviour In Webform CiviCRM it is not possible to specify the end date of a new membership comparatively to an existing membership Proposed behaviour New membership will end at same time as specified current active membership type(s)
Membership type(s)
| |
Logic for pro-rate price of membership field |
| Calculation: Pro-rated membership fee = (regular membership fee/ number of days in regular membership period) x number of days in pro-rated membership period |
Logic for "Payment Instalments" field |
3) Add to future instalments of relative membership type (Compucorp custom in membership extra's extension)
|
(3) Membership date rules validation
Requirement | Specification | Notes/ Wireframes | |
---|---|---|---|
(a) | Validation rules |
2. If 'relative to active membership end date' is selected and if no active membership of the selected types exists for the user, then we should show an error message. "Unfortunately you cannot purchase this item as your membership has expired". |
Phase 2
Milestone 4 - Recurring Contribution Handling
UX improvements on start & end date configs | The following changes are to relabel the configs and options we added in phase 1:
| |
Renew existing recurring contribution |
| |
Add to existing recurring contribution |
| |
Pro-rate price of membership |
|