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) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Tracking volunteer hours and applying to events
Pages: [1]

Author Topic: Tracking volunteer hours and applying to events  (Read 1048 times)

jakecivi

  • I post frequently
  • ***
  • Posts: 140
  • Karma: 0
Tracking volunteer hours and applying to events
October 27, 2014, 08:59:56 am
I'm working on a way to track volunteer hours and have the ability to apply them to payments. On the IRC channel, colemanw suggested that I write an extension to bridge CiviVolunteer and CiviDiscount, and Frank Gomez offered to talk over architecture before I start.

I'm currently wondering if CiviVolunteer and CiviDiscount can respectively actually track hours in the way I need them tracked, and if discounting is the right way to go instead of using a "volunteer credit" payment instrument.


Here are more details; it is a somewhat complex issue, sorry if my writing is not super clear:

Here are a couple of requirements: 1) Need to be able to track volunteer hours; 2) need to be able to exchange a certain number of volunteer hours for a class; 3) need to be able to exchange volunteer hours for specific amounts of event payment.

In general, so this can work for many organizations, it needs to be able to:

1) track hours and what those hours were worth at the time (in terms of a specific monetary value or some percentage of an event)
   - I realize that tracking their value at the time they're done instead of time of exchange would create a situation where hours do not necessarily have the same value, and necessitate a set of rules for prioritizing which ones to exchange first - perhaps more trouble than it's worth, although still need some way to track the percentage hours' value at the time they're done.

2) and maybe even provide a way to override what hours are worth at the time of their exchange for event credit.
   - This seems like it would be simpler than allowing tracking of monetary values at the time the hours are put in, although it would have no meaning in the context of hours done for a percentage of an event's fee.


One hour may be worth 1/2 of an event registration of a particular kind (in the case of 2 hours equaling one class), or in another organization's case, one hour may be worth $10 of credit, and people can theoretically apply any number of volunteer hours to different events (this would happen on the admin side, not the public registration side, for now, at least). There needs to be a way to apply volunteer hours to a particular event, and also a way to automatically remove volunteer hours (or enter a negative amount) from someone's accumulated hours once they're converted to event credit.

For converting volunteer hours to event credit through CiviDiscount, I'm thinking that, in the one-hour-per-fixed-amount case, unless I want whatever I write to start creating discount codes at every conceivable amount ($10, $20, ... at $10/hour or $12, $24, ... at $12/hour), there has to be some better way.

I'm also wondering if, instead of using CiviDiscount, volunteer hours ought to be a payment instrument, so that an actual dollar amount would be applied to an event as a payment by "volunteer hours." Conceptually, exchanging hours for an event seems to make sense as a form of exchange rather than a way to earn a discount. This would work nicely with Civi 4.5's ability to handle multiple payments per event, and it seems to be the most clear in terms of allowing for reports of various kinds of in-kind donations and payments, including exchange for hours. Then amount of volunteer hours overall could be reported upon, as could amounts and monetary values of volunteer hours exchanged for event credit.

