Archive for January, 2009

Note: Developer portal upgraded to WordPress 2.7

Thursday, January 29th, 2009

Tonight this developer portal was upgraded to run WordPress 2.7. As far as I can tell, everything seems to be in order.  All links and downloads appear to be working fine.  However, if you find any issues while using the site, please either leave a comment here or send me email to let me know.  Thank you.

Building Better Phone Applications with Eclipse

Wednesday, January 28th, 2009

Only on the dark side of the moon could you have missed the impact of the iPhone. Its sweeping success has brought mobile services to the mainstream. As the first device to convincingly integrate traditional phone capabilities with Web access, it highlights the multi-channel shape of things to come.

Mobile Web currently has its time in the limelight. But in truth, “mobile applications” have been with us for quite some time. Think phone banking, or sending a text message to check on your remaining pre-paid minutes.

Doesn’t sound right? That’s because in terms of convenience and usability, phone applications have historically played in the minor league. When visiting eBay, have you ever been asked to “look carefully, because the order of our menu options may have changed”? When returning to Amazon, did you ever need to navigate through five levels of menus just to see whether your order has shipped? It’s with the focus on the user that Web applications have set a new standard: dynamic adjustments based on identity, preferences, and past interactions, as well as on-the-fly personalization create a custom experience that makes you want to come back.

In this article, we explore how to build innovative applications that bring the success of the Web to all phone channels. And it’s easier than you may think, by utilizing the latest tools and techniques available to developers.

Phone Channels

As different as the phone channels mobile Web, voice, and text may be, they actually have quite a lot in common. Users on the go are users with a goal. Instead of just browsing to pass the time, they want to get a specific job done. They want to track an order, pay a bill, or check a movie show time. Some may want to do it by sending a text message, some by going to a Web site, and some by calling an 800 number. Yet all of them want to do it as efficiently as possible, with a focus on their goal.

Applications ought to be mindful of this need for efficiency, as it relates to both the caller interaction and presentation design. Limited bandwidth across all the different phone channels needs to be taken into account from the start to achieve an optimal caller experience. The W3C has assembled a valuable set of guidelines that can serve as a check list:

  • Keep content consistent and structurally simple
  • Provide easy means of navigation
  • Avoid free text input whenever possible
  • Use small individual markup documents
  • Avoid embedded objects or scripts

Developers face the flip side of the callers’ requirements: They need to efficiently build and maintain applications that serve multiple phone channels and act consistently across all of them.

The backbone of application development is the core path of interaction between caller and system, the “dialog flow”. As pointed out above, mobile applications are focused on achieving a caller’s goal. They typically go through a number of steps to gather information (such as an amount of money and a recipient) to then perform a transaction (such as transferring money). This basic flow remains the same across different phone channels, though what is presented as a yes/no question in the voice channel may be a radio button in the mobile Web channel. The development environment needs to be able to isolate the channel differences and allow developers to first focus on the commonalities when building the dialog flow. Once this is in place, there must be an efficient way of selectively applying channel- and caller-specific modifications to achieve the adaptive and personalized experience callers have rightly come to expect.

Likewise, the communication with backend systems needs to be integrated across all phone channels. Since this is the place where most of the custom coding is required, seamless interaction with proven SOA frameworks must be ensured. Finally, interoperability with complementary tools to serve the needs of individual channels, such as audio file or speech recognition grammar management, is required.

Architecture

Through the success of standards like VoiceXML, the previously disparate worlds of Interactive Voice Response (IVR) and Web have merged. So not only do callers get to benefit from better applications, but developers’ lives have been made easier by a unified architecture that provides more flexibility, scalability, and interoperability while allowing for faster turnaround than ever before.

 

The standard architecture for multi-channel phone applications today consists of the following:

  • a unified service creation environment based on the Eclipse framework,
  • a unified service execution environment based on a phone application server, and
  • a unified backend infrastructure based on a service-oriented architecture (SOA).

In the remainder of this article we focus on the service creation environment to see how it helps developers create a better experience for callers.

Eclipse Framework

Eclipse provides an open framework to combine best-of-breed tools into a powerful integrated workbench. Instead of having to make compromises when selecting a monolithic IDE, developers can pick and choose what suits them best from a wide variety of open-source and commercial components. Acting as plug-ins within the Eclipse architecture, these components blend into the overall workbench and smoothly interact with each other.

