goTab
The vcc.goTab function is used to programmatically navigate the agent to a different tab (or page) within the VCC Live script interface. This is especially useful for creating dynamic workflows where the agent is guided to specific script sections based on call variables, customer input, or IVR data.
Description
vcc.goTab(tabId: string): void
Parameters
tabId
The name of the datasheet to jump to. You can also jump to the currently open tab of the questionnaire.
Return values
This function does not return a value (undefined).
Use cases with explanation
Use case 1. Navigating based on call direction
You can use vcc.goTab alongside the vcc.isInbound property to automatically direct agents to the correct script page depending on whether the call is inbound or outbound. This ensures agents see the most relevant script upon connection.
$().onLoad = function() {
// If the call is outbound, redirect to the 'outbound_campaign' tab
if (!vcc.isInbound) {
vcc.goTab('outbound_campaign');
}
};
Use case 2. Conditional navigation based on IVR authentication
In scenarios where a caller enters a PIN or identification code in the IVR, you can assess the result in the script upon load and automatically navigate the agent to a “success” or “failure” tab.
$().onLoad = function () {
// Retrieve an authentication code passed from the IVR
var authCode = vcc.getChannelVariable("vcc_auth_code");
// Check if the code matches the expected criteria
if (authCode === "9876") {
vcc.goTab("authentication_successful");
} else {
vcc.goTab("authentication_failed");
}
};
Use case 3. Navigating via button click
You can bind vcc.goTab to a button’s afterSetData event to let an agent manually progress to a specific segment of the script after completing a task or filling out a section.
$("customer_details", "submit_button").afterSetData = function() {
// Once the agent clicks the submit button on the customer details page,
// they are automatically navigated to the 'payment_processing' tab.
vcc.goTab("payment_processing");
};
Notes
- To prevent infinite loops, be careful when placing
vcc.goTabinside anonLoadhook. If the script constantly evaluatesvcc.goTabon the destination tab without a breaking condition, it can continuously trigger reloads. - The
tabIdmust exactly match the name or ID configured for the tab in the VCC Live script editor setup. - Combining
vcc.goTabwith custom script logic allows you to construct a completely dynamic, non-linear script flow based on customer data.
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.