askVariable
Sends a question, saves the response of the user to the specified variable, and calls the next action after the message is received.
Description
vcc.askVariable(params)
Sends a question, saves the response of the user to the specified variable,and calls the next action after the message is received
Parameters
params
(object) An object containing the following properties:
question
(string): The question to ask the user.variable
(string): Variable for value store.nextAction
(function): The callback function to be executed after a message is received and the value is stored.timeout
(number): The timeout in seconds for the options. If specified, the system will proceed with the timeoutAction action after the timeout expires, or the nextAction if timeoutAction is not defined.timeoutAction
(number): The callback function to be executed after the timeout expired.
Return values
none
Example
vcc.askVariable({
nextAction: askCustomerId,
variable:"customerId",
question:"What is your Customer ID?",
timeout: 30, // Optional: Wait for 30 seconds before timing out
timeoutAction: addToQueue // Optional: after timeout expired call this function
});
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.