Set up a starting task
You can set a task as the starting task in place of a starting menu. This option is helpful when you want Architect to look up something about the call before proceeding with the flow. You might want to use a starting task to determine if the current time of the call is a.m. or p.m., and then process “Good morning” or “Good afternoon” audio accordingly. Or, you might want to determine if the caller already selected a language in a previous flow and does not need to set it again in the current flow.
In this example, we will set up a flow to determine if the caller previously selected a language for the call and if not, present the caller with a Select Language menu. First, create a Check Language task and set it as the Starting task. Next, configure the task to capture the language setting, if available. If not, present language choices to the caller.
Click to expand the example task. Click it again to close it:
- From the Toolbox, click to expand the Task category and drag the Task option to the Reusable Tasks area.
- On the Reusable Tasks design area, do the following:
- In the Name field type Check Language.
- Click Set this as the starting task. Notice that the reusable Check Language task moves up to become the Starting Task, and the Initial Greeting now appears in the Starting Task area. Also, the Main Menu moves to the bottom of the page to Reusable Menus.
- Click Edit Task. The task editor opens.
Next, to determine if a languages is already set on the call, configure the task by checking the value of the Call.Language variable.
- From the Toolbox, drag a Decision action to the task design form and drop it below the Start action.
- In the Decision design area, do the following:
- In the Name field, type Is language set?.
- Switch to expression mode. For information on how to switch between literal and expression modes, see the Suggested content.
- In the Expression area, type IsNotSetOrEmpty(Call.Language).
This step asks if the Call.Language variable is not set, or empty:
- If it is not “not set or empty”, then the language has previously been set by the caller and the interaction will follow the No output.
- If it is “not set or empty”, then the language has not been set and the path follows the Yes output.
If the Call.Language variable it is “not set or empty”, then the caller has selected a language in a previous flow and the path follows the Yes output. At this point, you can direct the interaction to the next desired action. For example, to the call flow’s main menu:
- From The toolbox, click to expand the Menu category.
- Drag a Jump to Menu action to the task design form and drop it below the No output.
- In the Jump to Menu design area, select a Name for the action and select the Menu to which you want to direct the interaction.
After Architect determines that the language has already been set, it immediately passes the call to the menu you select here.
- From the Toolbox, drag a Play Audio action, drop it below the Yes decision path and add an initial greeting, such as Thank you for calling XYZ.
- From the Toolbox, expand the Data category, drag a Collect Input action and drop it below the Play Audio action.
- Configure the Collect Input action that requests the user to select the language:
- On the Data design form, in the Name field type Get User Language Choice.
- In the Input Audio field type Press 1 for English, press 2 for Spanish.
- In the Input Data Name, type Task.LanguageChoice. This is the variable Architect uses to detect if the user pressed 1 or 2, and will set the language accordingly.
- Move the Number of Digits slider bar to the left until Exactly 1 digits appears. Architect only analyzes the interaction for a 1 or 2, so you do not need to set more than 1 digit.
- Click the Verification drop-down list and select Numeric.
- Leave the default timeout settings unchanged.Note: At this point in the flow, the caller will press 1 or 2.
- From the Toolbox, drag a Decision action, drop it below the Success path and configure it:
-
- In the Decision design form, in the Name field type Did the user choose English?.
- Switch to expression mode. For information on how to switch between literal and expression modes, see the Suggested content.
- In the Expression area, type Task.LanguageChoice == “1”.
-
- From the Toolbox, drag a Select Language action, drop it below the Yes path, and configure it:
-
- In the Name field, type User chose English.
- Click the language drop-down list and select English [United States] (en-us).
-
- Configure the remainder of the path if the user chose English:
- From the Toolbox, expand the Menu category, drag a Jump to Menu action, and drop it below the User chose English action.
- On the Jump to Menu design form, select a Name for the action and select the Menu to which you want to direct the interaction.
- Configure the remainder of the path if the user did not choose English:
- Repeat step 4, replacing Did the user choose English? with Did the user choose Spanish? and Task.LanguageChoice==”1″ with Task.LanguageChoice==”2″.
- Repeat step 5, replacing User chose English with User chose Spanish and English [United States] (en-us) with Spanish [Spain] (es-es).
Configure the remaining No and Failure outputs to meet your company requirements when the flow fails to obtain a configured language. For example, you may want to transfer the interaction to an operator or disconnect the call.