The benefits of this approach are particularly strong when building multi-channel phone applications, since dedicated tools can be used for the specific technical needs of the different channels. Even better, many of these tools are available as free downloads such as the ones we take a closer look at here.

VoiceObjects Developer Edition is a comprehensive multi-channel framework, which provides integrated support for the voice, video, text, and Web channels. Included are a graphical IDE as well as an embedded phone application server for one-click testing and deployment. Applications are built using an object-oriented approach on the basis of a set of core components modeling caller interactions as well as backend integration and application logic. Rapid prototyping and object re-use are facilitated by a drag-and-drop GUI.

Adaptive personalization is achieved through the concept of “layers”, which also covers topics such as multi-lingual or multi-persona applications. Integrated testing and debugging is available for all phone channels, including a Phone Simulator that shows text and Web applications as they would look on a variety of mobile handsets. To test voice applications end-to-end Voxeo’s Prophecy is the ideal choice.

Grammars are an important aspect of voice application development. Things a caller might say, such as “There’s a problem with my bill” or “Transfer five hundred dollars”, must be modeled so that the speech recognition engine can successfully understand them. Nu Echo’s NuGram IDE offers a suite of tools to efficiently manage these grammars. Productivity features such as auto-completion and on-the-fly validation assist in building grammar rules. For testing and tuning, sample caller utterances can be parsed to analyze grammar coverage and ensure correct semantic interpretation.

Access to backend systems is a crucial part of development regardless of the channels served by an application. Within the Eclipse eco-system, several frameworks are available to help with this task. Two important ones are the Web Tools Platform (WTP) and the SOA Tools Platform (STP).

For simple or one-off tasks, JavaServer Pages (JSPs) are often the solution of choice because of their low overhead and straightforward integration of static and dynamic content. The WTP offers a rich set of features to support their development, testing, and deployment.

For more complex and reusable tasks, Web services are the preferred way to go. The STP provides a broad scope of capabilities covering SOA aspects from business process modeling and service orchestration to code generation, deployment, testing, and documentation.

The Eclipse plug-ins highlighted here, apart from being excellent tools in their own right, offer the added benefit of smooth interoperability within the Eclipse workbench: You can check and tweak a speech recognition grammar while looking at the dialog flow that reacts to the corresponding caller input. You can adjust the application logic with simple drag-and-drops while building the Web service code that connects to the backend. For the first time, developers have simultaneous control of all application aspects without the need to switch between IDEs, or to compromise on features when selecting a single environment.

Summary

Mobile applications are here to stay.

Users have come to depend on retrieving information and performing transactions on-the-go. And they expect the same level of convenience and efficiency they know from home – regardless of whether they call an 800 number, send a text message, or visit a mobile Web site. The challenge lies with the developers to efficiently deliver multi-channel phone applications that adapt dynamically to each caller’s needs and expectations.

The merging of IVR and internet technologies has made it possible to apply the lessons learned on the Web to all phone channels: Benefit from a scalable multi-tier architecture centered on an application server. Unify backend access through the use of Web services and SOA.

On the IDE side, the Eclipse framework has provided the fertile ground on which a multitude of interoperable plug-ins has sprung up that presents developers with a comprehensive suite of capabilities. Every aspect of multi-channel application development can be addressed – and not in isolation, but in correspondence and coordination with each other.

Just as importantly, most of these Eclipse plug-ins can be downloaded for free, giving developers a choice and allowing them to evaluate each tool’s respective benefits.

Never before has it been easier to get from idea to implementation. The flexible and scalable infrastructure is in place, and the tools to realize innovation are in the developers’ hands.

The time for better phone applications has finally come.

Personalization using Layers – Part I

Tuesday, January 20th, 2009

You are going to develop a personalized and flexible phone application? Okay, bad news first: You may get into hot water, if you are not able to ensure a manageable application definition because of increasing complexity. The good news is that VoiceObjects Desktop and VoiceObjects Server have been designed to cope exactly with this complexity, what makes your life much easier.

 

