Popular Help Content
- All Phone Numbers Must Be Unique.
If a phone number is shared with another CommCare Messaging-enabled case or verified or a mobile worker (even in another project), messages will not be sent. To address this issue, close at any other cases using that phone number or delete the verified number from the mobile worker.
- Verifying a Number
The example above automatically marks an added phone number as verified. Alternatively, you may have the health worker tries to call or text the user. Once this has been done successfully, they can use a form to set the value of contact_phone_number_is_verified to 1.
- Advanced Case Configuration
CommCare Messaging requires a certain set of properties to be included in the case.
- contact_phone_number - (required for SMS) This is the phone number to send messages to. It should include be in international e.164 format, which generally means it should have the country code first (ex. 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 number before prepending the country code. It should not have any spaces, dashes or other punctuation. For example, both "1206618132315551234567" and "910981231234919812345678" are valid values. "1-206-617-1234" will not work.
- contact_phone_number_is_verified - (required for SMS) This should be set to "1" to indicate that the phone number has been verified and is a real number.
- commcare_email_address - (required for Email) This is the email address of the contact if you wish to send emails to the case.
Expand title [Optional] Contact Back End, Languages and Time Zones
[optional] time_zone - This specifies the time zone of the phone number. If messages are sent to the case at a particular time, this time zone will be used. Otherwise, UTC will 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".
[optional] language_code - For an SMS survey available in multiple languages, this specifies which language to use when running the survey. This should match the language codes specified when defining the application on CommCareHQ. For example this would be set to "en" for English or "hin" for Hindi.
[optional] contact_backend_id - This specifies which SMS provider to use when sending SMSs to the number. This is normally done once for a project. In advanced situations, you may want to have different gateways for each contact. Please see Setup SMS Connection for Project to view the list of available gateway options.