The Switch Step
Next, use a Switch step to switch the contact to the appropriate section of the script, depending on whether the contact is a telephone call or an HTTP contact.
Figure shows the configured Switch customizer window.

Configure the Switch customizer window as follows:
-
Switch Expression—contactType
The Switch step evaluates the value of the contactType variable (as assigned by the Get Contact Info step).
-
Switch Cases
-
HttpContact—The script executes this case if the contact type is an HTTP request made through a web browser.
-
CallContact—The script executes this case if the contact type is a telephone call.
-
Note | The value in both switch cases is a string and requires quotes. |
As shown in figure, the two cases appear as output branches underneath the Switch step in the script, along with the Default output branch that always appears under the Switch step.

The following sections describe the three output branches of the Switch step:
-
The HttpContact Output Branch of the Switch Step
-
The CallContact Branch of the Switch Step
-
The Default Branch of the Switch Step