Location configuration for logistimo applications
Edit me
Pre-requisites
Following services should be successfully deployed
- Logistimo service
- Location service
Adding Locations
Locations are arranged in terms of administrative units. Hierarchy of administrative units supported in the system is Country –> States/Provinces –> Districts/Counties –> Subdistricts/Subcounties. Please note that administrative units terminology may differ from country to country.
Following is the schema definition for locations in json format:
{
"data": {
"<country-code>": {
"name": "country-name",
"states": {
"state or province name": {
"districts": {
"district or county name": {
"taluks": [
"comma separated subdistrict or subcounty names"
]
}
}
}
}
}
}
}
An example configuration with data for Kenya and its provinces.
{
"data": {
"KE": {
"name": "Kenya",
"states": {
"Central": {
"districts": {
"Nyandarua": {
"taluks": [
"Kipipiri",
"Ndaragwa",
"North Kinangop",
"Ol Joro Orok",
"Ol Kalou",
"South Kinangop"
]
},
"Nyeri": {
"taluks": []
},
"Kirinyaga": {
"taluks": []
},
"Muranga": {
"taluks": []
},
"Kiambu": {
"taluks": []
}
}
},
"Coast": {
"districts": {}
},
"Eastern": {
"districts": {}
},
"Nairobi": {
"districts": {}
},
"North Eastern": {
"districts": {}
},
"Nyanza": {
"districts": {}
},
"Rift Valley": {
"districts": {}
},
"Western": {
"districts": {}
}
}
}
}
}
Note
- For country codes, use Alpha-2 two letter country code defined as in ISO_3166-1 standard.
- Only user with
Superuser
role can add or edit location configuration. - Also, care should be taken while adding new locations to append the new country data to existing json while confirming to the schema defined.
- City or village information need not to be there along with locations json. It should be provided while creating users or stores as on the respective web form pages. System will take care of adding city or village in Location service.
Steps to update locations in the system
- Navigate to the following section, and choose configuration type as locations.
Home->Manage->System configuration
- Add/Edit the location json there and then Click “Save”.
- Click the “Add new Locations to locations service”. Ensure this is done after saving the configuration.