Sure, you are right: In most of today’s phone applications personalization is key, because it allows for adapting the user interface

  • to individual users, e.g. by preferred language, persona or input mode,
  • to user segments, e.g. post-paid customer vs. pre-paid customer, or novice user vs. power user, and
  • to other relevant conditions, e.g. workday vs. weekend, happy hour vs. unhappy ;-) hour, or back-end available vs. back-end unavailable.

Real-life applications typically apply a combination of different conditions in order to offer the best suited user interface under certain conditions to a certain user. Additionally those conditions should be dynamically changeable at call time, e.g. to switch to another dialog language instantly at any dialog step. In the same way a web application server enables personalized web sites, the VoiceObjects phone application server supports personalized phone applications.

 

And it is not just about delivering the highest quality of service to your users! VoiceObjects Server based personalization also helps to relieve the media platform or browser from processing all these conditions during each call, ensuring best media platform performance during dialog execution. In other words: In a VoiceObjects setup the browser is used for dialog presentation, but VoiceObjects Server is responsible for any business logic and cares for “handpicked” (dynamic) dialogs for each user. Additionally all applied dialog conditions are automatically logged into the system database (Infostore), and the out-of-the-box reporting of VoiceObjects Analyzer can be used to analyze which conditions have been applied when and how often. Last but not least, you can apply these conditions as selection criteria (so-called dimensions) to other statistics, in order to analyze and compare user behavior, task completion or recognition scores in more detail.

 

VoiceObjects allows for such powerful applications by offering a single concept, called layers. Layers can be thought of global definitions or filters defined in your application. A developer defines a layer first, and later on applies the layer to each dialog step where this conditional behavior is required. However, in order to use the layer concept to its full capacity, you have to know how to design, configure, switch, apply and manage layer conditions. This article (to be continued) wants to shed some light on what you should keep in mind using layers.

 

Let’s start with an important basic distinction: VoiceObjects Desktop is equipped with standard (meaning application-independent) layers, which are already built-in to other dialog objects. These so-called system layers can evaluate the current dialog language (English-US, Spanish, etc.), input mode (voice / DTMF), phone channel (like voice or mobile Web) and occurrence (visit counter per dialog step). All other (typically application-dependent) layers are so-called custom layers. Each custom layer in your project has to be defined by a Layer object.

 

The second important concept focuses on the switching behavior of layers: Each layer has a set of so-called states, which are switched on or off following a well-defined process and logic. On the one hand automatic layers are switching… (guess!)… automatically, i.e. some internal logic controls which layer states are currently on (active) or off (inactive). On the other hand manual layers have to be switched “manually”, i.e. by calling the Layer function in an Expression object. The same Layer object type is used for defining both manual and automatic layers. By the way, all system layers are manual layers.

 

You may ask: What determines if a custom layer defined by a Layer object should be automatic or manual? Consider the following: Are there any settings (variables or other indicators, like contract number or time of day) which can/should be constantly monitored in order to control the layer states? This would argue for an automatic layer. Or is this layer more dependent on certain events or exceptions and changing more on individual incidents rather than switching frequently throughout the whole dialog? This would call for a manual layer. You should also take into account that a manual layer always has exactly one state activated, whereas automatic layers can have any number of active states (including none or all states). In general, many custom layers can be configured as an automatic or manual layer, and the choice will be a matter of best practice and personal preferences.

 

Looking deeper into the configuration of automatic layers you will notice two alternative mechanisms offered by the Layer object: First a state indicator and sets of indicator values assigned to each state, working like a Case-Else construct, and second state conditions working like pre-conditions per state. Mind that both approaches cannot be mixed in a single layer definition.

 

Typical traps working with layers are:

  1. During development ensure that your state IDs (which will be used internally by VoiceObjects Server during layer processing) are subject to the same restrictions as other object reference IDs, especially use no special characters (incl. space!) and be unique within your project.
  2. Do not try to switch an automatic layer using the Expression function Layer(). This would cause an internal server error at call time.
  3. Do not forget to define the initial (default) state that is required for each manual layer.

 

Feel free to add comments based on your experience working with layers. A follow-up article will continue on some best practices about switching layers and applying layers to your dialog definition, and will provide some more references and examples. Stay tuned!

General Availability of VoiceObjects Developer Edition 7.4

