Skip to main content

04 Process editor, gateways and Variable handling

All clear! So a few simple messages are no problem. But what about branching and different response options? Quite simple, a few more clicks and suddenly we have completely new possibilities. See for yourself:


Subtitle

In this video you'll learn how to handle our gateways and process variables. So let's extend our hello world example. Currently there's just one module in there and let's add a decision Gateway as the next module. Click on the decision gateway to add branches. In this case I will add two branches and in this example we will ask 'Which pill would you like to take?'. The first branch then would be the blue pill. The second one the red pill. In our preview here you already see that it will generate two buttons for your customers to choose from and these will lead to two branches where you can add more process modules. So for the blue pill let's say your experience ends here and we can just use our goodbye module and use our end event so the process will basically end very quickly. For the ones that choose the red pill let's ask them a question and then add another Gateway. Not the decision Gateway but our general Gateway. To add more branches here I just click on the X. Okay, now we have three branches here that we could also fill. In this case to keep it short I will just add an external link for each of these branches. Okay so now let's fill out the questionnaire here to create a variable. In this case I will pick one of our more than 20 options here for the question type. Let's just go with a simple single choice and the next question will be 'What skill do you want to learn foreign first?'. I will offer three answer options. Let's start with 'Flying a helicopter', 'Learn martial arts' or 'learn LoyJoy'. So this would be ready now as a questionnaire, but I want to use the answer in an if statement later on to pick the right external link. So in order to do that I will add a variable. Just click on this icon and give your variable a name. In this in this case I will call it 'skill' and I can also set if it should be asked again if customer returns to this experience. So in this case I want it to be always the same so I will also ask again if the variable has been already filled earlier. Now we need to give each answer a value. So the name of the variable skill and the value if they pick the first answer I will put 'helicopter' there for the second one I will put 'martial_arts' there and for the third one I will add 'loyjoy' there. You can type any value you want so this could also include spaces or emojis or whatever you like. In this case I will keep it a bit more technical. For example for martial arts I added the underscore here. But this is just your choice how you want to use it. So that's it for setting the variable. The questionnaire creates a new variable and now you see three if statements. So the first one I will use the if statement variable 'skill' should be equal to 'helicopter'. For the second one process variable skill should be equal to 'martial_arts' and for the third one the process variable should be 'loyjoy' and I will simply add a link here in this module. I will simply paste our docs.loyjoy.com link here and immediately the external link module adds a title and a description for the link. Alright, so now we have created very brief experiences, but we used those gateways and we used a variable. Now let's hit preview again and try it out. 'Which would you like to take?' now we're in the decision gateway since loophole would be kind of boring I will choose the red pill and as a skill we see the single choice module here and this is the external link that I could open now. Alright, I hope you enjoyed it!