Creating Content With Required Parameters


What if you don’t want to view an entire chart or report? What if you just want to ask WebFOCUS about a specific field in your data, and view only the values that pertain to it? You can do that by adding a filter for the parameter that you want to specify to a chart or report.

Let’s say you want to enable the ability to ask about store sales for a specific store. Using the sample chart and report we created in WebFOCUS Designer and InfoAssist as an example, you can quickly add a filter for that parameter.

Example: How to Create a Filter in WebFOCUS Designer

  1. Open an existing chart or create a new report in WebFOCUS Designer.
  2. From the Data pane, drag the Store,Name dimension to the Filter toolbar located above the canvas. You can also right-click the dimension and click Add to filter toolbar.

    The filter will show all of the available data values for that dimension, as shown in the following image.

    Available data values
    There are two options you can choose from when creating the parameters that Mobile Voice will use for your WebFOCUS Designer content: 

    a. Set the parameter to required, by right-clicking the data field in the Filter toolbar and selecting Require selection. Doing so requires the user to specify a value before WebFOCUS can run a chart. They can do this by incorporating the parameter in the actual intent phrase. In the example using store name, this phrase could be “Tell me store sales for Boston” or “Show me store sales”. Both result in WebFOCUS prompting for a store name.

    b. Keep the parameter value optional, which is the default. Doing so means the user can speak either of the two sample phrases noted above, except that when speaking the more general phrase of “what were store sales”, the chart will immediately run and show all store data.

  3. Once you are done adding the filter, save the chart.
  4. Close WebFOCUS Designer, and return to the WebFOCUS Home Page, where you can define an intent phrase, and load dimensional data in to the search index of the domain.

Example: How to Create a Filter in InfoAssist

  1. Open an existing report or create a new report in InfoAssist.
  2. On the Data tab, in the Filter group, click Filter.
    The Create a Filtering Condition dialog box opens.
  3. Double-click Double-click or press F2 to edit! to open the drop-down menus that you can use to create a filter.
  4. Use the Field drop-down menu to select a field from the Master File, as shown in the following image. For this example, we will use Store Name.

    InfoAssist filter dialog box
  5. Click OK.
  6. In the <Value> drop-down menu, select the value from the Master File. For this example, select Parameter from the Type drop-down menu, and select the Dynamic radio button. This creates a dynamic parameter for Store Name, as shown in the following image.

    Filter options
    There are two options you can choose from, when creating parameters for your Mobile Voice reports:

    a. Keep the parameter value required, which is the default. Doing so requires the user to specify a value before WebFOCUS can run a report. They can do this by incorporating the parameter in the actual intent phrase. In the example  using store name, this phrase could be “Tell me store sales for Boston” or “Show me store sales”. Both result in WebFOCUS prompting for a store name.

    b. Set the parameter to optional, by selecting the Optional check box. Doing so means the user can speak either of the two sample phrases noted above, except that when speaking the more general phrase of “what were store sales”, the report will immediately run and show all store data.

  7. Click OK to view your complete filter, as shown in the following image.

    Filter conditions dialog box

  8. Once you are done creating the filter, click OK to close the Create a filtering condition dialog box.
  9. Close InfoAssist and return to the WebFOCUS Home Page, where you can define an intent phrase, and load dimensional data in to the search index of the domain.

For both of these examples, defining the intent phrase to “Show me store sales”, will result in the following interaction:

User: Show me store sales.
WebFOCUS: Please say a value for store name.
User: Atlanta.

WebFOCUS then opens the content showing store sales for the Atlanta location, which was the requested parameter.

For the chart created in Designer, the result is shown in the following image.

Chart with store sales

For the report created in InfoAssist, the result is shown in the following image.

Atlanta report result

The following image shows the fex behind the chart and report that we just set up. The highlighted area shows the filter for the required parameter that WebFOCUS needs to determine the correct chart output.

Fex for required parameter