# Configure and Import ODK Form

This document provides step-by-step instructions for configuring the ODK central into the Social Registry (SR) and importing the ODK form. After importing the ODK form, only the fields and their values customised using the JSON formatter are included in the individual/group registries of the SR.

Note:

Every ODK form must have its own ODK importer.

## Prerequisites

* A user must have an Administrator role to access ODK Central in SR.
* A user must know the pyjq syntax to customise the value in the JSON Formatter fields.

## Procedure

1. Click the main icon ![](/files/hfmRZ7dUhNgpGa9ZUx0P) and select ODK.

<figure><img src="/files/TFVyNQMcfVOdsLDQpy4o" alt=""><figcaption></figcaption></figure>

***ODK*** screen is displayed. You can find two tabs.

* [ODK Import](#odk-import)
* [Configuration](#odk-configuration)

### ODK Import

By default, ODK -> ODK Import page is displayed.

<figure><img src="/files/gF5c6WJSjHaSt9TaTvzc" alt=""><figcaption></figcaption></figure>

2. Click the **New** button.

***ODK Import New*** screen is displayed.

<figure><img src="/files/Y1rqxSMgYCo7LNCbwd8t" alt=""><figcaption></figcaption></figure>

The fields and their descriptions are given below.

3. Customize the ODK Importer based on the ODK form fields

<table><thead><tr><th width="226">Parameters</th><th>Description</th></tr></thead><tbody><tr><td><strong>ODK CONFIGURATION</strong></td><td></td></tr><tr><td><strong>ODK Config</strong></td><td>The name of the ODK configuration</td></tr><tr><td><strong>TARGET SETTINGS</strong></td><td></td></tr><tr><td><strong>Target Registry</strong></td><td><p>Specifies whether imported records should be associated with individual or group registries within the SR.</p><p>Select the appropriate value from the drop-down. The valid values are:</p><ul><li>Individual</li><li>Groups</li></ul></td></tr><tr><td><strong>JSON Formatter</strong></td><td>Enables users to define a custom JSON formatter for transforming retrieved data before importing it into the SR. Refer to relevant documentation for details on utilizing the JSON formatter using <a href="https://pypi.org/project/pyjq/">PYJQ library</a>.</td></tr><tr><td><strong>TIME INTERVAL</strong></td><td></td></tr><tr><td><strong>Interval in Hours (Optional)</strong></td><td>Defines the interval (in hours) at which the import process should be automatically triggered. This allows for scheduled data updates.</td></tr><tr><td><a href="#test-connection"><strong>Test Connection</strong></a></td><td><ul><li>Verifies the established connection between the ODK Importer and ODK Central.</li><li>Ensures that the ODK Importer can effectively communicate with ODK Central, the server hosting the ODK forms.</li><li>Enables seamless data transfer between the two systems</li></ul></td></tr><tr><td><a href="#import-records"><strong>Import Records</strong></a></td><td><ul><li>Tracks the progress of data import and identifies any errors that may occur during the process.</li><li>Provides users with real-time updates on the status of their data import, allowing them to quickly address any issues and ensure a smooth import process.</li></ul></td></tr><tr><td><strong>Start/Stop</strong></td><td><p><em><strong>Start</strong></em> executes the scheduled job to run periodically at fixed times, dates, or intervals.</p><p><em><strong>Stop</strong></em> terminates the scheduled job.</p></td></tr></tbody></table>

<table><thead><tr><th width="108">Icon</th><th>Click to</th></tr></thead><tbody><tr><td><img src="/files/1EzR5YVJmZtkE8fdYR0h" alt="" data-size="original"></td><td><p>Select the appropriate value. The available values are:</p><ul><li>Archive</li><li>Duplicate</li><li>Change Password</li><li>Disable two-factor authentication</li><li>Send Password Reset Instructions</li><li>Privacy Lookup</li></ul></td></tr><tr><td><img src="/files/KhfA3m0IfGNNDXtevFEj" alt="" data-size="original"></td><td>Save manually the individual data and exit from the screen.</td></tr><tr><td><img src="/files/6HreBBrA7iTswVG4kUKT" alt="" data-size="original"></td><td>Discard changes and exit from the screen.</td></tr></tbody></table>

<figure><img src="/files/dp2tak5xtP9N4IoZtNpS" alt=""><figcaption></figcaption></figure>

## Configuration

4. Click the tab ***Configuration*** in the menu bar.

***Configuration*** screen is displayed.

<figure><img src="/files/aDCjuzHCKH9sf7BdYIuY" alt=""><figcaption></figcaption></figure>

5. Click the ***New*** button.

***Configuration New*** screen is displayed.

<figure><img src="/files/WMkIufqhT7bptdz9T5xQ" alt=""><figcaption></figcaption></figure>

The fields and their descriptions are given below.

| Field                   | Description                                                            |
| ----------------------- | ---------------------------------------------------------------------- |
| ***ODK Configuration*** |                                                                        |
| Name                    | Enter the name for the ODK importer.                                   |
| Base URL                | Enter the URL of the ODK Central.                                      |
| Username                | Enter the username which is used to log in ODK Central                 |
| Password                | Enter the password which is used to login ODK Central                  |
| ***Project details***   |                                                                        |
| Project                 | <p>Enter the project number.</p><p>For example, 3</p>                  |
| Form ID                 | <p>Enter the ID of the form.</p><p>For example, Safety-Net-Program</p> |

**Sample ODK form URL**

<figure><img src="/files/F4O3BFhogJy2DzxYA3GN" alt=""><figcaption></figcaption></figure>

### Test Connection

***Test Connection*** feature establishes the connection between ***ODK Central*** and ***SR***.

7. Click the ***Test Connection*** button.

If the ***Test Connection*** feature connects the ***ODK Central*** and ***SR*** successfully, a successful message pop ups.

<figure><img src="/files/8fKropP9XblpQAZObzpg" alt=""><figcaption></figcaption></figure>

If the ***Test Connection*** feature unable to connect the ***ODK Central*** and ***SR***, an error message pop ups.

<figure><img src="/files/MIs9UUSvNJaCkU5ZykS6" alt=""><figcaption></figcaption></figure>

8. Click the ***OK*** button to exit the dialog box.

### Import Records

***Import Records*** feature imports and stores the records in SR.

9. Click the ***Import Records*** button.

If the ODK form is imported successfully, a success message pops up.

<figure><img src="/files/TK57oJB7Rbja66BOVWMC" alt=""><figcaption></figcaption></figure>

If no new ODK forms are submitted, ODK form records will not be imported.

<figure><img src="/files/DBQcxjPxFxCiidAeVQa1" alt=""><figcaption></figcaption></figure>

You can find the configuration details in the ***ODK Configuration*** screen and imported ODK forms' status in the ***ODK Import*** screen.

This completes the process of importing an ODK form from ODK Central into the SR.

### JSON Formatter

Configure the required fields based on the ODK form field using pyjq JSON formatter.

**Sample JSON Formatter**

<figure><img src="/files/3iHJg8OEBWo1U1V9OYMk" alt=""><figcaption><p>JSON Formatter</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.openg2p.org/1.3/social-registry/features/odk-importer/user-guide/configure-and-import-odk-form.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
