CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Branch membership
Pages: [1]

Author Topic: Branch membership  (Read 1058 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Branch membership
July 05, 2013, 01:08:23 am
We seem to frequently deal with Branch Memberships and hit the recurring problem of how to link the membership to the associated Branch. The membership type has a field 'Membership Organisation' which I think was intended for this situation. However, it is not useful because the Membership Type is over-loaded with the need to have membership types of differing durations and differing relationships.

So, an organisation with 20 branches could find itself needing 100 memberships types. This could be good in that you could give out different financial types BUT entering front end and backoffice memberships with 100+ membership types is not currently a workable proposition. Creating the 100 membership types (or more!) is also a drag.

So, we are looking for another way of linking memberships to a specific Contact (Organization->Branch). This  is required for breaking down membership payments (for accounting reasons), for permissioning, & ideally for viewing members of the branch when you go to the branches contact record.

We have been using a custom contact reference field on membership and I recently had a go at making the branch visible on the individual member tab and the list of members visible on the Branch members tab. This improved the appearance but I couldn't make it work without tpl & php edits due to the way that tab is made available to developer hooks

I have also seen people (including us) asking for the ability to have a relationship linked with a membership and have it end when the membership ends. This potentially gives a shortcut to permissioning (ie. if there is now functionality in core whereby the person with dashboard permission over the branch then would have dashboard permission over the contact) and makes the connection visible on both contacts. This also suggests a way to represent the situation where the member changes branches - the membership persists but the relationship ends & a new one is started.

A final thought is about how payments for which a portion goes to the branch is represented in an accounting-type way. Ideally we would do this through a price set but we need more branches than could reasonably be presented with a select. We need an autocomplete. Presumably if the branch is known a hook can edit the price set.

What happens however, if the branch is not known by the person registering & entered later by a back-office person assigning them?

My preference is for some of this functionality to go in core and writing this I feel the ability to have relationships associated with memberships might be worth pushing that way. I would expect

1) Membership type could be configured to have a relationship field on it
2) The relationship field would have configurable limits as current contact reference fields do
3) Outside this requirement but in the future I would expect we would want the possibility to configure how many so that in fact one or more relationships would be possible.
4) when the membership becomes current / is approved the relationship would start
5) when the relationship expires the relationship would end
6) if the field that stores the relationship is altered to a different contact one relationship would end and another would start

None of which makes me any clearer how we would manage to assign a portion of the relationship fee to HO & a portion to the branch - esp if we didn't know the branch until later
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: Branch membership
July 05, 2013, 12:25:17 pm
I want to speak for now just to the point about the difficulties of specifying the financial account for 5 membership types when there are 20 branches.

Andrew Perry, who conceived of and pushed the notion of financial types, has proposed an interesting tweak for a similar problem where too many combinations of taxes might show up: a rule for selecting a financial account given a financial type, rather than a 1 to 1 relationship for a specific type of account like a state sales tax. See http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=83493410&focusedCommentId=85065956#comment-85065956

I asked Parvez whether he had moved ahead with any implementation of it earlier this week but haven't heard back.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Andrew Perry

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 1
  • Building empowering tools that comply with rules
    • Community Builders Australia
  • CiviCRM version: 3.x, 4.x
  • CMS version: Joomla 1.0.x, 1.5.x -> Drupal 6.x, 7.x, WordPress
  • MySQL version: 5.1, 5.5, 5.6
  • PHP version: 5.2, 5.3, 5.4
Re: Branch membership
July 05, 2013, 03:05:22 pm
Hi Joe

Thanks for the email bringing this topic to my attention.

We also use Rules for Membership in the OMMS app.

This is based on XML rules rather than trying to provide a UI to construct them.

Essentially when someone registers they or a back office person selects from a list of Branches and their is a "Member of" relationship created to that branch which is completely independent from the Membership record.  Initially we used to have the relationship inherit the end date of the membership, and then extend it when the membership was renewed, but we have now moved to having no end date on the relationship and having a cron that ends the "Member of" relationship/s of a person if their Membership has expired.

So in Eileen's use case you could just have a drop down list of all organisations that have a "Branch of" relationship of the "Owner organisation" and let people choose their branch, or if there are strict rules that apply to which branches they are allowed to be in and you don't have the budget to build those rules into the UI, you don't expose the Branches to the end user and just have the back end users allocate them to the appropriate Branch by creating a "Member of" relationship (or "Pending Member of" relationship if the Branch has to approve it).

You could then have a "hook" that upon setting a person's "Member of" relationship it looks up the person's Membership Fee and records a transfer of a percentage of that from the "Owner organisation's membership income and/or asset accounts" to the "Branch organisation's membership income and/or asset account".

It is a big job and the edge cases / reversals are the killers.  That's partly why we ended up building the OMMS app to talk to CiviCRM and orchestrate these things rather than try to get it into CiviCRM core (where it will likely overcomplicate things for the majority of users).  Back then it would have required a six figure MIH - the new finance system may bring it under that now... perhaps!

