Chat Script Does Not Forward to Correct Queue Despite Correct Variable Input

Updated: 07/08/2024

Symptom

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.

Applies To

  • 8x8 Contact Center
  • Scripts

Resolution

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:
  1. In the Script tab, click View variables. A list of system variables shows up.
  2. 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 "

Cause

Extra characters or misspellings in the Expression window.

Additional Information

More information on script variables is available in Chat Script Variables.