Monday, January 12th, 2009

VoiceObjects Developer Edition 7.4 is available for download now.

Exciting new features of this release include:

  • Support for 2-way SMS dialogs
    VoiceObjects 7.4 has expanded the text channel so that in addition to USSD dialogs text messaging from mobile devices using the Short Message Service (SMS) is now supported. The architecture follows a flexible, extensible adapter approach to be able to support arbitrary SMS gateways. Using the new functionality organizations can extend their automated self-service offerings to additional channels, providing users of mobile phones and messaging clients a powerful and efficient interface. Moreover, new customer groups may be entered by providing a means of interaction that is unmatchable low in cost.

  • Security enhancements
    Two new user roles as well as several new capabilities related to password handling have been added to VoiceObjects user management to support deployments in security-sensitive areas.

  • Newly supported Media Platforms
    Support has also been added in VoiceObjects 7.4 for the media platforms Nortel ICP and Voxeo Prophecy 9.0.
  • New expression functions
    A significant number of new expression functions has been added to enable more convenient manipulation of strings and dates. There is also a new function to easily apply configuration settings in a bulk operation. Visit our blog to learn how the new functions can be used: Exploring the new Expression Functions in VoiceObjects 7.4 and Handling Test Case Data in VoiceObjects 7.4

You can download VoiceObjects Developer Edition 7.4 from
http://developers.voiceobjects.com/downloads/

To learn more about VoiceObjects 7.4  join our Developer Jam Session on January 14th.
Join us to stay up-to-date with the newest release.


Handling Test Case Data in VoiceObjects 7.4

Wednesday, January 7th, 2009
When developing voice applications, you often find yourself in a situation where you don’t (yet) have access to real back-end systems – yet you need to test your application for a variety of different scenarios, each with a different set of parameters, caller data, request and response data from back-end systems, etc.

In short, you need to handle sets of test data, each set representing a certain test case. Of course, there are several options to deal with this, but as of VoiceObjects 7.4, you now have a very elegant solution at our fingertips: The new expression function APPLYCONFIGURATION.

What does it do? Let’s have a look at the inline documentation in the Expression editor:

APPLYCONFIGURATION (configurationXML) – Applies the assignments defined in configurationXML. The XML format used is the same as for application defaults.

Application Defaults

Have you used the application defaults functionality before? If not – it’s simple: It’s about initializing selected variables, layers and collections on the service level. The Service object references an XML configuration file in the Configuration URL field. This configuration XML file will be loaded whenever the service is (re-)deployed. (For more information, check out the section on Application Defaults in the VoiceObjects Deployment Guide.)

The primary use case for Application Defaults is this: When working in multiple environments such as, say, a development, a test, and a production environment, each of those will require some unique configuration settings. For example, database names and credentials might differ, resource locator paths, and any other external settings. By “outsourcing” the initialization of the environment-dependent variables to the “application defaults” configuration XML document (which is bound to the service object, not to the project), the project definition itself becomes agnostic of the environment and can hence easily be taken from “dev” to “test”, and from “test” to “prod”, without applying any changes to the project.

Click to enlarge

Click to enlarge

For an example of a valid configuration XML file, scroll down to the bottom of this posting. In a nutshell, a configuration XML file references any number of variables, layers, and collections in a given project (by reference ID) and defines their initial values.

In-Session Configuration

Now, VoiceObjects 7.4 takes this concept one step further and makes the same mechanism available on a per-session basis: You can do bulk assignments of variables, layers and collections in a single step within your call flow definition, applying different sets of values for each and every call. Of course, this comes in very handy when you need to manage test case data.

Let’s have a look at our Prime Telecom demo application. It supports 3 different languages and 2 different customer types. For each of the resulting 3×2 = 6 combinations, we need at least one test case.

In the previous version of Prime Telecom, these test cases were handled in the traditional way: Within the Preprocessing sequence of the main Module Prime Telecom Portal, a Connector object invoked a JSP, providing the current language and the customer status as request parameters. As response parameters, the Connector’s parameter set contained each and every variable and collection that needed to be initialized – the customer’s postal address, email address, payment information, current tariff, subscribed tariff add-ons, available tariff add-ons etc. Quite a few parameters had to be maintained. And whenever a new parameter had to be added, it had to be added both in the JSP implementation and to the Connector object’s parameter set. Also, the maintenance of the test data in that JSP was cumbersome at best.