Often this detailed rules logic is the sort of thing that belongs in a client's App that uses the CiviCRM API, rather than putting it into CiviCRM core code (which should focus on providing strong reliable services for client apps to use - including the included default "CiviCRM UI app") or overrides that break when CiviCRM upgrades.  Absent that separation of concerns, there is a strong risk people will start using things like Salesforce as the "CRM service" for their Apps.

Hope the above helps.

Eileen - happy to do a Skype call to discuss.
Community Builders Australia Pty Ltd
www.communitybuilders.com.au

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Branch membership
July 05, 2013, 05:18:40 pm
Eileen - The overall approach described by Andrew makes sense to me for a number of reasons. I'm concerned about complicating the core membership_type data model and UI with another 'relationship linkage' as I think it will lead to confusion.

I'm seeing that using Andrew's approach you can create the "Branch of" relationships to define the hierarchy of parent organization (membership type owner contact id) to branches. Then use that hierarchy to display branches to use the user at membership signup time, and store the selected branch for each membership as a membership custom field. Another hook could create the parallel member of relationship if needed.

dave
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Branch membership
July 05, 2013, 05:42:06 pm
OK - so your point about doing the financial transfers when the branch is defined makes sense & removes this aspect from the more common & standard issue of having a connection between the organisation/branch that a contact is signing up to and the contact signing up. ie. finding a way to make the described purpose of the 'membership_organization' field work for organisations with more than 4-5 branches.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Branch membership
July 06, 2013, 04:01:54 pm
Quote
The membership type has a field 'Membership Organisation' which I think was intended for this situation. However, it is not useful because the Membership Type is over-loaded with the need to have membership types of differing durations and differing relationships

I think this is an underlying problem - both for this situation & when developing membership forms.

The form description says

"Membership Organization *    
Members assigned this membership type belong to which organization (e.g. this is for membership in 'Save the Whales - Northwest Chapter'). NOTE: This organization/group/chapter must exist as a CiviCRM Organization type contact"

So, the correct usage is that we would have a typical set of membership types (one year, 2 year, life, family, monthly) * 20 branches and now we have 20 membership types. In effect we are creating a many to one relationship by duplicating the data.

If we go down this path then the chunks of functionality work. You can add your long list to the membership form and the upsell & price sets work correctly. Searches work etc. However, you are left with a huge long list of membership types on your form and when you do an search you can't search for 'life members' you have to select 20 different 'life member options'.

So, we have the functionality we want to manage branch memberships - we just don't use it because it's hard to use. However, this leaves us with a different problem. CiviCRM assumes you don't want to have more than one membership with the same organisation so you can find yourself creating extra dummy organisations just so people can choose 2 memberships in the same checkbox set in a price set.

My preferred revision would be

  • Change membership_contact_id on the membership table to 'default membership contact id'
  • Add a field to the membership type id that allows you to specify the groups of contacts who could be the membership organisation (preferably like the way the contact reference filter works)
  • Add member organisation id to the membership record
  • Price set line items would have a field for the member organisation. They could be left blank in which case an autocomplete would be presented. The field would default to the default organisation
  • when considering upsell & renewals memberships could be upsold provided they were still a member of one of the branches in the criteria
  • An activity would be created to track changes in member organisations if the branch change
  • On the back office we would need people to select the membership type and then membership organisation type - I expect both fields would want an autocomplete. Membership organisation would default to the default member org id

It might still make sense to create relationships as well as the activity history and I'm pretty comfortable with that being outside core. At the moment it seems that either we should find a way to make having 100-500 membership types work through the UI or normalise the data into a membership type and a membership organisation somehow.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Branch membership
July 08, 2013, 11:42:43 am
I think changing core to the model you're suggesting is a significantly big project AND I'm still concerned about overcomplicating things for 80-90% of users for whom the current model fits.

If the main issues are UI to manage ~100 membership types + the upsell problem, maybe it makes more sense to leave the underlying data model in place and look at ways to attack those 2 issues.
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Branch membership
July 08, 2013, 03:24:42 pm
Yes, the main issue is

1) for organisations without branches we have to create multiple dummy organisations as containers for different membership types. This is primarily because of priceset rules & upsell rules. CiviCRM has an expectation of one membership in an organisation which we have to work around

2)for organisations with 15-50 branches we wind up with 100-500 membership types and have to manage those.

We don't have any organisations that work 'with' rather than 'around' the current usage of membership organisation.

I will try to pull together some notes about how it is implemented and the rules around it. From what I recall the main reason for needing additional dummy organistions for one-organisation organisations was the rules embedded in price-sets & probably something around upselling. So, the membership organization is standing in for 'membership bundle' in this case.

It may be that normalising membership types into 2 tables - one holding duration information & the other holding membership organisation & over-rides on fields like financial type will make sense.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Branch membership

This forum was archived on 2017-11-26.