Ruby gem that pushes data from a membership data source to a remote OneBody instance via the REST API.
Download and Install
Install Ruby if you don't already have it.
Run the following command ("sudo" may be required in some environments):
gem install onebody-updateagent
update_onebodyat a terminal, then take note of where the example.yml config file resides.
- Copy the example config file to a convenient location and edit appropriately.
You can get your user api key from OneBody (you must be a super admin) by running the following command (on the server):
cd /path/to/onebody rake onebody:api:key EMAILemail@example.com
Using your membership management software, reporting solution, database utility, custom script, etc., export your people and family data to a single comma separated values (CSV) file, e.g. people.csv.
Duplicate family data (the same family name, home phone, address, etc.) will be present for each member of the same family -- that's ok!
The first row of the file is the attribute headings and must match the attributes available:
first_name last_name suffix gender mobile_phone work_phone fax birthday anniversary description website activities interests music tv_shows movies books quotes about testimony share_ business_ alternate_email visible messages_enabled friends_enabled photo email classes shepherd mail_group member staff elder deacon visible_ can_sign_in full_access child custom_type medical_notes can_pick_up cannot_pick_up sequence family_id legacy_id legacy_family_id family_name family_last_name family_home_phone family_address1 family_address2 family_city family_state family_zip family_share_ family_visible family_photo family_email family_legacy_id family_barcode_id family_alternate_barcode_id
Not all attributes are required.
Optionally, you can use Export to CSV button in the Admin panel of your running instance of OneBody to get an example CSV to start.
Use the following attributes to track the identity/foreign keys from your existing membership management database. Do not include
family_id columns as they will interfere with the primary keys OneBody uses.
There is an example csv file in this directory for reference.
As of this writing, one Church Management System (ChMS) is supported via a Converter. The Converter translates field names and data into the formats and locations expected by OneBody.
To use a converter, you must specify it in your config file. The example config file has these settings disabled; simply remove the pound sign at the beginning of each line to enable the use of the converter. Specify the name and any additional settings.
To run UpdateAgent:
update_onebody -c path/to/config.yml path/to/people.csv
If you plan to schedule UpdateAgent to run periodically without human intervention, you'll want to at least use the
-y switch, which assumes yes to any questions:
update_onebody -c path/to/config.yml -y path/to/people.csv
You may also log all output:
update_onebody -c path/to/config.yml -y -l path/to/updateagent.log path/to/people.csv
Copyright (c) Tim Morgan. Licensed MIT - See LICENSE file for details.