-
Notifications
You must be signed in to change notification settings - Fork 15
Program Setup
Yes, currently, each client has a dedicated instance. However, the plan is to migrate all clients to a single, general instance in the future.
-
Prepare the Kobo Form:
- Ensure all fields in the program have a
label
(including calculated fields and scope). - Include all mandatory questions, which must be either calculated from other questions or static defaults for all registrations:
fspName
maxPayments
preferredLanguage
- The answers to these mandatory questions must align with the options available in 121.
- Add "Program configuration" questions for attributes shown on the Overview page and other metadata.
- Refer to this Template XLS Form (Last 21 rows) to see required program configurations.
- Fields like
fullnameNamingConvention
,language
, andfinancialServiceProviders
can contain comma-separated values—this feature is still under review.
- Ensure all fields in the program have a
-
Add Tags for Specific Questions:
-
FSP Questions: Prevent these questions from being recreated.
-
Deduplication Questions: Mark questions for deduplication.
-
How to Tag:
-
Using XLS Form: Add a
hxl
column and use the following tags:-
#121+dedupe
for deduplication -
#121+fsp
for FSP questions
-
-
Using Kobo Builder: Go to the question, click
Settings
, and add the HXL tags.
-
Using XLS Form: Add a
Note: A field can only have one tag. If a field is both an FSP question and for deduplication, update the FSP question via API endpoints on an instance level.
-
-
Configure FSP Questions:
- The internal names of FSP questions must match those in 121, or the Kobo Connect headers must be adjusted.
- Each FSP has a standard set of questions. For example:
- Visa: street, postal code, etc.
- AH voucher: phone number
- Obtain related FSP questions and internal names using
GET /api/financial-service-providers
.
-
Phone Number Formatting:
- The field name should be
phoneNumber
. - Include the country code in the phone number.
- The field name should be
-
Dropdown Questions in 121:
- Dropdown questions cannot be empty, so ensure that a value is provided even if skip logic results in the question being empty.
- The default answer option must also be in 121.
Tip: If dropdown fields might expand in the future (e.g., location options), consider configuring these fields as text in 121. If a field is a dropdown and an unlisted option is selected, the registration will fail.
-
Setting Up the Program in the Menu:
- Go to "Create program" in the menu.
- Set the Kobo Token and Kobo Asset ID:
- Kobo Token: Obtain it from kobo.ifrc.org/token (requires login with a user that has access to the Kobo form).
- Kobo Asset ID: Find this in the URL of the Kobo form in the 'back-end' (kobo.ifrc.org/#/forms/[assetID]/summary).
-
Create a Kobo User for the Instance (if not already done):
- Use
POST /api/financial-service-providers
. - Add this Kobo user to the program team with a role restricted to creating registrations.
- Navigate to the program via the Home page, click
Team
in the program menu. - Example:
- Navigate to the program via the Home page, click
- Use
-
Add Required Headers to the REST Service in KOBO:
- URL:
https://kobo.ifrc.org/#/forms/**[assetID]**/settings/rest
- Headers:
-
url121
: e.g.,https://training.121.global
-
username121
: The email of the Kobo user, e.g.,[email protected]
password121
-
programid
(if necessary)
-
- URL:
-
Test the Setup:
- Ensure everything is working as expected.
-
Program Creation Fails:
- Ensure no dropdown options are set to NaN (especially when using
xlsTo121
). - The admin role must be set up in the instance, though the admin user does not need to have this role assigned.
- Ensure no dropdown options are set to NaN (especially when using
-
Kobo Connect Issues:
- Dropdown questions in 121 cannot be empty. Ensure a default answer is posted if necessary.
-
phoneNumber
must always be included in the payload, though it can be empty ifallowEmptyPhoneNumber
is true.
- Distribution Frequencies: (To be added)
-
Program Questions:
-
answerType
must be one of the following: numeric, dropdown, tel, text, date. -
questionType
must be one of the following: standard, custom.
-