Handling regular users vs casual users via the text channel

February 15th, 2011 by John Dyer

Typically you will find that your applications have two types of users, the regular user and the casual user.  The difference is based on experience, some users know how to interact with the application because they are regular users, others need some instructions.  This is especially evident in a Text channel application, such as an Instant Message or SMS, where the regular user might message with the expected value right away – for example, providing the answer to the expected question before you actually asked the question, such as a zip code:

In this scenario we can save ourselves, and the user, the trouble of sending them instructions. However, the uneducated user may send a “hi” or “hello” or any number of initial responses to your application; you will need to handle each type of user appropriately in your application.

Doing so is pretty simple, you just need to use the $currentCall object’s initalText parameter, and check the value to see if it’s what your looking for. I fashioned a quick example below that can help get you started!

fruit_list = "apples, oranges, pears"

log "@"*10 + " " + $currentCall.initialText

    if fruit_list.include?($currentCall.initialText)
        result = ask "What's your favorite fruit? apples, oranges, or pears?", {:choices => fruit_list}
    else
        ask "",{:choices=>'[ANY]'}
        say "Hello and welcome to the fruit guessing game"
        result = ask "What's your favorite fruit? apples, oranges, or pears?", {:choices => fruit_list}
    end
        say "I like #{result.value} to"
        say "see ya later!"

All we do here is check the value in initialText to determine if we need to handle it as an acceptable utterance against our choice / grammar. If it’s a zipcode, you could just check to see if its numeric. You can get as complicated or as simple as you want, the choice is really entirely up to you.

I do hope this helps!

-John

Related posts:

  1. Free at 12noon US Eastern today? Join a VoIP Users Conf call about Tropo
  2. Changes to Tropo Channel Support
  3. How to Send & Receive SMS Text Messages Using Tropo and Ruby
  4. Simple JavaScript SMS API: Text Messaging with Tropo
  5. Get a text message when someone calls your app

Tags: , , , , ,

One Response to “Handling regular users vs casual users via the text channel”

  1. [...] examples, tutorials and videos. As I was catching up on my Twitter feed this morning, I noticed a great post there about responding differently to different types of users and a short video about using SMS to find the time and date of tweetchats. Cool [...]

Leave a Reply

Please note: By submitting a comment you agree to comply with our Comment Policy. We welcome all comments, positive or negative, but do reserve the right to remove all or part of blog comments that do not comply with our policy.

Additionally, the first time you leave a comment on this blog, it will be held for moderation. After that first comment has been approved, future comments will be posted without delay.

Additional comments powered by BackType