SMS Functionality DHIS2

Dear DHIS2 Community,

We would like to configure the SMS functionality in DHIS2 and want to collect data via SMS.

We are using the application available on your GitHub repository (Link Below) and documentation as the SMS gateway.

SMS Gateway Application Link: Releases · dhis2/dhis2-sms-android-gateway · GitHub

For the testing purpose, we have configured a simple form, as shown in the screenshot below:

Below is our SMS command configuration:

We are sending the SMS in the following format; however, it is not working as expected. Although the system indicates that the SMS is processed, the data is not being assigned to the correct organization unit.

COVID PK CN=24

is there any guidance on the correct SMS format and commands, and how to includes details for the reporting period and organization unit?

any guidance and support will be highly appreciated

Thank you!

Hi @sami12111
Thanks for your detailed post! :slight_smile: :+1:
I noticed a couple of things in your code:

You’ve not configured the field separator or is it actually set to an empty space?


If it’s not an empty space then according to the docs, the default is “|”.

PK here is not defined anywhere so why is it included in the code.

Please check: Configure SMS - DHIS2 Documentation

Hi @Gassim ,

Thank you for sharing the documentation link. I have already reviewed it; however, I could not find any information on how to define the details for the organization unit and reporting period in the SMS. is there any guide available on this?

The field separator was set to blank space.

Thank you!

1 Like

Hello @sami12111,

I have added a few hints about the period and orgunit in the JIRA ticket you created for this Jira.

Hope we can get to the issue :slight_smile:

1 Like