Categories:
Use cases flowcharts
Key operational flowcharts for different types of use cases such as TV, generic questions, etc.
Message generic questions use case
Generic questions use cases are based on frequently asked questions (FAQs).
These experiences are valid for anonymous users, so the example is provided with an anonymous user, but are also valid for authenticated users, in this case, when entering aura-bot the authentication steps should be executed.
Please, refer to Direct Line basic flows for authenticated users to check the differences. The example is provided using Direct Line, but it is also available for the rest of types of channels: WhatsApp or Auraline.
@startuml
title: User message that is recognized as a FAQ
actor User
participant Channel #bdf492
participant DirectLine #FFCC99
participant DirectLineWebsocket #FFCC99
participant AuthenticationApi #FFFF99
participant AuraGroot #76bbe7
participant AuraBot #41a0f9
Channel -> DirectLineWebsocket: Open WebSocket
User -> Channel: Send [Phrase that starts FAQ dialog]
Channel -> DirectLine: Send {activity[Phrase that starts FAQ dialog]}
DirectLine -> AuraGroot: Send {activity[Phrase that starts FAQ dialog]}
AuraGroot -> DirectLine: 200 OK
AuraGroot -> AuraGroot: Middlewares
AuraGroot -> AuraGroot: Recognizers (GetSkillByChannel)
AuraGroot -> AuraBot: Send {activity[Phrase that starts FAQ dialog]}
AuraBot -> AuraGroot: 200 OK
AuraBot -> AuthenticationApi: GET AuraId
AuthenticationApi -> AuraBot: 404 Not found (Anonymous)
AuraBot -> AuraBot: Middlewares
AuraBot -> AuraBot: Recognizers
AuraBot -> AuraBot: Main Dialog
AuraBot -> AuraBot: Execute FAQ dialog
AuraBot -> AuraBot: filterFaqWithContext(faq, user, channelData.contextFilters)
AuraBot -> AuraGroot: Send {faqResponse}
AuraGroot -> AuraBot: 200 OK
AuraGroot -> DirectLine: Send {faqResponse}
DirectLine -> AuraGroot: 200 OK
Channel -> DirectLineWebsocket: Read {faqResponse}
Channel -> User: Show {faqResponse}
@enduml
User message that leads to a dialog that needs an asynchronous API request to be resolved
This experience is defined in the guidelines for building a dialog that uses async APIs.
The example is provided using WhatsApp, but is also available for the rest of types of channels: DirectLine or Auraline.
@startuml
title: Use case handling asynchronous requests
actor User
participant WhatsApp #f6b5ff
participant DirectLine #FFCC99
participant DirectLineWebsocket #FFCC99
participant AuthenticationApi #FFFF99
participant AuraGroot #76bbe7
participant AuraBot #41a0f9
participant AuraBridge #1add4d
participant AuraBridgeOutbound #1add4d
participant KernelWhatsAppApi #99FFFF
participant AsyncApi #fc989b
User -> WhatsApp: Request [message]
WhatsApp -> KernelWhatsAppApi: Request [message]
KernelWhatsAppApi -> AuraBridge: Request [message]
AuraBridge -> KernelWhatsAppApi: 200 OK
AuraBridge -> AuraGroot: Request [message]
AuraGroot -> AuraBridge: 200 OK
AuraGroot -> AuthenticationApi: GET AuraId
AuthenticationApi -> AuraGroot: 200 OK {UserData}
AuraGroot -> AuraGroot: GetSkillByChannel
AuraGroot -> AuraBot: Request [message]
AuraBot -> AuraGroot: 200 OK
AuraBot -> AuraBot: See Basic WhatsApp flow for authenticated users
AuraBot -> AuraBot: Recognizers
AuraBot -> AuraBot: Main Dialog
AuraBot -> AuraBot: Execute dialog that calls to an asynchronous API
AuraBot -> AuraBot: The dialog inits bypass
AuraBot -> AsyncApi: POST request
AsyncApi -> AuraBot: 200 OK
AsyncApi -> AuraBridge: POST async-callback/notifications with response data
AuraBridge -> AsyncApi: 200 OK
AuraBridge -> AuraGroot: Send [payload with response data]
AuraGroot -> AuraBridge: 200 OK
AuraGroot -> AuraBot: Send [payload with response data]
AuraBot -> AuraGroot: 200 OK
AuraBot -> AuraBot: Back to the dialog that opened the bypass
AuraBot -> AuraBot: Process [payload with response data]
AuraBot -> AuraGroot: Send [async request response]
AuraGroot -> AuraBot: 200 OK
AuraGroot -> AuraBridgeOutbound: Response to [message]
AuraBridgeOutbound -> AuraGroot: 200 OK
AuraBridgeOutbound -> KernelWhatsAppApi: Response to [message]
KernelWhatsAppApi -> AuraBridgeOutbound: 200 OK
KernelWhatsAppApi -> WhatsApp: Response to [message]
WhatsApp -> User: Show response to [message]
@enduml
Message use case that receives files from the user
This experience is defined in the guidelines for using files in WhatsApp use cases.
The example is provided using WhatsApp, which is currently the only channel able to handle incoming files.
@startuml
title: Use case expecting files from the user
actor User
participant WhatsApp #f6b5ff
participant AuthenticationApi #FFFF99
participant AuraGroot #76bbe7
participant AuraBot #41a0f9
participant AuraBridge #1add4d
participant AuraBridgeOutbound #1add4d
participant KernelWhatsAppApi #99FFFF
participant FileManager #fae193
participant AzureStorage #dedddb
User -> WhatsApp: Request [message]
WhatsApp -> KernelWhatsAppApi: Request [message]
KernelWhatsAppApi -> AuraBridge: Request [message]
AuraBridge -> KernelWhatsAppApi: 200 OK
AuraBridge -> AuraGroot: Request [message]
AuraGroot -> AuraBridge: 200 OK
AuraGroot -> AuthenticationApi: GET AuraId
AuthenticationApi -> AuraGroot: 200 OK {UserData}
AuraGroot -> AuraGroot: GetSkillByChannel
AuraGroot -> AuraBot: Request [message]
AuraBot -> AuraGroot: 200 OK
AuraBot -> AuraBot: See Basic WhatsApp flow for authenticated users
AuraBot -> AuraBot: Recognizers
AuraBot -> AuraBot: Main Dialog
AuraBot -> AuraBot: Execute dialog that requests a file from the user
AuraBot -> AuraBot: The dialog inits bypass
AuraBot -> AuraGroot: Send [Provide a file]
AuraGroot -> AuraBot: 200 OK
AuraGroot -> AuraBridgeOutbound: Response to [Provide a file]
AuraBridgeOutbound -> AuraGroot: 200 OK
AuraBridgeOutbound -> KernelWhatsAppApi: Response to [Provide a file]
KernelWhatsAppApi -> AuraBridgeOutbound: 200 OK
KernelWhatsAppApi -> WhatsApp: Response to [Provide a file]
WhatsApp -> User: Show [Provide a file]
User -> WhatsApp: Send [requested file]
WhatsApp -> KernelWhatsAppApi: Request [requested file]
KernelWhatsAppApi -> AuraBridge: Request [requested file]
AuraBridge -> KernelWhatsAppApi: 200 OK
AuraBridge -> AuraGroot: Request [requested file]
Note over AuraBridge,AuraGroot: file is sent as an Attachment to the bot
AuraGroot -> AuraBridge: 200 OK
AuraGroot -> AuraGroot: GetSkillByChannel
AuraGroot -> AuraBot: Request [activity[attachment[file]]]
AuraBot -> AuraGroot: 200 OK
AuraBot -> AuraBot: See Basic WhatsApp flow for authenticated users
AuraBot -> AuraBot: Middleware that handles file attachments
AuraBot -> AuraBot: check that a dialog was waiting for a file
AuraBot -> FileManager: POST manage(file)
FileManager -> AuraBot: 200 OK
FileManager -> KernelWhatsAppApi: GET /media/file
Note right of FileManager: In fact, file is passed by streaming from WhatsApp media API to Azure Storage
KernelWhatsAppApi -> FileManager: 200 OK {fileStream}
FileManager -> FileManager: validate(file)
FileManager -> AzureStorage: POST upload(file)
AzureStorage -> FileManager: 201 Created
FileManager -> AuraBridge: POST async-callback/notifications with file validation data
Note over FileManager,AuraBridge: FileManager response contains the file validation\nand the local Azure Storage URL where the file can be obtained.
AuraBridge -> FileManager: 200 OK
AuraBridge -> AuraGroot: Send [payload with file validation data]
AuraGroot -> AuraBridge: 200 OK
AuraGroot -> AuraBot: Send [payload with file validation data]
AuraBot -> AuraGroot: 200 OK
AuraBot -> AuraBot: Back to the dialog that waits for a file
AuraBot -> AuraBot: Process [payload with file validation data]
AuraBot -> AuraGroot: Send [file response]
AuraGroot -> AuraBot: 200 OK
AuraGroot -> AuraBridgeOutbound: Response to [file response]
AuraBridgeOutbound -> AuraGroot: 200 OK
AuraBridgeOutbound -> KernelWhatsAppApi: Response to [file response]
KernelWhatsAppApi -> AuraBridgeOutbound: 200 OK
KernelWhatsAppApi -> WhatsApp: Response to [file response]
WhatsApp -> User: Show response to [file response]
@enduml
TV use cases
Currently, TV use cases are only available for authenticated users.
TV use case for channels with integration with channelData v3
Operational flow for TV use cases in channels integrated with channelData v3.
@startuml
title: TV use case for channelData V3
actor User
participant Channel #bdf492
participant DirectLine #FFCC99
participant DirectLineWebsocket #FFCC99
participant AuthenticationApi #FFFF99
participant AuraGroot #76bbe7
participant AuraBot #41a0f9
participant ComplexLogicApi #CCCCFF
participant KernelVideoContentsApi #99FFFF
Channel -> DirectLineWebsocket: Open WebSocket
User -> Channel: Send [I want to see an action movie]
Channel -> DirectLine: Send {activity[I want to see an action movie]}
DirectLine -> AuraGroot: Send {activity[I want to see an action movie]}
AuraGroot -> DirectLine: 200 OK
AuraGroot -> AuraGroot: Middlewares
AuraGroot -> AuraGroot: Recognizers (GetSkillByChannel)
AuraGroot -> AuraBot: Send {activity[I want to see an action movie]}
AuraBot -> AuraGroot: 200 OK
AuraBot -> AuraBot: Basic DirectLine flow for authenticated users
AuraBot -> AuraBot: Middlewares
AuraBot -> AuraBot: Recognizers intent.tv.search
AuraBot -> AuraBot: Main Dialog
AuraBot -> AuraBot: Execute intent.tv.search Dialog
AuraBot -> ComplexLogicApi: POST tv/query {intent: intent.tv.search, entities: movie, action}
ComplexLogicApi -> KernelVideoContentsApi: GET /videocontents filter by user context and entities
KernelVideoContentsApi -> ComplexLogicApi: 200 OK [{videoContent}]
ComplexLogicApi -> AuraBot: 200 OK [{videoContent}]
AuraBot -> AuraGroot: Send [{videoContent}]
AuraGroot -> AuraBot: 200 OK
AuraGroot -> DirectLine: Send [{videoContent}]
DirectLine -> AuraGroot: 200 OK
Channel -> DirectLineWebsocket: Read [{videoContent}]
Channel -> User: Show [{videoContent}]
@enduml
TV use case for channels with integration with channelData v1
Operational flow for TV use cases in channels integrated with channelData v1.
This scenario is only available in Spain.
@startuml
title: TV use case for channelData V1
actor User
participant Channel #bdf492
participant DirectLine #FFCC99
participant DirectLineWebsocket #FFCC99
participant AuthenticationApi #FFFF99
participant AuraGroot #76bbe7
participant AuraBot #41a0f9
participant MovistarResolutionApi #CCCCFF
participant KernelLegacyVideoApi #99FFFF
Channel -> DirectLineWebsocket: Open WebSocket
User -> Channel: Send [I want to see an action movie]
Channel -> DirectLine: Send {activity[I want to see an action movie]}
DirectLine -> AuraGroot: Send >{activity[I want to see an action movie]}
AuraGroot -> DirectLine: 200 OK
AuraGroot -> AuraGroot: Middlewares
AuraGroot -> AuraGroot: Recognizers (GetSkillByChannel)
AuraGroot -> AuraBot: Send {activity[I want to see an action movie]}
AuraBot -> AuraGroot: 200 OK
AuraBot -> AuraBot: Basic DirectLine flow for authenticated users
AuraBot -> AuraBot: Middlewares
AuraBot -> AuraBot: Recognizers intent.tv.search
AuraBot -> AuraBot: Main Dialog
AuraBot -> AuraBot: Execute intent.tv.search Dialog
AuraBot -> MovistarResolutionApi: POST tv/query {intent: intent.tv.search, entities: movie, action}
MovistarResolutionApi -> KernelLegacyVideoApi: GET /video filter by user context and entities
KernelLegacyVideoApi -> MovistarResolutionApi: 200 OK [{videoContent}]
MovistarResolutionApi -> AuraBot: 200 OK {[{videoContent}], [{suggestion}]}
AuraBot -> AuraGroot: Send {[{videoContent}], [{suggestion}]}
AuraGroot -> AuraBot: 200 OK
AuraGroot -> DirectLine: Send {[{videoContent}], [{suggestion}]}
DirectLine -> AuraGroot: 200 OK
Channel -> DirectLineWebsocket: Read {[{videoContent}], [{suggestion}]}
Channel -> User: Show {[{videoContent}], [{suggestion}]}
@enduml