Unverified Commit ea7c3386 authored by everykittysdaydream's avatar everykittysdaydream Committed by GitHub

Update index.md

parent d21b5ab0
......@@ -48,18 +48,25 @@ On the bottom of the /mapping page, there is a button that is labeled `Update En
This function is called every time the extension syncs with a new Civi endpoint, as well as the first time it connects to ActionNetwork.
### how to set up sync
## how to set up a sync
In order to implement 2-way sync, we have implemented 4 main functions.
In order to implement 2-way sync, we have implemented a handy online interface at /civicrm/osdi/jobs. You can also view this button at the "Set up CiviCRM Sync" option under the contacts Menu. If you want to set up a sync via the web interace, read the below guide. If you want to set up a sync manually yourself, you can set it up in the following section on setting up manual jobs.
### setting up a sync via the interface
### setting up a sync manually
You can set up a sync manually by going through `Contacts -> Import via OSDI`. Namely, there are four kinds of jobs:
- one time import
- one time export
- scheduled job import
- scheduled job import
### setting up "one time" jobs
#### setting up "one time" jobs
After installing the extension, the configuration page can be spotted at `Contacts -> Import` via OSDI. The config page should look like this:
After installing the extension, the configuration page can be spotted at `Contacts -> Import via OSDI`. The config page should look like this:
![config image](https://raw.githubusercontent.com/4ndygu/civicrm_osdi/master/civicrm_osdi_configure.png "config image")
......@@ -71,7 +78,7 @@ In the Group ID rule, you can specify the group you want to export from or the g
In specify required fields, you can specify a space_delimited string. In Import, this will check if specific fields in Action Network are present in the incoming data. In Export, this will check if specific fields in CiviCRM are present in the incoming data.
#### actually importing
##### actually importing
After you call import, you must schedule the job and then execute it. You can schedule the job by calling out to the Importer.Schedule endpoint. There are no parameters to be made. In order to set up the import pipeline, you must go to `/civicrm/admin/job` and configure Importer.Schedule as a cron job to be run at an interval of your discretion. This will add all tasks to a queue.
......@@ -79,7 +86,7 @@ After you call schedule, you have to run the tasks in the queue. You can do this
Currently, the architecture is constructed this way because I cannot configure the queue to only run a few elements without throwing a `failed to obtain next task` error. Please do let me know if you have gotten past this!
#### actually exporting
##### actually exporting
The first time you press the export button on the configuration page, you are
actually just loading up the task by calling the Exporter.bulk endpoint. To
......@@ -90,13 +97,13 @@ given key and endpoint will attempt to export 100 contacts.
I realize as I write this that this is not particularly good UI and will make a
note to fix this.
### setting up update jobs
#### setting up update jobs
Update jobs exist so they can be called as a scheduled job, presumably every
day, that will update all newly modified contacts into both the external
endpoint and the CiviCRM instance.
#### setting up import updates
##### setting up import updates
I have provided an Updater.update endpoint that does the same thing as the
original /config field. This is to be set as a scheduled job that runs daily.
......@@ -111,7 +118,7 @@ Like the bulk import, you must call Importer.Schedule and OSDIQueue.run for
these jobs to actually end up as CiviCRM contacts. If all jobs are configured
via scheduled jobs, the pipeline should work.
#### setting up export updates
##### setting up export updates
To update your exports, you can call Exporter.bulk again with certain
parameters. We provide the following extra parameters:
......@@ -127,7 +134,7 @@ parameters. We provide the following extra parameters:
You can set update as a scheduled job that runs daily.
### A generic OSDI-compliant endpoint.
## A generic OSDI-compliant endpoint.
You can find it at `/civicrm/osdi/response?object=contact`. This is currently
still in alpha, but it allows users to page through all users with emails,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment