Jump to: navigation, search

Procedure: Using a Custom Variable

Purpose: This is a simple example of the use of a custom variable in a standard response.

Prerequisites
This example assumes a category tree that includes categories called Cookbooks, Mysteries, and Reference.

  1. In Knowledge Manager:
    1. Create a custom variable called QueryTopic (see See Creating field codes).
    2. Create a field code called Query_Topic that consists of the variable QueryTopic.
    3. Create a standard response of type Autoresponse called AUTO that includes the sentence Thank you for your inquiry about <$ Query_Topic $>.
    4. Create the following screening rules:
    5. Cookbook: RegExFind("cook") || RegExFind("recipe") || RegExFind("food") || RegExFind("cuisine")
    6. Mystery: RegExFind("murder") || RegExFind("crime") || RegExFind("case of the") || RegExFind("detective")
    7. Reference: RegExFind("dictionar") || RegExFind("encyclopedia") || RegExFind("almanac")
  2. In Interaction Routing Designer, create a strategy that applies these screening rules one after the other, assigning a different value to the custom variable for each screening rule:
    1. Create a variable called var_screen.
    2. Create a strategy. Start the strategy with a Screen object. On the General tab of the Screen object, select the Cookbook rule.
    3. On the Result tab, click Assign values of the key-value pairs. Then under Output values select var_screen for Variable and enter ScreenRuleMatch for Key from output.
    4. Connect the Screen object to a Generic Segmentation object. Create two segments: var_screen = true and var_screen = false.
    5. Connect an Autoresponse object to the top green port (the one corresponding to true) of the Segmentation object. In the Autoresponse, select the Select standard response radio button and select AUTO in the associated drop-down list.
    6. Still in this Autoresponse, go to the General tab and in the Field Codes area (bottom of the tab) click the New icon, enter QueryTopic under Key, and enter cookbooks under Value.
      This will generate an e-mail that includes the sentence Thank you for your inquiry about cookbooks.
    7. Return to the Generic Segmentation and connect a new Screen object to its second green port (the one corresponding to false).
    8. On the General tab of the new Screen object, select the Mystery rule. On the Result tab, click Assign values of the key-value pairs. Then under Output values select var_screen for Variable and enter ScreenRuleMatch for Key from output .
    9. Proceed as in Steps d–f: Connect this Screen object to a new Generic Segmentation, again with segments for var_screen = true and var_screen = false.
    10. As in Step e, connect a new Autoresponse object to the green port for true, select the AUTO standard response, and enter QueryTopic under Key. This time enter mysteries under Value.
    11. Return to the second Generic Segmentation’s green port for false and repeat Steps g–j, creating a third Screen object and Generic Segmentation. In the Screen object, select the Reference rule; in the Segmentation object, set the custom variable to reference .

The figure "Strategy Using Custom Variable" shows the strategy as described. The single standard response AUTO generates three e-mails, each with a different word filling the blank in Thank you for your inquiry about ___.


Strategy Using Custom Variable

Next Steps

This page was last edited on December 17, 2013, at 18:53.
Comments or questions about this documentation? Contact us for support!