Setting up a location-based mData

You can set up an mData search that returns a response based on location coordinates or street addresses.

Before you begin, be sure to have the following in hand:

  • A list of one or more keywords available on the short code you will use for your searches. For more information, see Adding keywords for mData searches.

  • A list of input/output pairs (keyword or search term input and response output based on location coordinates or street addresses) to populate the mData database. For more information, see Creating and uploading an mData spreadsheet.

For information on setting up an mData search that is not based on location, see Setting up a non-location mData.

To set up location-based mData searches:

  1. Select Text Messaging Text Messaging in the left pane, and then select mData.

  2. At the top of the page, select New mData New mData.

    The New mData form opens.

    New location mData

  3. In the mData Details section, enter a descriptive name for the mData.

    Note: Even though this name is available to internal users only, take the opportunity to assign a descriptive name that is meaningful to your organization.

  4. If more than one short code is available to your company, select the short code from the drop-down list.

  5. In the How do you want to build your application? section, select Upload a spreadsheet or manually add new rows.

    New location mData

  6. In the How will users interact with your service? section, select Text a keyword and search term.

  7. (Recommended) Leave the Send all future replies to this mData, even without a keyword option selected.

    This option allows users to send consecutive searches for the same keyword for up to 72 hours. For example, if a user texts Boston veterinary clinics, mData returns a list of veterinary clinics in Boston. If the same user then texts animal shelters, mData returns a list of animal shelters in Boston.

  8. Select the Geocode the inputs and allow users to text a location checkbox.

  9. Select the settings for the search results:

    • In the Limit field, select the location range for the search results, up to 50 miles.

    • Select the number of results to return, up to 4, starting with the closest. This option is available only to results from an uploaded CSV file.

  10. New location mData

  11. In the Response Defaults section, review each of the default error messages and make any changes in the corresponding text box.

    • The Default/Error response is sent when mData does not recognize the search query sent by the user.

    • The No Results Found response is sent when the search query sent by the user does not return a result.

  12. When you are done, select Create.

Adding keywords for mData searches

You can add one or more keywords to the short code that you will use for your searches.

Tip: If your mData is a keyword search type, take the time to brainstorm user-friendly keywords.

To add keywords:

  1. Select Text Messaging Text Messaging in the left pane, and then select mData.

  2. Locate the mData in the Active mDatas table or Inactive mDatas table, and then select the mData name link.

    The mData page opens.

  3. Select Actions at the top of the page, and then select Keywords.

    The Keywords table for the short code opens.

    Add keyword

  4. Type a unique keyword or keyword phrase (between 2 and 20 characters) in the Keyword field above the table.

    Tip: Do not use special characters in your keywords. If you enter a keyword phrase, use a space between each word, not a period (.) or an underscore (_).

    Mobile Commons validates the keyword to determine that it is available. If the keyword is not valid or available, you cannot add it. Try to add another keyword.

  5. If the keyword is valid and available for your short code, select Add.

  6. When you are finished, select Done.

Creating and uploading an mData spreadsheet

To build the mData database, you can upload a spreadsheet with input/output pairs. Mobile Commons provides a template to help you create a properly formatted spreadsheet.

Caution: If you are updating a database file, be sure to include all entries in the database, not just new additions, because the new file will overwrite the existing mData database.

To create and upload an mData spreadsheet:

  1. Select Text Messaging Text Messaging in the left pane, and then select mData.

  2. To download the template, select Actions at the top of the page, and then select Download CSV template.

    The template includes two columns, headed input and output.

  3. Using the column headings in the template, build your mData input and output pairs, using the following guidelines:

    • Enter location coordinates (longitude, latitude) or street addresses, which can be converted to geolocation data, in the Input column.

    • Add the corresponding description in the Output column.

    Pay attention to the length of the responses. Messages over 160 characters will automatically be broken up into two text messages.

  4. Save the file in CSV format with a new name.

    Tip: Be sure to save the file in CSV format; other file types will not be accepted.

  5. When the mData spreadsheet is complete, locate the mData in the Active mDatas table or the Inactive mDatas table, and then select the mData name link.

    The mData page opens.

  6. Select Actions at the top of the page, and then select Upload database.

    The Upload CSV page opens.

    Upload CSV

    • To upload a CSV file, select Choose File, navigate to the CSV file to upload, and then select Open.

    • To upload a few entries, copy the input/output pairs into the text box, under the input,output headers. Be sure to add a comma between input and output entries.

  7. To validate the input/output pairs, select Preview Entries.

    Preview entries

  8. Review the entries in the file, and if they are correct, select Create mData Entries in the lower-right corner.

    Test an mData query

  9. To test the mData search, enter an input term in the Query field and then select Test!

    Note: You do not need to use keywords when you test your mData search, but the keyword is required when texting an mData query from a mobile phone.