Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

This describes how to setup a form that will register a case (or contact) for use with Messaging.  This form can then be used in a number of ways:

  • By a mobile worker to register contacts using SMS
  • Through a CommCare phone application
  • Through the CommCareHQ web data entry (Using Web Apps).  

Messaging only supports a single phone number in the case.  For example, while you may be able to store both both a mother and husband's phone number in the case, only one of the two will be supported for Messaging. In addition to registering users as messaging contacts, you can also register a case as a messaging contact. This can be useful when you have beneficiaries you are registering and you want to send them messages.

Info
titleSelf RegistrationImportant

If you'd like users to register themselves for the system, please view SMS Self Registration.

Preparation

It is recommended that you complete the Beginner Tutorial and the Basic Case Management Tutorial before running through this.  

Setup

...

  1. Question ID is the variable name for the name.  Just use name
  2. Display Text: This is what will actually be asked on the phone or through SMS for this question.  Set the text to "What is the contact's name?"

...

Image Removed

Now that the form is created, you can use it to register new contacts, either through SMS (for your field staff), or using a phone number.  

Registering New Users through SMS

A mobile worker (field staff) for your project can register contacts/participants using SMS from their phone.  

  1. Follow the instructions to configure a mobile worker to use SMS (Configure a Mobile Worker for Messaging)
  2. Create a new keyword (ex. REGISTER) that will run the Registration form you just created. (Setup SMS Keywords)

Registering New users through a Phone or Web-based Application

As CommCare Messaging is a part of CommCareHQ, you can use a CommCare application (or web application) to register users.  Please follow the Application Building Tutorial Series to learn how to build and deploy phone/web based applications.  

Notes/Advanced Configuration

...

Make sure you understand Case Management well before continuing.

 

Case Properties

Below are the case properties to set on a case in order to enable it for messaging:

Case PropertyRequiredDescription
contact_phone_numberRequired for one-way SMSThis is the phone number to send messages to. It should be in international e.164 format, which generally means it should have the country code first (

...

e.g., 1 for the USA or 91 for India) and then the rest of the phone number. Depending on the country, you may need to remove the leading zero from the national number before prepending the country code. It should not have any spaces, dashes or other punctuation. For example, both "15551234567" and "919812345678" are valid values.
contact_phone_number_is_verified

...

Required for two-way SMSSet this to the value 1 if you want this contact to be able to use two-way SMS (that is, to send replies to the system). Only one contact can hold a number for two-way SMS so if another contact has registered the same number for two-way SMS, the contact who registers it first will own it for two-way.
commcare_email_address

...

title[Optional] Contact Back End, Languages and Time Zones

...

Required for emailSet this to the contact's email address to send email content to them.
time_zoneOptionalThis specifies the time zone of the

...

contact. If messages are sent to

...

this case at a

...

specific time, this time zone will be used to interpret those times. Otherwise,

...

the project's time zone will be used. For example, to set US East Coast Time as the time zone, this should be set to "America/New_York". A full list of available time zones can be found by going to Project Settings and viewing the list available for "Default Timezone". 

...

language_code

...

OptionalIf you translate the messages in your alerts, you can set the contact's preferred language here. This value should match the language codes

...

that you define on the SMS Languages page.
contact_backend_id

...

OptionalIf you want to use a specific gateway for this contact and override any default gateway choosing behavior that the system would otherwise do, you can specify the name of that gateway here.