sendOptions
Sends options to the visitor as a message
Description
vcc.sendOptions(params)
Sends options
Parameters
params
(object) An object containing the following properties:
question
(string): The question to ask the user.options
(array): An array of option objects, each with alabel
(string) and anaction
(function).timeout
(number): The timeout in seconds for the options. If specified, the system will proceed with the default action after the timeout expires.
Return values
none
Example
vcc.sendOptions({
question: "Please choose an option:",
options: [
{ label: "First option", action: handleFirstOption },
{ label: "Second option", action: handleSecondOption }
],
timeout: 30 // Optional: Wait for 30 seconds before timing out
});
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.