When the script has a Test Variable item with a user-defined condition (example: _department), users will be requested to input certain information, that, if matching the condition, will determine what queue the transaction will be routed to. Routing to the correct queue doesn't happen, despite users responding with words or phrases that match the condition set by the variable.
- Contact Center
Ensure that the variable is defined in the script.
If you added custom variables in your pre-chat form, you must add them to the variable list here. By default, the View variables lists all system variables. To add a custom variable you have already added in your chat design,
- In the Script tab, click View variables. A list of system variables shows up.
- Click Add new and enter the custom variable name defined in the pre-chat form.
Ensure the custom variable defined in the pre-chat form is added here.
Check the Test Variable object.
Open the script and edit the Test Variable object. Verify that condition uses contains and that the content is correctly written and does not contain any extra spaces or characters. Example of incorrect settings:
Expression Preview : _department Contains "Technical Support "
Extra characters or misspellings in the Expression window.
More information on script variables is available in Chat Script Variables.