Automatically setting school and legislative information for your contacts using Cicero

Progressive Technology Project has released a new Drupal module called CiviCRM Cicero that integrates with the Cicero service from Azavea. If you are using CiviCRM with Drupal, you can now add legislative district and more information to your database.

You have to start by getting an account with Azavea. In order to use their service, you have to pay for it. However, they offer a 1,000 credit free trial and, if you are a nonprofit organization, you can get 5,000 credits for free via TechSoup.

Once you have an account, you'll need to add a few Contact custom data fields to your CiviCRM database. Depending on your needs, you might create fields to hold a contact's city council district, national representative district, school district or any other similar information. Be sure to also create a "last updated by cicero" field which will be auto-filled by the module.

Now it's time to configure the module. Using the CiviCRM menu system, Click Administer -> System Settings -> Administer CiviCRM Cicero. Or, you can find the same place via the Drupal Administer -> Configuration menu.

Click the Cicero Account Settings tab to enter your Cicero API username and login. In addition, on this page, you create your field mappings. These mappings tell the module which custom data fields should hold your Cicero data.

Once your fields are mapped, click the "Update Civi Contacts with Cicero information" tab and choose the CiviCRM group that you would like updated and the date/time you would like it to happen.

The module comes with two handy drush commands that are useful for debugging.

drush civicrm-cicero-show-contact --contact_id=N

Shows all available cicero data for the contact with contact_id N, regardless of your mapping.

drush civicrm-cicero-update-contact --contact_id=N

Updates the contact with contact_id N according to your saved mapping.

Limitations: nothing is perfect. Cicero only appears to cover the United States. [Correction - Cicero <a href="https://civicrm.org/%3Ca%20href%3D"http://www.azavea.com/products/cicero/about/availability/">http://www.azavea.com/products/cicero/about/availability/">goes beyond the United States</a>]. Also, if you are not using CiviCRM with Drupal 7 this won't work (although we have done the heavy lifting, so re-implementing for WordPress and Joomla should not be terribly difficult).

So where do you get it? The module is currently languishing in the Drupal new modules queue. But, it's available in the Drupal sandbox and can be checked out via git.