I wonder too if CiviVolunteer is the right way to go. Volunteer hours will not necessarily be linked to specific events (although they could be, and then they'd count towards that event), but can also be accumulated through doing things that apply to the organization as a whole outside the context of an event, like office work, grounds work, etc. It would seem that phase 2 of CiviVolunteer, which includes "linking volunteer opportunities directly to an organization or individual" (https://civicrm.org/extensions/civivolunteer) would need to be completed for this to work.

Thanks again and I would greatly appreciate any thoughts anyone has on this.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Tracking volunteer hours and applying to events
October 27, 2014, 10:28:18 am
Hi Jake,

A very interesting project!  A question though: What's the order of operations?  My initial reading suggests that someone signs up online for an event, then the discount is being applied on the admin side.  That doesn't make sense though.  Are you suggesting that event registration can ONLY happen admin-side for a discount?  Also, if the discount is being done admin-side, is it still a requirement that Civi know what the conversion rate is between hours and events?

Other thoughts:
I think that integration with CiviVolunteer is probably the way to go, even if you need a phase 2 item.  It sounds like CiviVolunteer is moving, and the particular phase 2 item you mention is toward the top of the list.  It might even be worth putting work into this particular item instead of a DIY approach, since you then get all the existing power of CiviVolunteer and future enhancements.

A very simple approach would be to create a custom field on Contacts called "Volunteer Hour Credits" and another on Events called "Volunteer Hours Used".  Then write an extension that:
* uses hook_civicrm_post on volunteer registrations (if the hook doesn't exist in CiviVolunteer, it can likely be added with minimal work) that adds volunteer hour credits to an account when volunteering happens, and;
* hooks civicrm_post on event registration, and subtracts "Volunteer Hours Used" from "Volunteer Hour Credits".

Note that this approach would NOT allow for online registration with volunteer hours, which will need the CiviDiscount integration.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

jakecivi

  • I post frequently
  • ***
  • Posts: 140
  • Karma: 0
Re: Tracking volunteer hours and applying to events
October 27, 2014, 10:54:42 am
Hi Jon, Thanks for the reply.

There are a few possible orders of operations:

One possibility:
  • Someone comes and does volunteer hours, knowing what the exchange will be
    • This could be either something like 2 hours = one class, or it could be 1 hour = $10 of credit
  • They sign up for an event (using "pay later" option, or pays just the deposit online (our system can do that)) and tell the office they want to use x number of their volunteer hours towards that event.
    • This would be difficult to do at the time of online registration, because that would require people to be signed in to user account.. not sure we want to require that. Although it would be interesting if they could. But no, I wasn't thinking that registration would happen ONLY admin-side, but that entering the payment in volunteer hours would happen admin-side.
  • The office manager or assitant enters a payment of type "Event fee" using instrument "volunteer hours." Not sure if this makes sense to use CiviDiscount for or not. The person's store of available volunteer hours would decrease by the appropriate amount (I think it makes sense to enter a volunteer hours activity with a negative amount of hours).
    • Am I trying to re-create some kind of double-entry system here? Could CiviAccounts be used for this? I know conceptually it could, although I'm not sure tracking hours would make sense in the context of a system built to handle monetary amounts.

Another possibility:
  • Someone comes and participates in an event in exchange for help related directly to that event (this is more thought of work-study than accruing volunteer hours, although I think the same mechanism could be used for both).
    • For one organization, this applies directly to an entire event fee (e.g. someone comes and helps set up chairs for a class and gets to come to the class for free)
    • For another organization, each hour done throughout the course of a multiple day event counts as $10 against the event fee.
    • In the latter case, the person may have paid the full event fee up front and will receive a refund for their work-study hours. This could look like an additional payment (of the "volunteer hours" instrument) entered against the event fee (resulting in an overpaid fee situation), and then another payment in a negative amount, using the "cash," "check," or possibly "credit card" instrument (although I imagine there would be some CiviAccounts considerations there - http://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Data+Flow), to make up for the difference.
  • Office manager would enter this (e.g. as hours, and then as a trade for credit) in the same way as they do above (unless there's a better way to do that).

Clarification: By your "very simple approach," you mean an alternative to using CiviVolunteer altogether? In any event, I think it's still a good idea to use Activities to track volunteers rather than custom fields..

Thanks again!
« Last Edit: October 27, 2014, 11:09:04 am by jakecivi »

jakecivi

  • I post frequently
  • ***
  • Posts: 140
  • Karma: 0
Re: Tracking volunteer hours and applying to events
November 03, 2014, 08:12:11 am
One more possiblity I thought of: Instead of using hours as the unit of the volunteer exchange, do it in currency, and when an exchange is made, subtract from the monetary value of someone's accumulated hours rather than from the hours themselves. This would be instead of either calculating monetary value based on hours and the time-of-volunteering exchange per hour, or based on hours and a global exhange per hour (changes where the hours->monetary value conversion happens). Not sure this would be the best approach, though.

GinkgoFJG

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 4
    • Ginkgo Street Labs
Re: Tracking volunteer hours and applying to events
November 18, 2014, 10:01:58 am
So my thoughts about this, although I haven't had a real-life scenario to work out the details against, are this:

  • Track hours using CiviVolunteer's Volunteer activity
  • Associate values with volunteer hours based on the volunteer role (e.g., one lawyer hour is worth 4x one office clerk hour) -- haven't worked out the mechanics of this yet... roles are currently represented as option values
  • Volunteer rewards or credit could be represented in a currency (e.g., USD) or as generic units (e.g., Tom has 25 volunteer credits, which he can use to rent a video camera). Tracking volunteer credit separately from volunteer hours is important because you want the history to be non-destructive. When someone redeems volunteer credit, you don't want the total hours they've volunteered to be reduced as well.
  • It has been suggested by some folks that the volunteer credit should be treated as a contribution or a financial type. In a lot of ways, I think this makes sense, especially if you're interested in using them to directly pay for events. I think it introduces a lot of complexity, too, though (e.g., keeping volunteer credits from showing up in other financial reports, allowing them to be redeemed for event registration or membership renewal but not to make a donation, or making these things configurable).

In general, I'd say CiviDiscount probably doesn't need to be part of your workflow and that you should use CiviVolunteer. While the interface doesn't support everything, the schema does indeed allow you to associate volunteer projects with entities other than events. For folks who've needed to do that today (within the constraints of the existing UI), we've suggested "fake" events (e.g., Office Volunteers for March).
Are you a CiviVolunteer user? Join the CiviVolunteer 2.0 Matching Grant effort to help the project win $15,000 in grant funding.

jakecivi

  • I post frequently
  • ***
  • Posts: 140
  • Karma: 0
Re: Tracking volunteer hours and applying to events
November 18, 2014, 10:46:53 am
Thanks for the info.

jakecivi

  • I post frequently
  • ***
  • Posts: 140
  • Karma: 0
Re: Tracking volunteer hours and applying to events
March 06, 2015, 09:10:27 am
Frank - I'm realizing that, as I'm adding a custom field to Volunteer type activities to track the monetary value, the best way to do this is through New Activity rather than logging volunteer hours through CiviVolunteer. Is there any reason not to do this? It seems that setting the "with contact" to be the person volunteering has almost the same effect as logging hours through CiviVolunteer. Is there any reason not to do this? If it's not a good idea, I suppose I would use buildForm to get the custom field into the volunteer logging form - is there any reason not to do that? Thanks.

jakecivi

  • I post frequently
  • ***
  • Posts: 140
  • Karma: 0
Re: Tracking volunteer hours and applying to events
March 06, 2015, 09:23:21 am
I also don't see anywhere in the schema where the volunteer activity actually gets linked to the event it's logged for. Does this happen somewhere?

jakecivi

  • I post frequently
  • ***
  • Posts: 140
  • Karma: 0
Re: Tracking volunteer hours and applying to events
March 06, 2015, 10:53:37 am
To relate this back to an older thread and compare/contrast approaches: http://forum.civicrm.org/index.php/topic,2242.0.html

That thread suggests using an in-kind financial type, which wouldn't work for events because the financial type is set at the event level, whereas this thread suggests using an in-kind payment instrument.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Tracking volunteer hours and applying to events

This forum was archived on 2017-11-26.