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 »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
Pages: [1]

Author Topic: People / Association_ID / Account_Executive: Can I setup CiviCRM like this?  (Read 1556 times)

Rachel

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
June 05, 2010, 06:51:02 am
Using Drupal and looking at CiviCRM.

When a user registers I need to have a dropdown box with their "Association ID", "Organization ID" or "Group ID" (An Alpha-Numeric code i.e. "APEXGROUP1").  Having an ID from their organization is a requirement for registration.

We have Account Executives (AE).  Each AE is responsible for multiple 'associations/groups/organizations' (hence the IDs).

I've been playing around with Drupal/Civi and enabled the "Name/Address Profile" and have tried to add a dropdown field for the new "ID", but am having trouble either associating it back to an AE or even having anything 'organization' related show up on the Drupal registration screen.

I need to:
    -- Have users join and select their "ID" from a dropdown at registration
          -- I am collecting username, email, pwd, name & address and this "ID"
    -- Have that "ID" associate back to an Account Executive
    -- Track certain info about activities users participate in on the site
    -- Be able to generate reports for all AEs and show the users & "IDs"
    -- Be able to import/export CSV with user data including the "ID"

Does anyone have any suggestions as to how best to accomplish this?

Thanks!
Rachel





Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
June 05, 2010, 02:15:55 pm

how many organizations are we talking about?

you will need to do ID management via some custom code. If all the organizations are already in CiviCRM you can potentially use a custom field and a hook to retrieve these values

check: http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmcustomFieldOptions

If there are lots of orgs, a select interface will not be very efficient / confusing

the reports will need to be custom reports

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Rachel

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
Re: People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
June 05, 2010, 05:08:50 pm
Hi Lobo,

We would pre-populate CiviCRM with the IDs, and add new ones are we go.  Isn't there a way to use a field and have the data show up in a dropdown or listbox on the Drupal registration page?

Can I put the organizations in a listbox but not not allow multiple selections?  Do you have a better way to do this?  How can I make this show up on the Drupal registration page?  When I try to put it on the registration page it doesn't work (everything from the Civi profile disappears).

Potentially, there could end up being hundreds of organizations (1-2 dozen to start), I thought of using a textbox and have the users input the code/ID, but I want to make sure the user selects a valid organization without having to add error checking code in the initial release.

Should I use the standard organization field (is this better than using a custom field?)?.   I also looked at groups (but the record needs to be restricted to one per person), 'membership source' and played around with custom fields....

CiviCRM doesn't have an existing way for us to assign someone to manage certain orgs/groups of people?  Most CRMs I've looked at have a way to assign groupings of people to reps, I was assuming the functionality was there and I just missed it.

I'd like to use CiviCRM, and am open to suggestion if you have a better way to accomplish what I need to do.

The most important functionality is to make sure that the user gets put in the proper "grouping", we can manually track which rep 'owns' which grouping to start, and then custom code the ID management later (there's no way we can do this for the initial release).

I could also look at adding a custom field to a Drupal profile and collect the data at registration - if I did, how would I then get the data over to CiviCRM?

What do you think the "path of least resistance" is to being able to associate a user with some kind of grouping/org ID code?  Each user would only ever be in a single grouping/org.

Thanks for the help!
Rachel


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
June 05, 2010, 07:00:47 pm

you will need some development skills to accomplish this,  here are a few steps:

1. Create the custom field on contact and implement the options hook to retrieve the ids from the organizations. This requires PHP and MySQL skills

2. Check out CiviCRM ACL's (http://wiki.civicrm.org/confluence/display/CRMDOC/Access+Control) to see how you can partitions contacts so a group can manage those contacts only. If you have a large number of orgs, you might want to consider using an ACL hook to get better scalability

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Rachel

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
Re: People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
June 07, 2010, 06:42:21 pm
Thanks again for the guidance Lobo...  a few simple questions:

My initial goal is to ensure the data is being captured.  I have time to go back and code/customize as necessary once we're up and running. 

1. I can capture the data by adding a field to the Drupal profile.  If I do this, is there a way to sync that data over to CiviCRM?

2. I should be able to create a custom field in CiviCRM and use that field.  Isn't it as simple as creating a new field, populating the field with data manually and then having it display in a profile which I then make part of the Drupal reg?   Is there a way to use a listbox that only allows 1 value to be selected, or am I restricted to a dropdown if I want a single value.

3. Between 1 & 2 above, is 2 clearly more effective?

4. You had said: "If there are lots of orgs, a select interface will not be very efficient / confusing" -- what would you suggest?  Is there a better way to accomplish this?

Thanks!
Rachel

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
June 07, 2010, 09:57:35 pm

i would go with option 2, since that avoids the synching issue you have with option 1

if you only want one value, u'll need to use a select  or radio (or u can use multi-select / checkbox, but then implement  a custom validation rule if more than one is selected)

maybe an ajax autocomplete widget might be a better choice for a large number of orgs?
lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
June 08, 2010, 12:25:51 am
Hi,

If these are organization, they should be stored as contacts IMO (with subtype membersorg or something like that). You can use for instance the external id to store the code.

You can either use relationships and it works directly, or add a custom field contact so it's available in your contacts, you will need to change the autocomplete so instead of fetching all the contacts, it only fetches the one from the right subtype.

Using the rest interface, that's very simple to have this autocomplete, you will have to copy paste a locked down version of the rest api (that returns only the org of this subtype) for the registration, as the normal rest interface is only available for authenticated/civicrm users and have a post hook to store the result as a relationship.

And the account exec is also a contact, with a new type of relationship with the org "account exec". You can use this to say the account exec can update the org info.

More than one way to skin a cat ;)
X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Rachel

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
Re: People / Association_ID / Account_Executive: Can I setup CiviCRM like this?
June 23, 2010, 01:16:08 pm
EDIT:  I was able to build the link using Views...

If I have a custom data field (field "Group Code" in Group "Member Info"), if I'm in Drupal, how can I pull the field data from the database, I need to select the data for that user to create a URL and display it (only on a specific page)...

Thanks!
Rachel
« Last Edit: June 23, 2010, 04:49:27 pm by Rachel »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • People / Association_ID / Account_Executive: Can I setup CiviCRM like this?

This forum was archived on 2017-11-26.