OrderInfoparameter to check if the user is interested to view or cancel their past orders
onOrderManagementcallback invocation, if the user asked for viewing a specific order, and if that order did not exist, the app return OrderViewAppState and pass the condition ORDER_NOT_FOUND to it.
OrderInfocontains the breakdown of the original order request. It has the following structure:
AppStates are supported:
OrderViewAppState): To be returned when the app handles the order request and transitions to the orders page.
OrderCancelAppState): To be returned when the app handles the cancel request and navigates to the cancel orders page
UnsupportedAppState): To be returned when the app is not ready to handle orders yet. The Assistant will speak out an appropriate prompt to the user.
Conditionsare supported for each of the
AppStates supported by the Assistant
OrderInfoparameter) to UNKNOWN. The app could then do the following:
UNKNOWN, return OrderCancelAppState(
CONFIRMED, the app should attempt to cancel the order and if that was:
DENIED, return OrderCancelAppState