Scripting Guide for Communication Server 1000/Meridian 1 PBX 201October 2007 Basic script commandsIF-THEN-ELSE-END IFUse the IF-THEN-ELSE-END IF command in conditional situations. If thespecified condition is met, then the THEN statements are executed. Otherwise,the script executes the ELSE statements.An IF-THEN-ELSE-END IF command can have multiple statements betweenTHEN and ELSE, and multiple statements between ELSE and END IF.An IF command can appear within the THEN or ELSE clause of another IFcommand, and each IF must have exactly one matching END IF command.Script syntaxIF THEN ELSE END IFParametersEnter information for the following parameters: The condition for which you want the script to test. The action that you want the script to take if the condition ismet. The action that you want the script to take if the condition isnot met.ExamplesExample 1The following script example checks the CLID of the call. If the CLID is 905-863-3123 the call is queued to the customer service skillset with a priority of 1.This caller also hears a special announcement. Otherwise, the call is queued witha priority of 3 and the caller hears a different announcement.IF (CLID = 9058633123) THENQUEUE TO SKILLSET customer_service_sk WITH PRIORITY 1WAIT 2