#metadata: information about the flow # platformVersion: the version of the bots platform that this flow was written to work with metadata: platformVersion: "1.1" main: true name: PizzaKing #context: Define the variables which will used throughout the dialog flow here. context: variables: iResult: "nlpresult" pizza: "PizzaBag" states: intent: component: "System.Intent" properties: variable: "iResult" optionsPrompt: "Do you want to" transitions: actions: OrderPizza: "startOrderPizza" WelcomePizza: "startWelcome" unresolvedIntent: "startUnresolved" startOrderPizza: component: "System.Output" properties: text: "ok lets get that order sorted" keepTurn: true transitions: next: "resolveEntities" resolveEntities: component: "System.ResolveEntities" properties: variable: "pizza" nlpResultVariable: "iResult" maxPrompts: 3 cancelPolicy: "immediate" transitions: next: "setPizzaDough" actions: cancel: "maxError" setPizzaDough: component: "System.SetVariable" properties: variable: "pizza.PizzaDough" # value set for the variable. value: "${pizza.value.PizzaDough?has_content?then(pizza.value.PizzaDough,'regular')}" transitions: next: "showPizzaOrder" showPizzaOrder: component: "System.Output" properties: text: "Ok so we are getting you a ${pizza.value.PizzaSize} ${pizza.value.PizzaTopping} at ${pizza.value.DeliveryTime.date?long?number_to_time?string('HH:mm')}. This will be on our ${pizza.value.PizzaDough} base " transitions: return : "showPizzaOrder" maxError: component: "System.Output" properties: text: "OK lets connect you with someone to help" transitions: return: "maxError" startWelcome: component: "System.Output" properties: text: "Hey there - welcome to our online Pizza bot!" transitions: return: "startWelcome" startUnresolved: component: "System.Output" properties: text: "Ok lets sort out that pizza for you!" keepTurn: false transitions: return: "startUnresolved"