Data is useless without the ability to easily get and act on it. The success of future enterprises will combine sophisticated information collection with better user experience, and the Natural Language User Interface comprises much of this user experience. Intuitive Natural Language Interface allows users to find, compare, analyze, drill and manipulate existing information in the data warehouse to derive insights and act accordingly. This article presents detail instructions on how technically skilled experts can implement cognitive automation use cases and provide non-technical employees intuitive access to enterprise data by Natural Language Interface. Before we start, it assumed that non-technical people have access to at least one of the following interfaces: Microsoft Teams, Skype for Business (Lync), Slack, Skype, Telegram, Email, Telegram, Messenger, Cortana, or web-browser. All the abovementioned Natural Language Interfaces included in Microsoft Azure Application. Other applications also possible, but not covered in this tutorial. The basic tools you need to prepare are: 1. . You can create by the link After registration you should keep 2 parameters: APP_ID = ‘your-application-id’ APP_PASSWORD = ‘your-application-password’ 2. . Our tutorial in based on Python environment, so you need to import Python MS Bot Framework SDK Create MS Application https://dev.botframework.com/bots/provision MS Bot Framework SDK https://dev.botframework.com/ https://github.com/microsoft/botbuilder-python 3. . For security reasons all requests should be encrypted with HTTPS protocol TLS 1.3, which encrypts all requests, so anyone can access it. You can buy SSL certificates or generate it with CertBot on your own. SSL certificates 4. Take care of processes. As you expect your application will have a lot of requests from lots of the users at the same time, you should pay your attention to implement asynchronous for all your processes in order to avoid the bottleneck. For the Python environment used for this tutorial, we use asyncio library. Asyncio is a python library to write concurrent code using the async/await syntax. In case you use an environment different from Python, you can feel free to search for other asynchronous libraries. Asynchronous 5. . The same asynchronous pattern for API. In this tutorial, AIOHTTP is used. Asynchronous API 6. for NLP to SQL API. web service is used for unstructured Natural Language user request transformation into Structured Query Language. For this tutorial, we are using NLSQL. For NLSQL customization you should have database schema and Q&A samples you would like to use. For NLP to API webservice you should have your API web service documentation as well as Q&A dialog sample. URL and Secret Token NLP to SQL Well, after all, the above-mentioned tools are ready, we can simulate the software architecture (you can find the story picture above). Below you can find Bot System sample for Python environment: ssl aiohttp web asyncio aiohttp botbuilder.core (BotFrameworkAdapter, BotFrameworkAdapterSettings, TurnContext, MemoryStorage) botbuilder.schema (Attachment, Activity, ActivityTypes) APP_ID = APP_PASSWORD = SSL_CONTEXT = ssl.SSLContext(ssl.PROTOCOL_SSLv23) SSL_CONTEXT.load_cert_chain( , ) PORT = SETTINGS = BotFrameworkAdapterSettings(APP_ID, APP_PASSWORD) ADAPTER = BotFrameworkAdapter(SETTINGS) activity = Activity( type=ActivityTypes.message, channel_id=request_activity.channel_id, conversation=request_activity.conversation, recipient=request_activity.from_property, from_property=request_activity.recipient, attachment_layout= , text=text, service_url=request_activity.service_url) attachment: activity.attachments = attachment activity context.activity.members_added[ ].id != context.activity.recipient.id: response = create_reply_activity(context.activity, ) context.send_activity(response) web.Response(status= ) web.Response(status= ) url = headers = { : , : } payload = { : text} aiohttp.ClientSession() session: r = session.post(url, headers=headers, json=payload) data = r.json() data context.activity.type == : : data = api_connect(context.activity.text) data_type = data[ ] data_type == : result = data[ ][ ] + + data[ ][ ] : result = data[ ] response = create_reply_activity(context.activity, result) context.send_activity(response) KeyError: context.activity.type == : handle_conversation_update(context) context.activity.action == : handle_conversation_update(context) : unhandled_activity() body = request.json() activity = Activity().deserialize(body) auth_header = request.headers[ ] request.headers web.Response(status= ) : ADAPTER.process_activity(activity, auth_header, request_handler) Exception exc: exc app = web.Application(loop=loop) app.add_routes([web.post( , messages)]) app : loop = asyncio.get_event_loop() app = loop.run_until_complete(init_app(loop)) web.run_app(app, host= , port=PORT) Exception e: e #!/usr/bin/python import from import import import from import from import '' #1 add your APP ID '' #2 add you APP Password '' '' #3 add your SSL certificates 8000 async -> Activity: def create_reply_activity (request_activity: Activity, text: str, attachment: Attachment = None) 'carousel' if return async -> web.Response: def handle_conversation_update (context: TurnContext) if 0 await "Hello world!" await return 200 async -> web.Response: def unhandled_activity () return 404 async : def api_connect (text) 'https://api.nlsql.com/sap' #4 add your API url here 'Authorization' 'Token API KEY' 'Content-Type' 'application/json' #5 add your API Key 'message' async with as await await return # MAIN function for bot async -> web.Response: def request_handler (context: TurnContext) if 'message' try await # Make connection to own internal database and take data using received sql # Build separate logic for different API reply message types, if you need it. # data_type = data["data_type"] # if data_type == 'graph': # ... # elif data_type == 'message': # ... # elif data_type == 'buttons': # ... # elif data_type == 'error': # ... # etc. "data_type" if 'ytd' 'sql' 'sql1' ' \n' 'sql' 'sql2' else 'sql' await await except pass elif 'conversationUpdate' return await elif 'add' return await else return await async -> web.Response: def messages (request) await # print("request: ", request.headers) # print("body: ", body) 'Authorization' if 'Authorization' in else '' 200 try return await except as raise async : def init_app (loop) '/api/messages' return try '127.0.0.1' except as raise The same logic should be applied in case of any other programming language usage. Data becomes the worldwide economy’s raw material. It pursuit drives antiquated sectors to reinvent themselves. Energy, production, healthcare, retail, and even government undergo a digital transformation. However, information is useless without the ability to use it and act correspondingly. Companies that will survive the next decade will not only have superior information; they will have an intuitive and flexible user interface for everyone. The intuitive user interface is based on human objectives and behavior, which could be different. has behavioral impacts that drive further business decisions and improves enterprise financial results. Cognitive Automation Different user experience changes how people make choices in subtle and unconscious ways. What is seen, where it is presented, and how it provides interactions, influences actions. The ability to query data easily will stimulate people for using the information and make more data-driven choices in order to drive the businesses forward faster. I am CEO and founder of NLSQL, where we are designing the future of Cognitive Automation