Set up a language selection 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.
- Under Reusable Tasks, click Add reusable task here > Toolbox > Task.
- Click More and from the menu that appears, click Set this as the starting task.
- In the task editor area, click New Task 1 and rename the task Check Language.
Next, to determine if a languages is already set on the call, configure the task by checking the value of a user-created variable.
- Expand the Data menu, add an Update Data action below the Start action, and do the following:
- Add a boolean update statement.
- Under Variable Name 1, enter Flow.LanguageSelected.
- Under Value To Assign, type If(IsSet(Flow.LanguageSelected), Flow.LanguageSelected,false).
- Expand the Logical menu and drag a Decision action below the Start action.
- In the Decision configuration area, do the following:
- In the Name field, type Is language set?.
- Switch to expression mode.
- In the Expression area, type Flow.LanguageSelected.
This step asks if the user-created 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 user-created 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:
- Expand the Menu category.
- Add a Jump to Menu action below the No output.
- 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.
- Expand the Audio category, add a Play Audio action below the Yes decision path, and add an initial greeting, such as Thank you for calling XYZ.
- Expand the Data category and add a Collect Input action below the Play Audio action.
- Configure the Collect Input action that requests the user to select the language:
- In the Name box, type Get User Language Choice.
- In the Input Audio box, type To continue in English, press 1. Para continuar en español , oprima el número dos.
- In the Input Data Name box, type Task.LanguageChoice. This is the variable Architect uses to detect if the user pressed 1 or 2, and will set the language accordingly.
- Under Numeric Input, click change to exact and then 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. At this point in the flow, the caller will press 1 or 2.
- Expand the Logical menu, add a Decision action below the Success path, and configure it:
- In the Name field type Did the user choose English?.
- Switch to expression mode.
- In the Expression area, type Task.LanguageChoice == “1”.
- Expand the Data menu, add it below the Yes path, and configure it:
- In the Name field, type User chose English.
- Add a boolean update statement.
- Under Variable Name 1, type Flow.LanguageSelected.
- Under Value To Assign 1, leave the default selection as True.
- Expand the Flow menu and add it below the User Chose English Update data action and under Language, select en-us.
- To configure the remainder of the path when the user chooses English, do the following:
- 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.
- To configure the remainder of the path when the user does not choose English, under the No path, repeat step 5.
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.