If you want to create custom jumps based on device type you will need to do the following: Create a Script variable with a function that detects your device, add this to a GoTo Step and use this for response and jump logic.

Example: that will detect if you're on a iOS device (and exit the bot or otherwise continue to Step 2).


Note: this might be helpful if, for example, you don't want to show the Fold out step on iOS devices, as Apple doesn't fully support scrolling within bigger iFrames


Step 1: Create a script Variable that detects your device type

The function that is used to detect your device is:

function(callback, variables) {
  var _iOSDevice = !!navigator.platform.match(/iPhone|iPod|iPad/);  
  callback(_iOSDevice)
}

Note: This will return true of false if it is an iOS device or not


Step 2: Add a GoTo Step that uses the value of this variable ({{iOS}} in this example) and create your Response and corresponding Jump logic based on the value


That's it! If you're on a iOS device the bot will respond with "This is an iOS iOS device" and jump to the Exit, but if you are on anything else, like Macbook, Desktop, Android device, etc, it will respond with "Non iOS device" and jump to Step 2!





Need more help or looking for inspiration? Join the Quriobot community!

Quriobot
Friendly & Fun
Interact & Convert