Rate this page:

Examples of using functions in Voximplant Kit

Functions in Voximplant Kit allow you to create and program the logic of a bot to perform specific actions. The documentation for Voximplant Kit functions see here.

A text function example

Copy URL

In the following example, the function responds to a customer message: you wrote: {{text of incoming message}}

If a customer writes the queue command, the bot transfers the request to a queue.

If a customer writes the exit command, the bot says goodbye and closes the request.

Text function

Text function

A call function example

Copy URL

In the following example, the function accepts the cmd variable as input and returns the unknown command text to the answer variable.

If cmd = date, the function returns the current date to the answer variable.

If cmd = random, the function returns a random number from 0 to 10 to the answer variable.

Call function

Call function