Not so any more.

The new implementation of test case data handling in Prime Telecom relies on test data being organized in configuration XML files, each file representing one test case. In Prime Telecom, these files are named configuration_de-DE_platinum.xml, configuration_de-DE_silver.xml, configuration_en-UK_platinum.xml etc.

In the Preprocessing sequence of the main Module Prime Telecom Portal,

  1. a Connector object reads the configuration XML file (via http get) for the current language and customer status and assigns its content to a variable;
  2. this variable is then used as the argument of an APPLYCONFIGURATION expression, setting all required variables and collections at once.
Prime Telecom Portal Module - Preprocessing

The beauty if this solution is that there is only one place to maintain the test data: In the configuration XML documents. When adding more parameters, only the XML documents need to be adapted; the Connector implementation (in our case, some Java code) and the Connector object’s parameter set remain unchanged. Also, the configuration XML documents are much easier to read and hence to maintain than the old JSP.

Of course, there are more use cases to APPLYCONFIGURATION than “just” handling test cases. For example, a hosted service provider could build application templates which become adapted to each customer’s requirements using this mechanism. Also note that, using VoiceObjects’ web service interface, much of the necessary handling could be automated, creating easy-to-use web front ends for end customers.

Example for a valid configuration XML document

This example shows how two objects are being initialized - the variable with the RefID CustomerBaseTariffName, and the collection with the RefID CustomerPaymentSettings. Note that the <type> nodes are optional; also note that collections need to be masked by <![CDATA[ ... ]]> sections.

<?xml version=”1.0″ encoding=”UTF-8″?>
<configurations>
  <configuration>
    <referenceID>CustomerBaseTariffName</referenceID>
    <type>variable</type>
    <value>Individual Plan</value>
  </configuration>
  <configuration>
    <referenceID>CustomerPaymentSettings</referenceID>
    <type>collection</type>
    <value><![CDATA[
      <root>
        <row>
          <col name="type">Visa</col>
          <col name="number">4140040912440644</col>
          <col name="expdate">0210</col>
        </row>
      </root>
    ]]></value>
  </configuration>
</configurations>


Exploring the new Expression Functions in VoiceObjects 7.4

Tuesday, January 6th, 2009

As you may know, VoiceObjects 7.4 has been released and is available for download on this developer portal.

Now, I wanted to see what’s in VoiceObjects 7.4 for developers. In particular, I was interested in exploring some of the new expression functions – there is large number of new functions in the realm of date and time handling, string operations, regular expressions and more, plus some other more VoiceObjects-specific functions. My plan was to adapt our Prime Telecom demo application to leverage some of the new VoiceObjects 7.4 functionality. Of course, the existing “legacy” Prime Telecom application works fine in VoiceObjects 7.4, but then … at the end of the day it’s a demo application, so I thought it should stay up-to-date, best-practice-wise.

I started reviewing the existing Connector and Script objects in Prime Telecom, assuming that these presented the lowest hanging fruits: If I could replace some of them by mere Expression objects, using the new functionality, the gains in application maintainability and scalability would be obvious. And indeed, I did find a few objects that had become obsolete:

  • Three Connector objects that had called custom Java code to validate the format of email addresses, credit card numbers, and expiration dates, could be replaced by simple Expression objects using the new MATCHESREGEXP function. This function checks whether a value matches a given regular expression. No more Java code to maintain here! Check out, for example, the new Expression object Is Email Address Valid in the new version of Prime Telecom to see how it’s done.
  • The Script object First Day Next Month had contained some JavaScript logic to calculate, well, the first day of the next month (relative to the system date). With the new expression functions LASTDAYINMONTH, ADDDATE and CONVERTDATE, this Script object could be easily replaced by Expression objects. There are quite a few more date and time related expressions, like NEXTWEEKDAY or TIMEBETWEEN that should help you implement most conceivable tasks in date and time arithmetics.
  • The Script object Monthly Rate for All Active Addons contained JavaScript code that iterated over the prices of all tariff add-ons currently subscribed to by the caller. Whenever the caller subscribes to a new add-on, the total monthly rate has to be re-calculated, so this Script object had to be re-executed. Now, with the new Expression function ITERATE, it was easy to replace this script by a few expressions: First, a Collection object is initialized with all prices of the current add-ons (Expression object Assign List of subscribed Add-On Prices). Then, after resetting the “total monthly rate” variable , another expression simply iterates over all rows in this collection and sums up the prices (Expression object Sum up Prices of all Active Add-Ons).

