Versions Compared

Key

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

Overview

CommConnect

Table of Contents
maxLevel3

Messaging can also be set up to allow users (mobile workers or cases) to initiate interact with the system themselves.  For example, a mobile worker may want to register a new beneficiary or a beneficiary may need to request a service or report some information.This type of functionality is  This functionality can be setup through through SMS Keywords.  

A mobile worker or case  can can message the keyword to a CommConnect an HQ phone number.  This will trigger a form to be run for the user.  Some  

For example, a mobile worker may want to register a new beneficiary or a beneficiary may need to request a service or report some information.

Some caveats:

  1. Only known phone numbers can use keywords.  To allow users to register themselves in the system, see SMS Self Registration
  2. If a Mobile worker phone numbers cannot trigger forms that depend on a case.  There is no functionality to allow mobile workers to select a case.sends in a keyword to initiate a form that normally requires the user to first select a case from the case list, then they will also need to provide the external ID for that case.
    For example, if you have keyword "edit" tied to a form that updates a case, the mobile worker will need to send in "edit <external_id>", where <external_id> is the external_id case property of the case they wish to open the form for.  This is true for both normal keywords and structured SMS.

Start Keyword Setup

To setup the reminder, navigate to www.commcarehq.org/a/<yourprojectname>/reminders.  In the keyword, choose the Messaging tab, then In the left side bar, select "Keywords", then click .  Click the "+Add Keyword" button.

Image RemovedImage Added

Keyword: SMS Response

When setting up a keyword, you need to specify the following:

Basic Information:

...

  • Keyword: This is the word that the user will message to initiate the interaction.  Keywords need to be unique within a project.

...

  • One SMS Per Question: The user will be able to respond to one question at a time and will receive the next question after answering.  This is how SMS surveys work for reminders.
  • All Questions in One SMS: The user will be able to send a single SMS that answers all questions in the form.  This is useful if the user knows all the questions and can easily answer them in a single line.  See details below. 
  • Description: A description for the keyword does.  

Image Added


Respond to Sender

    • Send: This controls what is sent to the person sending the keyword (a simple message or an SMS survey)
    • Survey or Message: The survey or message to send

Image Added

Notify Another Person:

This will let you notify another contact when someone sends  a message to the keyword.

  • Recipient: The person to send the message to, a mobile worker group or the case's owner if the message was sent by a case. 
  • Send: This controls whether to send the person an SMS message or a survey. 
  • Survey or Message: The survey or message to send. 

Image Added

Advanced Options: 

Restrict Keyword Initiation: Restrict the type of contact who can use this keyword. Use 'Case Only' if you want to escalate messages to the Case Owner. 

 

 

Once you've specified the keyword and form, save the keyword. 

Set Up All Questions In One SMS (Structured SMS)

If the Answer Method is changed to All Questions In One SMS,

Keyword: SMS Survey

Image Added

Advanced Options: 

  • Override open SMS Surveys: Sending in this word will override any existing surveys that the user is currently filling out and trigger this keyword. 

Notes: 

  • SMS Surveys can have conditional triggers, for example send a satisfaction survey after a clinic visit. 
  • By creating a keyword, you can simulate that condition, and test an SMS Survey in a reliable way. 

Keyword: Structured SMS with Custom Delimiter

If the you choose Structured Keyword, if you want to send in all of your SMS questions at once.

The users are able to send an SMS that looks like <keyword> <answer1> <answer2> <answer3> etc.

The defaults assumes that the user provides answers to each question, separated by spaces.  This will work well for most situations.  However, there are additional options available: 

Image Added

Custom Delimiter

To setup a custom separation character, check the custom delimiter option and choose the characters you want to use to separate each answer. This could be a "," or "|" or even multiple characters like "||".  

This example below uses a period (.) as a custom delimiter.

  • Custom Delimiter: This is useful if you want to use something else to separate each answer.  For example, if you any of your answers have spaces, the default separator of a space will not make space. 

Keyword: Structured SMS with Named Answers

: This allows

Named Answers

Named Answers allow users to skip questions or answer questions in a different order.

 This

This works by allowing the user to provide an identifier for each answer.

Ex, they would send a message that looks like <keyword> a:<questiona> b:<questionb>

A summary of what a sample SMS will look like is shown at the bottom of the page. 

Image Removed

Custom Delimiter

To setup a custom separation character, check the custom delimiter option and choose the characters you want to use to separate each answer. This could be a "," or "|" or even multiple characters like "||".  

Image Removed

Named Answers

To use named answers, check the named answer option.  You can then specify the name  

Specify the Name that the user enters, and the question (via xpath in the form) that it maps to.  For  

For example, you may want to to map the name "a" to the question /data/age.  This is setup as shown.  It is also possible to add a character to join the name and the answer (ex. a ":").  This is also shown.

Image Removed

map two properties

  • /data/name to "name"
  • /data/household_size to   "members"

By adding a joining character, the name and the value are paired together. The joining character in this example is a semi colon : .  

Image Added

As you build your Named Answers set-up, look at the Example Structured Message to understand how the message should look. 

Both of these examples are valid options

  • visit name:123 members:456
  • visit members:456 name:123