The image below shows the architecture and the flow at runtime. The single page application, when uploaded to the skill, is referenced from the System.Webview component in a dialog flow.
When the System.Webview component is called, it launches the web application in a separate browser tab (web) or webview (mobile). By doing this it passes input parameters to the web application. The input parameters are injected to the index.html file's head section and include a callback URL the application uses to pass control and a response payload back to the bot. Read the complete article here.
For regular information become a member in the Developer Partner Community please register here.