Registering a Case Contact

In addition to registering users as messaging contacts, you can =
also register a case as a messaging contact. This can be useful when you ha=
ve beneficiaries you are registering and you want to send them messages.

Case Properties

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

Case Property

Required

Description

contact_phone_number

Required for one-way SMS

This is the phone number to send messages to. It=
should be in international e.164 format, which generally means it should h=
ave the country code first (e.g., 1 for the USA or 91 for India) and then t=
he rest of the phone number. Depending on the country, you may need to remo=
ve the leading zero from the national number before prepending the country =
code. It should not have any spaces, dashes or other punctuation. For examp=
le, both "15551234567" and "919812345678" are valid values.

contact_phone_number_is_verified

Required for two-way SMS

Set 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). On=
ly 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 fi=
rst will own it for two-way.

commcare_email_address

Required for email

Set this to the contact's email address to send =
email content to them.

time_zone

Optional

This 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 ti=
me zones can be found by going to Project Settings and viewing the list ava=
ilable for "Default Timezone".

language_code

Optional

If you translate the messages in y=
our alerts, you can set the contact's preferred language here. This value s=
hould match the language codes that you define on the SMS Languages page.=
td>

contact_backend_id

Optional

If you want to use a specific gate=
way for this contact and override any default gateway choosing behavior tha=
t the system would otherwise do, you can specify the name of that gateway h=
ere.

Errors

If you happen to run into errors during the registration and testing of =
SMS messages, you can review our error message descriptions here.