After getting rid of a few Connectors and Scripts, I reviewed the existing Expression objects in Prime Telecom. I found some implementation details that looked a bit cumbersome in the light of the new possibilities. Hence, I tried to replace them with new expressions, lowering the total number of objects used and trying to make the code more maintainable at the same time.

  • First, I investigated the new string operations. For a start, using the new functions RIGHT and LEFT instead of MID where appropriate helps keep the number of objects down.
  • The new function COUNTOCCURRENCES made several other expressions in Prime Telecom obsolete. It counts how often a certain substring appears in another string. In combination with the XPATH expression, it helped implement a very efficient way to count available tariff add-ons: Inspect, for example, the Expression object Add-On Row Counter.
  • Note, by the way, that the XPATH expression now takes a third argument returnAsCollection: This allows returning a list of XML nodes not only as a variable containing blank-separated strings (returnAsCollection=false), but alternatively as a handy Collection object (returnAsCollection=true). This makes the result of an XML query much easier to handle, as you can see when you inspect the Calculate Subscribed Add-Ons Sequence object.
  • In the same sequence, I found the new ITERATE function to be useful. I use it in the Iterate over remaining Add-Ons Expression object to create a comma-separated list of the names of subscribed tariff add-ons. ITERATE can make the (much more powerful) Loop object obsolete in cases when you just need to iterate over an expression to perform some simple logic.
  • The new VALUESUBSTITUTION function was instrumental in minimizing the number of expressions in the context of managing the headlines in the web and text channel. This function extracts a piece of functionality that was previously only available in the context of the Formatting object’s Value substitution field: It searches a variable in a Collection object and returns a lookup value – which can differ per language. This comes in very handy in multi-language applications. Check out the expression Headline to see how the (language-dependent) headlines in Prime Telecom’s web and text channel are implemented. 

There are many more new expressions to explore; some of the most powerful ones, like APPLYCONFIGURATION, deserve dedicated blog entries just to explore their capabilities.

Let me conclude with two more nice catches that have an impact on the Prime Telecom implementation:

  • The Channel filter is now also available on the Menu Items in Menu objects and on the Correction Mappings in the Confirmation object. This makes it much easier than before to create multi-channel applications with different sets of menu items across the different channels. For example, you might want to offer an “Address Change” self-service in the text-based channels, but not in the voice channel. For an example in Prime Telecom, check out the Confirm Credit Card Confirmation object: The “Correct both” (both the credit card number and the expiration date, that is) Correction Item is available only in the voice channel.
  • In the web channel, fields in web forms are now automatically pre-populated with the according variable values. This works for text fields, radio buttons, and lists. Note how the Prime Telecom web forms no longer “forget” your input when correcting, for example, credit card details.

If you want to reproduce my findings, I suggest you download your copy of the new version of the Prime Telecom demo application, install it in your VoiceObjects 7.4 Developer edition and inspect it in detail.

New Prime Telecom Video Samples

Tuesday, January 6th, 2009

If you are a developer interested in evaluating, playing around with, or just getting to know VoiceObjects, a good way to start is looking into the tutorials and demos that come with it.

In particular, if you’re interested in the multi-phone-channel capabilities of VoiceObjects, or if you just want to explore some of the more advanced implementation concepts of the VoiceObjects platform, you should have a look into the Prime Telecom demo application. You find it in the Demos&Templates section of the developer portal.

Very recently, we have added a few video demos that show how the Prime Telecom application looks&feels like in the different channels. Watch these videos to see what you will be rewarded with if you decide to download and install the Prime Telecom demo.

First, watch a short demo of the Prime Telecom application in the text channel. The same “Enter new credit card data” self service can be invoked on the mobile web channel and as a voice call. For a high-level backstage view of the service implementation, watch this video.