onOrderManagement
callbackOrderInfo
parameter to check if the user is interested to view or cancel their past ordersOrderInfo
parameteronOrderManagement
callback 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. OrderInfo
ParameterOrderInfo
contains the breakdown of the original order request. It has the following structure:Index
= -1
OrderAction
= VIEW
Index
= 0
OrderAction
= CANCEL
ConfirmationStatus
= UNKNOWN
index
can take the following values:AppState
sAppState
s 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 pageUnsupportedAppState
): To be returned when the app is not ready to handle orders yet. The Assistant will speak out an appropriate prompt to the user. AppState
call WAITING (WaitingAppState)
that is common across all UserJourney
types for completing asynchronous operations within the callback. Refer to the Asynchronous Action Handling section for details of how to deal with asynchronous operations.Condition
sConditions
are supported for each of the AppState
s supported by the AssistantORDER_VIEW (OrderViewAppState)
ORDER_CANCEL (OrderCancelAppState)
ConfirmationStatus
(inside the OrderInfo
parameter) to UNKNOWN. The app could then do the following:ConfirmationStatus
== UNKNOWN
, return OrderCancelAppState(ORDER_CANCEL_CONFIRMATION_REQUIRED)
ConfirmationStatus
set to CONFIRMED
or DENIED
)ConfirmationStatus
== CONFIRMED
, the app should attempt to cancel the order and if that was:(ORDER_CANCEL_USER_CONFIRMED)
FAILURE
)ConfirmationStatus
== DENIED
, return OrderCancelAppState(ORDER_CANCEL_USER_DENIED)
notifyAppState
API as described in the Asynchronous Action Handling section and use the same app state condition methods described above.