metropolitan-bronze•2y ago
Button imitating with function
Context: language support.I'm setting and updating Language_variable in the frontend and want to control the content of vf blocks based on language. I decided to use the function to simulate some components, there were no problems with the text, but with the buttons I was struggling with the paths. Can anyone give advice on such a problem? How not only display buttons but make it interactive


3 Replies
In Voiceflow, you can create interactive buttons using the Button Step, which functions similarly to the Choice Step. These buttons can be used to present choice paths, options, or decision/input points to help progress in the conversation.
To make your buttons interactive based on the language variable, you can use conditional logic. This can be achieved by setting up different paths for each language you support, and then using the IF Step to check the value of your Language_variable. Depending on the value of this variable, you can direct the flow to the appropriate path.
Here's a simplified example:
1. Create a Button Step with options for each language you support.
2. After the Button Step, create an IF Step that checks the value of the Language_variable.
3. For each possible value of the Language_variable, create a different path with the appropriate content.
Remember, the changes you make in the test mode are only specific to that design-test session and not in your assistant. You can test your experience by hitting the blue Run button, navigate to the Variables sidebar in Test mode under the Test Tool on Canvas, and set the value of your Language_variable.
Sources:
- Creating Variables
- Introduction to Variables & Logic
- Buttons
metropolitan-bronzeOP•2y ago
I want to avoid block duplicates, because text the only thing that changes. Is it possible define path to jump in the function return {
trace: [
{
type: "choice",
payload: {
buttons: [ ?
Just DMed you