├── choregraphe └── watson_nao_robot │ ├── .metadata │ ├── WatsonNaoRobot.pml │ ├── manifest.xml │ └── WatsonSTT │ └── behavior.xar ├── doc └── source │ └── images │ ├── results.PNG │ ├── first_flow.PNG │ ├── second_flow.PNG │ ├── architecture.png │ ├── insert_dataframe.PNG │ ├── bluemix_service_stt.png │ ├── import_nodered_flow.png │ ├── note_websocket_url.png │ ├── update_websocket_url.png │ ├── bluemix_service_nodered.png │ ├── conversation_dialog_pic.png │ ├── conversation_agent_intents.png │ ├── open_conversation_details.png │ ├── bluemix_service_conversation.png │ ├── choregraphe_transfer_behavior.png │ ├── choregraphe_update_node_red.png │ ├── conversation_agent_entities.png │ ├── conversation_system_enities.png │ ├── import_conversation_workspace.png │ ├── choregraphe_update_credentials.png │ ├── watson_stt_service_credentials.png │ └── conversation_credantial_note_down.png ├── CONTRIBUTING.md ├── DEBUGGING.md ├── MAINTAINERS.md ├── DEVELOPING.md ├── node-red-flow ├── first_flow.json └── second_flow.json ├── LICENSE ├── notebook └── robo_notebook.ipynb ├── README.md └── conversation └── workspace.json /choregraphe/watson_nao_robot/.metadata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/source/images/results.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/results.PNG -------------------------------------------------------------------------------- /doc/source/images/first_flow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/first_flow.PNG -------------------------------------------------------------------------------- /doc/source/images/second_flow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/second_flow.PNG -------------------------------------------------------------------------------- /doc/source/images/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/architecture.png -------------------------------------------------------------------------------- /doc/source/images/insert_dataframe.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/insert_dataframe.PNG -------------------------------------------------------------------------------- /doc/source/images/bluemix_service_stt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/bluemix_service_stt.png -------------------------------------------------------------------------------- /doc/source/images/import_nodered_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/import_nodered_flow.png -------------------------------------------------------------------------------- /doc/source/images/note_websocket_url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/note_websocket_url.png -------------------------------------------------------------------------------- /doc/source/images/update_websocket_url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/update_websocket_url.png -------------------------------------------------------------------------------- /doc/source/images/bluemix_service_nodered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/bluemix_service_nodered.png -------------------------------------------------------------------------------- /doc/source/images/conversation_dialog_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/conversation_dialog_pic.png -------------------------------------------------------------------------------- /doc/source/images/conversation_agent_intents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/conversation_agent_intents.png -------------------------------------------------------------------------------- /doc/source/images/open_conversation_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/open_conversation_details.png -------------------------------------------------------------------------------- /doc/source/images/bluemix_service_conversation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/bluemix_service_conversation.png -------------------------------------------------------------------------------- /doc/source/images/choregraphe_transfer_behavior.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/choregraphe_transfer_behavior.png -------------------------------------------------------------------------------- /doc/source/images/choregraphe_update_node_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/choregraphe_update_node_red.png -------------------------------------------------------------------------------- /doc/source/images/conversation_agent_entities.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/conversation_agent_entities.png -------------------------------------------------------------------------------- /doc/source/images/conversation_system_enities.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/conversation_system_enities.png -------------------------------------------------------------------------------- /doc/source/images/import_conversation_workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/import_conversation_workspace.png -------------------------------------------------------------------------------- /doc/source/images/choregraphe_update_credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/choregraphe_update_credentials.png -------------------------------------------------------------------------------- /doc/source/images/watson_stt_service_credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/watson_stt_service_credentials.png -------------------------------------------------------------------------------- /doc/source/images/conversation_credantial_note_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/watson-nao-robot/HEAD/doc/source/images/conversation_credantial_note_down.png -------------------------------------------------------------------------------- /choregraphe/watson_nao_robot/WatsonNaoRobot.pml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /choregraphe/watson_nao_robot/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WatsonNaoRobot 5 | 6 | 7 | en_US 8 | 9 | 10 | en_US 11 | 12 | 13 | 14 | interactive 15 | 16 | WatsonSTT 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This is an open source project, and we appreciate your help! 4 | 5 | We use the GitHub issue tracker to discuss new features and non-trivial bugs. 6 | 7 | In addition to the issue tracker, [#journeys on 8 | Slack](https://dwopen.slack.com) is the best way to get into contact with the 9 | project's maintainers. 10 | 11 | To contribute code, documentation, or tests, please submit a pull request to 12 | the GitHub repository. Generally, we expect two maintainers to review your pull 13 | request before it is approved for merging. For more details, see the 14 | [MAINTAINERS](MAINTAINERS.md) page. 15 | -------------------------------------------------------------------------------- /DEBUGGING.md: -------------------------------------------------------------------------------- 1 | Troubleshooting 2 | =============== 3 | 4 | Jupyter Notebooks 5 | ----------------- 6 | 7 | * Make sure the pip install ran correctly. You might need to restart the kernel and run the cells from the top after the pip install runs the first time. 8 | * Many of the cells rely on variables that are set in earlier cells. Some of these are cleared in later cells. Start over at the top when troubleshooting. 9 | * Many of the cells rely on service credentials from Bluemix that are set in earlier cells. Make sure to add your service credentials correctly. 10 | * If the Start Websocket client step throws an error as shown below, please refer to the step `Update the websocket URL in the notebook` in Section 10 of the documentation. 11 | 12 | --- response header --- 13 | HTTP/1.1 500 Error 14 | X-Backside-Transport: FAIL FAIL 15 | Content-Type: text/xml 16 | Connection: close 17 | 18 | Node-RED 19 | -------- 20 | 21 | * Refer to sections 5 & 6 in the documentation regarding the usage of Node-RED flow. Please make sure to update the Node-RED based URL in the json file before importing it into the Node-RED editor. 22 | 23 | Watson Assistant 24 | ---------------- 25 | 26 | * Make sure that the Watson Assistant service credentials which had been noted down in step 2 and and Workspace ID which had been noted down in step 3, has been updated in the Watson Assistant node in Node Red Flow according to step 5. 27 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | # Maintainers Guide 2 | 3 | This guide is intended for maintainers - anybody with commit access to one or 4 | more Code Pattern repositories. 5 | 6 | ## Methodology 7 | 8 | This repository does not have a traditional release management cycle, but 9 | should instead be maintained as a useful, working, and polished reference at 10 | all times. While all work can therefore be focused on the master branch, the 11 | quality of this branch should never be compromised. 12 | 13 | The remainder of this document details how to merge pull requests to the 14 | repositories. 15 | 16 | ## Merge approval 17 | 18 | The project maintainers use LGTM (Looks Good To Me) in comments on the pull 19 | request to indicate acceptance prior to merging. A change requires LGTMs from 20 | two project maintainers. If the code is written by a maintainer, the change 21 | only requires one additional LGTM. 22 | 23 | ## Reviewing Pull Requests 24 | 25 | We recommend reviewing pull requests directly within GitHub. This allows a 26 | public commentary on changes, providing transparency for all users. When 27 | providing feedback be civil, courteous, and kind. Disagreement is fine, so long 28 | as the discourse is carried out politely. If we see a record of uncivil or 29 | abusive comments, we will revoke your commit privileges and invite you to leave 30 | the project. 31 | 32 | During your review, consider the following points: 33 | 34 | ### Does the change have positive impact? 35 | 36 | Some proposed changes may not represent a positive impact to the project. Ask 37 | whether or not the change will make understanding the code easier, or if it 38 | could simply be a personal preference on the part of the author (see 39 | [bikeshedding](https://en.wiktionary.org/wiki/bikeshedding)). 40 | 41 | Pull requests that do not have a clear positive impact should be closed without 42 | merging. 43 | 44 | ### Do the changes make sense? 45 | 46 | If you do not understand what the changes are or what they accomplish, ask the 47 | author for clarification. Ask the author to add comments and/or clarify test 48 | case names to make the intentions clear. 49 | 50 | At times, such clarification will reveal that the author may not be using the 51 | code correctly, or is unaware of features that accommodate their needs. If you 52 | feel this is the case, work up a code sample that would address the pull 53 | request for them, and feel free to close the pull request once they confirm. 54 | 55 | ### Does the change introduce a new feature? 56 | 57 | For any given pull request, ask yourself "is this a new feature?" If so, does 58 | the pull request (or associated issue) contain narrative indicating the need 59 | for the feature? If not, ask them to provide that information. 60 | 61 | Are new unit tests in place that test all new behaviors introduced? If not, do 62 | not merge the feature until they are! Is documentation in place for the new 63 | feature? (See the documentation guidelines). If not do not merge the feature 64 | until it is! Is the feature necessary for general use cases? Try and keep the 65 | scope of any given component narrow. If a proposed feature does not fit that 66 | scope, recommend to the user that they maintain the feature on their own, and 67 | close the request. You may also recommend that they see if the feature gains 68 | traction among other users, and suggest they re-submit when they can show such 69 | support. 70 | -------------------------------------------------------------------------------- /DEVELOPING.md: -------------------------------------------------------------------------------- 1 | Tips for Developers 2 | =================== 3 | 4 | The notebook is designed to be run top-down. Settings in early cells are used 5 | in later cells. Some variables are also cleared to free up memory. So, although 6 | you can often run single cell repeatedly while testing changes, you may want 7 | to start over from the top if anything seems to be missing. 8 | 9 | Setting credentials 10 | ------------------- 11 | Credentials need to be added to the notebook to access some Bluemix services. 12 | The credentials are set near the top of the notebook to make it 13 | more obvious that they need to be set and also to make it more obvious that 14 | you will be saving a notebook with credentials. You should not share your 15 | notebook with anyone that you would not share your credentials with 16 | unless you use the ``share`` feature with the ``Only text and output`` or 17 | ``All content excluding sensitive code cells`` option. 18 | 19 | The ```@hidden_cell``` magic is used to mark the credentials cells as 20 | "sensitive". If you do any rearranging of sensitive code, remember to identify 21 | sensitive cells with ``@hidden_cell``. 22 | 23 | Installing Python packages 24 | -------------------------- 25 | A notebook can use ```!pip install``` to install the Python packages 26 | from PyPI. You can follow this example if you decide to use additional Python 27 | packages in your notebook. Check the output to see that the install was 28 | successful. See the "Controlling output" section below for more information on 29 | how to suppress/show the output. You might want to use ``DEBUG = True`` until 30 | you've verified that the pip install was successful. 31 | 32 | > **Note**: After running a cell with pip install, you may need to restart 33 | the kernel and then run the cells again from the top. 34 | 35 | Importing libraries 36 | ------------------- 37 | Import and some setup of libraries is done near the top. This is another 38 | example of why cells need to run top-down. Keeping the imports near the top 39 | is a Python PEP8 style convention. Python does not require this convention, 40 | but Python developers are used to looking for imports at the top. 41 | 42 | Defining global variables and helper functions 43 | ---------------------------------------------- 44 | After the imports, a few global variables and helper functions are defined. 45 | These allow for code re-use. These cells need to run before other cells can 46 | use the functions and globals. These values do not change. You can change 47 | and run the later cells over and over without always restarting from the top. 48 | 49 | Controlling output 50 | ------------------ 51 | One of the great things about notebooks is that you can use them to document 52 | what you are doing, show your work, show the results, and document your 53 | conclusion -- all in one place. Sharing "your work" (the code) is a great 54 | feature, but to make the "only text and output" web page look nice and clean 55 | you can use the following tips. 56 | 57 | #### @hidden_cell magic 58 | 59 | The @hidden_cell magic is used to mark the credentials cells as "sensitive". 60 | If you do any rearranging of sensitive code, remember to identify sensitive 61 | cells with @hidden_cell. 62 | 63 | #### Ending with a semi-colon 64 | 65 | Statements in a notebook can end with a semi-colon. It looks like 66 | bad Python, but it is actually a trick to prevent these statements from 67 | showing their result in the output. 68 | 69 | #### if DEBUG 70 | 71 | A DEBUG boolean and 'if' statements can be used throughout the notebook 72 | wherever some print statements are handy during development and might be 73 | handy in the future, but are not something you want to share in the final 74 | output. 75 | 76 | #### %%capture captured_io 77 | 78 | "%%capture captured_io" magic can be used to capture the output when nothing 79 | else works. You can use that to hide the "!pip install" output and add a cell 80 | right after it that will print the captured output if DEBUG is True. 81 | -------------------------------------------------------------------------------- /node-red-flow/first_flow.json: -------------------------------------------------------------------------------- 1 | [{"id":"6bf4ae62.28e74","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"323cd4b0.b4bc6c","type":"http in","z":"6bf4ae62.28e74","name":"Send message to socket","url":"/sendmsgsocket","method":"post","upload":false,"swaggerDoc":"","x":139,"y":142,"wires":[["f072ce6b.476868","ffb6455a.c31b7"]]},{"id":"f072ce6b.476868","type":"function","z":"6bf4ae62.28e74","name":"Pre Service Processing","func":"// stash away incoming data\nmsg.mydata = {};\nmsg.mydata.messagein = msg.req.body.msgdata;\nmsg.payload = msg.mydata.messagein;\n\nmsg.params = { \"context\": msg.req.body.context};\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":340,"wires":[["b52472ed.533fd"]]},{"id":"833a6120.92af6","type":"function","z":"6bf4ae62.28e74","name":"Post Service Processing","func":"msg.mydata.messageout = msg.payload;\nmsg.payload = {};\nmsg.payload.botresponse = msg.mydata;\nvar globalContext = global;\nglobalContext.set(\"payload\",msg.payload); \nreturn msg;\n\n","outputs":1,"noerr":0,"x":770,"y":200,"wires":[["8753093a.94505","95541ce5.8eae6","64d5bfdb.af5cc8"]]},{"id":"8753093a.94505","type":"http response","z":"6bf4ae62.28e74","name":"","statusCode":"","headers":{},"x":970,"y":140,"wires":[]},{"id":"95541ce5.8eae6","type":"function","z":"6bf4ae62.28e74","name":"","func":"temp=msg.payload.botresponse.messageout.output.action\nif (temp == \"question_completed\") \n{\n return msg;\n}\n","outputs":1,"noerr":0,"x":730,"y":360,"wires":[["8d8fef4.6af679"]]},{"id":"6e0f6f22.a5bec8","type":"function","z":"6bf4ae62.28e74","name":"","func":"msg._session=\"\";\nvar payload = msg.payload;\nvar jsonpayload = JSON.parse(payload);\nnode.error(jsonpayload);\nif (\"Answer\" in jsonpayload) {\n var globalContext = global;\n var payload = global.get(\"payload\");\n payload.botresponse.messageout.output.text = jsonpayload[\"Answer\"];\n globalContext.set(\"payload\", payload);\n}\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":640,"wires":[["34cb017e.ad4c56"]]},{"id":"6f42c0d8.f1782","type":"debug","z":"6bf4ae62.28e74","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":410,"y":440,"wires":[]},{"id":"b062a5a1.11fcd","type":"websocket in","z":"6bf4ae62.28e74","name":"","server":"2cfc5153.0f401e","client":"","x":150,"y":500,"wires":[["6f42c0d8.f1782","6e0f6f22.a5bec8"]]},{"id":"b52472ed.533fd","type":"watson-conversation-v1","z":"6bf4ae62.28e74","name":"assistant","workspaceid":"Update the workspace id","multiuser":false,"context":true,"empty-payload":false,"default-endpoint":false,"service-endpoint":"https://gateway.watsonplatform.net/assistant/api","timeout":"","optout-learning":false,"x":580,"y":280,"wires":[["833a6120.92af6","ce5ddc01.4d882"]]},{"id":"34cb017e.ad4c56","type":"websocket out","z":"6bf4ae62.28e74","name":"","server":"2cfc5153.0f401e","client":"","x":760,"y":600,"wires":[]},{"id":"8d8fef4.6af679","type":"websocket out","z":"6bf4ae62.28e74","name":"","server":"913e1e51.ad8c1","client":"","x":900.888916015625,"y":494.22222900390625,"wires":[]},{"id":"64d5bfdb.af5cc8","type":"debug","z":"6bf4ae62.28e74","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":980,"y":280,"wires":[]},{"id":"ce5ddc01.4d882","type":"debug","z":"6bf4ae62.28e74","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":750,"y":240,"wires":[]},{"id":"ffb6455a.c31b7","type":"debug","z":"6bf4ae62.28e74","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":400,"y":120,"wires":[]},{"id":"714dc3a4.842004","type":"http in","z":"6bf4ae62.28e74","name":"","url":"/getResponse","method":"post","upload":false,"swaggerDoc":"","x":170,"y":760,"wires":[["47c4b089.f98fb"]]},{"id":"47c4b089.f98fb","type":"function","z":"6bf4ae62.28e74","name":"","func":"var globalContext = global;\npayload = globalContext.get(\"payload\"); \nnode.error(payload);\nmsg.payload = payload;\nreturn msg;\n","outputs":1,"noerr":0,"x":432,"y":762,"wires":[["40299c0.6d47b64"]]},{"id":"40299c0.6d47b64","type":"http response","z":"6bf4ae62.28e74","name":"","statusCode":"","headers":{},"x":710,"y":762,"wires":[]},{"id":"2cfc5153.0f401e","type":"websocket-listener","z":"","path":"/ws/orchestrate","wholemsg":"false"},{"id":"913e1e51.ad8c1","type":"websocket-listener","z":"","path":"ws://NODERED BASED URL/ws/orchestrate","wholemsg":"false"}] -------------------------------------------------------------------------------- /node-red-flow/second_flow.json: -------------------------------------------------------------------------------- 1 | [{"id":"5f3d22ef.cd291c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"526c9944.b2a19","type":"http in","z":"5f3d22ef.cd291c","name":"","url":"/getAnswer","method":"post","upload":false,"swaggerDoc":"","x":200,"y":260,"wires":[["c4af47f9.b5e7b8","4dbb9f44.c9b58"]]},{"id":"84b9a665.85956","type":"http response","z":"5f3d22ef.cd291c","name":"","statusCode":"","headers":{},"x":790,"y":200,"wires":[]},{"id":"9489653f.31fef","type":"delay","z":"5f3d22ef.cd291c","name":"","pauseType":"delay","timeout":"7","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":160,"wires":[["102af3a1.8add64"]]},{"id":"c4af47f9.b5e7b8","type":"debug","z":"5f3d22ef.cd291c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":364,"y":337.25,"wires":[]},{"id":"102af3a1.8add64","type":"http request","z":"5f3d22ef.cd291c","name":"getAnswerFromContext","method":"POST","ret":"txt","url":"NODERED BASED URL/getResponse","tls":"","x":580,"y":255.5,"wires":[["84b9a665.85956","13cc55f8.989222"]]},{"id":"4dbb9f44.c9b58","type":"http request","z":"5f3d22ef.cd291c","name":"invoke socket","method":"POST","ret":"txt","url":"NODERED BASED URL/sendmsgsocket","tls":"","x":360,"y":160,"wires":[["9489653f.31fef"]]},{"id":"99dcbec7.e314b8","type":"comment","z":"5f3d22ef.cd291c","name":"Provide a ReST endpoint to be invoked by clients","info":"","x":280,"y":100,"wires":[]},{"id":"fc9b9951.3776e8","type":"http in","z":"5f3d22ef.cd291c","name":"BOT Home Page","url":"/home","method":"get","upload":false,"swaggerDoc":"","x":200,"y":420,"wires":[["9f222db1.5a77f"]]},{"id":"9f222db1.5a77f","type":"template","z":"5f3d22ef.cd291c","name":"Conversation BOT Template","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n \n \n \n \n \n\t My BOT\n\t\n\t\n \n \n\n
\n
\n This application needs JavaScript enabled in your browser!\n
\n
\n\n

Welcome to the Robot Journey

\n
\n\t
\n\t \n\t
\n\t
\n \n \n

\n\t
\n\t \n\t
\n
\n \n \n\n \n \n\n","x":434,"y":420,"wires":[["bae802b4.8beb98"]]},{"id":"bae802b4.8beb98","type":"http response","z":"5f3d22ef.cd291c","name":"","statusCode":"","headers":{},"x":670,"y":420,"wires":[]},{"id":"13cc55f8.989222","type":"debug","z":"5f3d22ef.cd291c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":740,"y":340,"wires":[]}] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /notebook/robo_notebook.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Derive Analytics on data using Python Jupyter Notebook, Watson Conversation & NAO Robot \n", 8 | "### Expose an integration point using websockets for orchestration with Node-RED using Watson Conversation & NAO Robot." 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "## 1. Setup\n", 16 | "To prepare your environment, you need to install some packages.\n", 17 | "\n", 18 | "### 1.1 Install the necessary packages\n", 19 | "\n", 20 | "You need the latest versions of these packages:
\n", 21 | "- websocket-client: is a python client for the Websockets.
\n", 22 | "\n", 23 | "** Install the websocket client: **" 24 | ] 25 | }, 26 | { 27 | "cell_type": "code", 28 | "execution_count": null, 29 | "metadata": {}, 30 | "outputs": [], 31 | "source": [ 32 | "!pip install websocket-client" 33 | ] 34 | }, 35 | { 36 | "cell_type": "markdown", 37 | "metadata": {}, 38 | "source": [ 39 | "### 1.2 Import packages and libraries\n", 40 | "\n", 41 | "Import the packages and libraries that are needed:" 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": null, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "from io import StringIO\n", 51 | "import requests\n", 52 | "import json\n", 53 | "import pandas as pd\n", 54 | "import websocket\n", 55 | "import json\n", 56 | "from datetime import datetime\n", 57 | "import _thread\n", 58 | "import time\n", 59 | "import numpy as np" 60 | ] 61 | }, 62 | { 63 | "cell_type": "markdown", 64 | "metadata": {}, 65 | "source": [ 66 | "## 2. Read the Data & convert it into Dataframe\n", 67 | "Click on Insert to code and then select Insert pandas DataFrame in the below empty cell." 68 | ] 69 | }, 70 | { 71 | "cell_type": "code", 72 | "execution_count": null, 73 | "metadata": {}, 74 | "outputs": [], 75 | "source": [ 76 | "#import pandas as pd\n", 77 | "#df = pd.read_csv('C:/Users/IBM_ADMIN/Desktop/ICM 5.3.0/data.csv')\n", 78 | "import sys\n", 79 | "import types\n", 80 | "import pandas as pd\n", 81 | "from botocore.client import Config\n", 82 | "import ibm_boto3\n", 83 | "\n", 84 | "def __iter__(self): return 0\n", 85 | "\n", 86 | "# @hidden_cell\n", 87 | "# The following code accesses a file in your IBM Cloud Object Storage. It includes your credentials.\n", 88 | "# You might want to remove those credentials before you share your notebook.\n", 89 | "client_554c07c959184a5fb85f7723b7045646 = ibm_boto3.client(service_name='s3',\n", 90 | " ibm_api_key_id='WtG7s66gkXY7EubDvehAdfx-KH3r0WurPV92SECjEQUU',\n", 91 | " ibm_auth_endpoint=\"https://iam.ng.bluemix.net/oidc/token\",\n", 92 | " config=Config(signature_version='oauth'),\n", 93 | " endpoint_url='https://s3-api.us-geo.objectstorage.service.networklayer.com')\n", 94 | "\n", 95 | "body = client_554c07c959184a5fb85f7723b7045646.get_object(Bucket='patternsnew-donotdelete-pr-sjba0eve5tgfo9',Key='data.csv')['Body']\n", 96 | "# add missing __iter__ method, so pandas accepts body as file-like object\n", 97 | "if not hasattr(body, \"__iter__\"): body.__iter__ = types.MethodType( __iter__, body )\n", 98 | "\n", 99 | "df_data_1 = pd.read_csv(body)\n", 100 | "df_data_1.head()\n", 101 | "\n" 102 | ] 103 | }, 104 | { 105 | "cell_type": "markdown", 106 | "metadata": {}, 107 | "source": [ 108 | "## 3. Assign a new name for the dataframe" 109 | ] 110 | }, 111 | { 112 | "cell_type": "code", 113 | "execution_count": null, 114 | "metadata": {}, 115 | "outputs": [], 116 | "source": [ 117 | "'''Rename the dataframe to df'''\n", 118 | "df = df_data_1\n", 119 | "#df.head()" 120 | ] 121 | }, 122 | { 123 | "cell_type": "code", 124 | "execution_count": null, 125 | "metadata": {}, 126 | "outputs": [], 127 | "source": [ 128 | "'''Rounding off the numeric columns in the dataset'''\n", 129 | "tmp = df.select_dtypes(include=[np.number])\n", 130 | "df.loc[:, tmp.columns] = np.round(tmp)\n", 131 | "df.head()" 132 | ] 133 | }, 134 | { 135 | "cell_type": "markdown", 136 | "metadata": {}, 137 | "source": [ 138 | "## 4. Create Generic re-usable functions for Statistics\n", 139 | "\n", 140 | "##### These functions can be applied to any dataset" 141 | ] 142 | }, 143 | { 144 | "cell_type": "code", 145 | "execution_count": null, 146 | "metadata": { 147 | "scrolled": true 148 | }, 149 | "outputs": [], 150 | "source": [ 151 | "def get_max_val(tuple1,tuple2,tuple3,tuple4):\n", 152 | " '''This Function takes four input parameters to find max value'''\n", 153 | " mr = df[(df[tuple1[0]] == tuple1[1]) & (df[tuple2[0]] == tuple2[1]) & (df[tuple3[0]] == tuple3[1])] [tuple4[0]].max()\n", 154 | " return mr" 155 | ] 156 | }, 157 | { 158 | "cell_type": "code", 159 | "execution_count": null, 160 | "metadata": {}, 161 | "outputs": [], 162 | "source": [ 163 | "def get_min_val(tuple1,tuple2,tuple3,tuple4):\n", 164 | " '''This Function takes four input parameters to find min value'''\n", 165 | " mr = df[(df[tuple1[0]] == tuple1[1]) & (df[tuple2[0]] == tuple2[1]) & (df[tuple3[0]] == tuple3[1])] [tuple4[0]].min()\n", 166 | " return mr" 167 | ] 168 | }, 169 | { 170 | "cell_type": "code", 171 | "execution_count": null, 172 | "metadata": {}, 173 | "outputs": [], 174 | "source": [ 175 | "def get_total_val(tuple1,tuple2,tuple3):\n", 176 | " '''This Function takes three input parameters to find total value'''\n", 177 | " mr = df[(df[tuple1[0]] == tuple1[1]) & (df[tuple2[0]] == tuple2[1])] [tuple3[0]].sum()\n", 178 | " return mr" 179 | ] 180 | }, 181 | { 182 | "cell_type": "code", 183 | "execution_count": null, 184 | "metadata": {}, 185 | "outputs": [], 186 | "source": [ 187 | "def get_avg_val(tuple1,tuple2,tuple3):\n", 188 | " '''This Function takes three input parameters to find average value'''\n", 189 | " mr = df[(df[tuple1[0]] == tuple1[1]) & (df[tuple2[0]] == tuple2[1])] [tuple3[0]].mean()\n", 190 | " return mr" 191 | ] 192 | }, 193 | { 194 | "cell_type": "code", 195 | "execution_count": null, 196 | "metadata": {}, 197 | "outputs": [], 198 | "source": [ 199 | "def top_three(t1,t2):\n", 200 | " '''This Function takes two input parameters to find top three'''\n", 201 | " tt = df.groupby(t1)[[t2]].sum().apply(lambda x: x.sort_values(ascending=False).head(3))\n", 202 | " return tt" 203 | ] 204 | }, 205 | { 206 | "cell_type": "code", 207 | "execution_count": null, 208 | "metadata": {}, 209 | "outputs": [], 210 | "source": [ 211 | "def top_new(t1,t2,t3):\n", 212 | " '''This Function takes three input parameters to find top n value - top of n value is dynamic'''\n", 213 | " tt = df.groupby(t1)[[t2]].sum().apply(lambda x: x.sort_values(ascending=False).head(t3))\n", 214 | " return tt" 215 | ] 216 | }, 217 | { 218 | "cell_type": "code", 219 | "execution_count": null, 220 | "metadata": {}, 221 | "outputs": [], 222 | "source": [ 223 | "def top_three_1(t1,t2,t3,t4):\n", 224 | " '''This Function takes four input parameters to find top n value - top of n value is dynamic'''\n", 225 | " df1 = df[(df[t1[0]] == t1[1])] \n", 226 | " tt = df1.groupby(t2)[[t3]].sum().apply(lambda x: x.sort_values(ascending=False).head(t4))\n", 227 | " return tt" 228 | ] 229 | }, 230 | { 231 | "cell_type": "code", 232 | "execution_count": null, 233 | "metadata": {}, 234 | "outputs": [], 235 | "source": [ 236 | "def top_three_2(t1,t2,t3,t4,t5):\n", 237 | " '''This Function takes five input parameters to find top n value - top of n value is dynamic'''\n", 238 | " df1 = df[(df[t1[0]] == t1[1]) & (df[t2[0]] == t2[1])] \n", 239 | " tt = df1.groupby(t3)[[t4]].sum().apply(lambda x: x.sort_values(ascending=False).head(t5))\n", 240 | " return tt" 241 | ] 242 | }, 243 | { 244 | "cell_type": "code", 245 | "execution_count": null, 246 | "metadata": {}, 247 | "outputs": [], 248 | "source": [ 249 | "def Bottom_three(t1,t2):\n", 250 | " '''This Function takes two input parameters to find bottom three'''\n", 251 | " bt = df.groupby(t1)[[t2]].sum().apply(lambda x: x.sort_values(ascending=False).tail(3))\n", 252 | " return bt" 253 | ] 254 | }, 255 | { 256 | "cell_type": "code", 257 | "execution_count": null, 258 | "metadata": {}, 259 | "outputs": [], 260 | "source": [ 261 | "def Bottom_new(t1,t2,t3):\n", 262 | " '''This Function takes three input parameters to find bottom n value - bottom of n value is dynamic'''\n", 263 | " bt = df.groupby(t1)[[t2]].sum().apply(lambda x: x.sort_values(ascending=False).tail(t3))\n", 264 | " return bt" 265 | ] 266 | }, 267 | { 268 | "cell_type": "code", 269 | "execution_count": null, 270 | "metadata": {}, 271 | "outputs": [], 272 | "source": [ 273 | "def bottom_three_1(t1,t2,t3,t4):\n", 274 | " '''This Function takes four input parameters to find bottom n value - bottom of n value is dynamic'''\n", 275 | " df1 = df[(df[t1[0]] == t1[1])] \n", 276 | " tt = df1.groupby(t2)[[t3]].sum().apply(lambda x: x.sort_values(ascending=False).tail(t4))\n", 277 | " return tt" 278 | ] 279 | }, 280 | { 281 | "cell_type": "code", 282 | "execution_count": null, 283 | "metadata": {}, 284 | "outputs": [], 285 | "source": [ 286 | "def bottom_three_2(t1,t2,t3,t4,t5):\n", 287 | " '''This Function takes five input parameters to find bottom n value - bottom of n value is dynamic'''\n", 288 | " df1 = df[(df[t1[0]] == t1[1]) & (df[t2[0]] == t2[1])] \n", 289 | " tt = df1.groupby(t3)[[t4]].sum().apply(lambda x: x.sort_values(ascending=False).tail(t5))\n", 290 | " return tt" 291 | ] 292 | }, 293 | { 294 | "cell_type": "markdown", 295 | "metadata": {}, 296 | "source": [ 297 | "## 5. Expose Integration Point with a Websocket Client " 298 | ] 299 | }, 300 | { 301 | "cell_type": "code", 302 | "execution_count": null, 303 | "metadata": {}, 304 | "outputs": [], 305 | "source": [ 306 | "'''This part of the code imports the question from websocket, executes the function as per \n", 307 | " corresponding intent and sends the output back to the websocket.''' \n", 308 | "\n", 309 | "\n", 310 | "def on_message(ws, message):\n", 311 | " msg = json.loads(message)\n", 312 | " for item in msg[\"botresponse\"][\"messageout\"][\"context\"][\"entities_array\"]:\n", 313 | " if item['entity'] == 'Year':\n", 314 | " date = datetime.strptime(item['value'],'%Y')\n", 315 | " item['value'] = date.year\n", 316 | " print(msg) \n", 317 | " \n", 318 | " entitylist = []\n", 319 | " for index,entity in enumerate(msg[\"botresponse\"][\"messageout\"][\"context\"][\"entities_array\"]):\n", 320 | " print(entity,index)\n", 321 | " entitylist.append((entity[\"entity\"],entity[\"value\"]))\n", 322 | "\n", 323 | " contextlist = [list(e) for e in msg[\"botresponse\"][\"messageout\"][\"context\"].items()]\n", 324 | "\n", 325 | " if msg[\"botresponse\"][\"messageout\"][\"context\"][\"intent\"] == 'summation':\n", 326 | " response = get_total_val(entitylist[1],entitylist[0],entitylist[2])\n", 327 | " response = round(response,2)\n", 328 | " print(response)\n", 329 | " elif msg[\"botresponse\"][\"messageout\"][\"context\"][\"intent\"] == 'average':\n", 330 | " response = get_avg_val(entitylist[1],entitylist[0],entitylist[2])\n", 331 | " response = round(response,2)\n", 332 | " print(response)\n", 333 | " elif msg[\"botresponse\"][\"messageout\"][\"context\"][\"intent\"] == 'max':\n", 334 | " response = get_max_val(entitylist[2],entitylist[1],entitylist[0],entitylist[3])\n", 335 | " response = round(response,2)\n", 336 | " print(response)\n", 337 | " elif msg[\"botresponse\"][\"messageout\"][\"context\"][\"intent\"] == 'min':\n", 338 | " response = get_min_val(entitylist[2],entitylist[1],entitylist[0],entitylist[3])\n", 339 | " response = round(response,2)\n", 340 | " print(response)\n", 341 | " elif msg[\"botresponse\"][\"messageout\"][\"context\"][\"intent\"] == 'top':\n", 342 | " response = top_new(entitylist[0][0],entitylist[2][0],entitylist[1][0]) \n", 343 | " response = response.to_json()\n", 344 | " print(response)\n", 345 | " elif msg[\"botresponse\"][\"messageout\"][\"context\"][\"intent\"] == 'bottom':\n", 346 | " response = Bottom_new(entitylist[0][0],entitylist[2][0],entitylist[1][0])\n", 347 | " response = response.to_json()\n", 348 | " print(response)\n", 349 | " \n", 350 | " Question = str(msg[\"botresponse\"][\"messageout\"][\"input\"][\"text\"])\n", 351 | " responsejson = {}\n", 352 | " responsejson[\"Question\"] = Question\n", 353 | " responsejson[\"Answer\"] = str(response)\n", 354 | " print(responsejson)\n", 355 | " print(type(responsejson))\n", 356 | " ws.send(json.dumps(responsejson))\n", 357 | " \n", 358 | "def on_error(ws, error):\n", 359 | " print(error)\n", 360 | "\n", 361 | "def on_close(ws):\n", 362 | " ws.send(\"DSX Listen End\")\n", 363 | "\n", 364 | "def on_open(ws):\n", 365 | " def run(*args):\n", 366 | " for i in range(10000):\n", 367 | " hbeat = '{\"cmd\":\"DSX HeartBeat\"}'\n", 368 | " ws.send(hbeat)\n", 369 | " time.sleep(100)\n", 370 | "\n", 371 | " thread.start_new_thread(run, ())\n", 372 | " \n", 373 | " \n", 374 | "def start_websocket_listener():\n", 375 | " websocket.enableTrace(True)\n", 376 | " ws = websocket.WebSocketApp(\"ws://orchestrate-app.au-syd.mybluemix.net/ws/orchestrate\",\n", 377 | " on_message = on_message,\n", 378 | " on_error = on_error,\n", 379 | " on_close = on_close)\n", 380 | " ws.on_open = on_open\n", 381 | " ws.run_forever()" 382 | ] 383 | }, 384 | { 385 | "cell_type": "markdown", 386 | "metadata": {}, 387 | "source": [ 388 | "# 6. Start Websocket Client" 389 | ] 390 | }, 391 | { 392 | "cell_type": "code", 393 | "execution_count": null, 394 | "metadata": {}, 395 | "outputs": [], 396 | "source": [ 397 | "start_websocket_listener()" 398 | ] 399 | }, 400 | { 401 | "cell_type": "code", 402 | "execution_count": null, 403 | "metadata": {}, 404 | "outputs": [], 405 | "source": [] 406 | } 407 | ], 408 | "metadata": { 409 | "anaconda-cloud": {}, 410 | "kernelspec": { 411 | "display_name": "Python 3.5", 412 | "language": "python", 413 | "name": "python3" 414 | }, 415 | "language_info": { 416 | "codemirror_mode": { 417 | "name": "ipython", 418 | "version": 3 419 | }, 420 | "file_extension": ".py", 421 | "mimetype": "text/x-python", 422 | "name": "python", 423 | "nbconvert_exporter": "python", 424 | "pygments_lexer": "ipython3", 425 | "version": "3.5.5" 426 | } 427 | }, 428 | "nbformat": 4, 429 | "nbformat_minor": 1 430 | } 431 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Robotic Calculations and Inference Agent 2 | 3 | > Watson Conversation is now Watson Assistant. Although some images in this code pattern may show the service as Watson Conversation, the steps and processes will still work. 4 | 5 | There is a technological revolution taking place in the service industry with the introduction of Robots. The Robots are powered by artifical intelligence and are able to perform the roles of a waiter, customer relationship executive, cognitive assistant etc. The capabilities of the robot can be enhanced exponentially by integrating with cloud capabilities. 6 | 7 | This code pattern demonstrates a scenario where the robot can answer queries on financial data by integrating with IBM Watson Assistant service and IBM Watson Studio. We will take you through the end to end flow of steps in building an interactive interface between [NAO](https://www.softbankrobotics.com/emea/en/nao) Robot, Watson Assistant API & Watson Studio. 8 | 9 | When the reader has completed this code pattern, they will understand how to: 10 | 11 | * Establish the communication between NAO Robot and IBM Watson Studio with Watson Assistant. 12 | * Create the Watson Assistant chat bot application. 13 | * Perform statistical analysis on a financial dataset using Jupitor (Python) Notebook on IBM Watson Studio. 14 | 15 | The intended audience for this code pattern are developers who want to develop a complete analytics solution on Watson Studio with a custom web user interface. This code pattern can be extended for other use cases that integrate Watson Assistant and Watson Studio to enable exchange of information and process natural language along with mining the data to generate insights. For example: 16 | 17 | * Sales assist: provide recommendations to onfield sales agent for insurance domain 18 | * Retail Sector: Inventory planning 19 | * Manufacturing Sector: Monitoring the systems 20 | * Concierge: Travel and Hospitality 21 | 22 | ## Data set used 23 | 24 | The data set used in this code pattern is [data/data.csv](data/data.csv) and originates from a [Watson Analytics](https://www.ibm.com/communities/analytics/watson-analytics-blog/retail-sales-marketing-profit-cost) blog post. 25 | 26 | ## Flow 27 | 28 | ![architecture](doc/source/images/architecture.png) 29 | 30 | 1. The user asks the questions on the dataset to the NAO Robot. 31 | 2. The NAO Robot will convert the speech to text, and will send the text to Node-RED Flow for further processing on the cloud. The results from the processing on the cloud is returned to the NAO Robot through the Node-RED flow. 32 | 3. Node-RED flow sends the converted text to the Watson Assistant API. 33 | 4. The Watson Assistant API takes the text input. The text is analyzed to determine the intent based on the training provided. 34 | 5. The context and state of the conversation is saved to the Cloudant DB to track the conversation flow of the user. 35 | 6. The dataset for analysis is stored in the Object storage. 36 | 7. Data file is taken as input in csv format. 37 | 8. The Jupyter notebook receives the Watson Assistant Service API output from Node-RED using Web Sockets. The notebook processes the data based on the question and generates insights. The insights are sent back to the Node-RED flow using Web Socket. 38 | 9. The Jupyter notebook is powered by Spark. 39 | 10. The Node-RED flow sends the insights to NAO Robot. 40 | 41 | ## Included components 42 | 43 | * [Nao-Robot Choregraphe Behaviour](https://www.softbankrobotics.com/emea/en/nao): The fruit of a unique combination of mechanical engineering and software, NAO is a character made up of a multitude of sensors, motors and software piloted by a made-to-measure operating system: NAOqi OS. 44 | 45 | * [Node-RED](https://cloud.ibm.com/catalog/starters/node-red-starter): Node-RED is a programming tool for wiring together APIs and online services. 46 | 47 | * [Watson Assistant](https://www.ibm.com/cloud/watson-assistant/): Build, test and deploy a bot or virtual agent across mobile devices, messaging platforms, or even on a physical robot. 48 | 49 | * [IBM Watson Studio](https://www.ibm.com/cloud/watson-studio): Analyze data using RStudio, Jupyter, and Python in a configured, collaborative environment that includes IBM value-adds, such as managed Spark. 50 | 51 | * [Jupyter Notebooks](http://jupyter.org/): An open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. 52 | 53 | ## Watch the Video 54 | 55 | [![video](https://img.youtube.com/vi/BuwfbjC6t38/0.jpg)](https://www.youtube.com/watch?v=BuwfbjC6t38) 56 | 57 | ## Steps 58 | 59 | Follow these steps to setup and run this code pattern. The steps are 60 | described in detail below. 61 | 62 | 1. [Sign up for IBM Cloud](#1-sign-up-for-ibm-cloud) 63 | 1. [Create IBM Cloud services](#2-create-ibm-cloud-services) 64 | 1. [Configure Watson Assistant Application](#3-configure-watson-assistant-application) 65 | 1. [View Watson Assistant Intents, Entities and Dialog](#4-view-watson-assistant-intents-entities-and-dialog) 66 | 1. [Import the Node-RED flow](#5-import-the-node-red-flow) 67 | 1. [Note the websocket URL](#6-note-the-websocket-url) 68 | 1. [Create a new Watson Studio project](#7-create-a-new-watson-studio-project) 69 | 1. [Create the notebook](#8-create-the-notebook) 70 | 1. [Add the data](#9-add-the-data) 71 | 1. [Update the notebook with service credentials](#10-update-the-notebook-to-read-the-data-as-dataframe) 72 | 1. [Run the notebook](#11-run-the-notebook) 73 | 1. [Results sent to the Node Red Flow](#12-results-sent-to-the-node-red-flow) 74 | 1. [Update the NAO Robot Choregraphe Behaviour with service credentials and Node-RED URL](#13-update-the-nao-robot-choregraphe-behaviour-with-service-credentials-and-node-red-url) 75 | 1. [Transfer the behaviour to NAO Robot](#14-transfer-the-behaviour-to-nao-robot) 76 | 77 | ### 1. Sign up for IBM Cloud 78 | 79 | Sign up for IBM [**Cloud**](https://cloud.ibm.com/login). By clicking on create a free account you will get 30 days trial account. 80 | 81 | ### 2. Create IBM Cloud services 82 | 83 | Create the IBM Cloud services by following the link to use the IBM Cloud UI. 84 | 85 | * [**Node-RED Starter**](https://cloud.ibm.com/catalog/starters/node-red-starter) 86 | 87 | * Choose an appropriate name for the Node-RED application. Click on `Create`. 88 | 89 | ![node red](doc/source/images/bluemix_service_nodered.png) 90 | 91 | * On the newly created Node-RED application page, Click on `Visit App URL` to launch the Node-RED editor once the application is in `Running` state. 92 | * On the `Welcome to your new Node-RED instance on IBM Cloud` screen, Click on `Next` 93 | * On the `Secure your Node-RED editor` screen, enter a username and password to secure the Node-RED editor and click on `Next` 94 | * On the `Browse available IBM Cloud nodes` screen, click on `Next` 95 | * On the `Finish the install` screen, click on Finish 96 | * Click on `Go to your Node-RED flow editor` 97 | 98 | * [**Watson Speech to Text**](https://cloud.ibm.com/catalog/services/speech-to-text) 99 | 100 | * Choose an appropriate name for the Speech to Text service. Click on `Create`. 101 | 102 | ![stt](doc/source/images/bluemix_service_stt.png) 103 | 104 | * On the newly created Speech to Text Service page, Click on `Service credentials` then `View credential` and note down the credentials for future use. 105 | 106 | ![stt creds](doc/source/images/watson_stt_service_credentials.png) 107 | 108 | * [**Watson Assistant Service**](https://cloud.ibm.com/catalog/services/conversation) 109 | 110 | * Choose an appropriate name for the Watson Assistant Service. Click on `Create`. 111 | 112 | ![convo](doc/source/images/bluemix_service_conversation.png) 113 | 114 | * On the newly created Watson Assistant Service page, click on `Service credentials` then `View credential` and note down the credentials for future use. 115 | 116 | ![convo creds](doc/source/images/conversation_credantial_note_down.png) 117 | 118 | * On the same page, on the left side now click on `Manage` icon then on the right side click on `Launch tool` to launch start configuring Watson Assistant. 119 | 120 | ### 3. Configure Watson Assistant application 121 | 122 | * Launch the **Watson Assistant** tool. 123 | 124 | * Clone the repo locally. In a terminal, run: 125 | 126 | ```bash 127 | git clone https://github.com/IBM/watson-nao-robot 128 | ``` 129 | 130 | * Locate the file [workspace.json](conversation/workspace.json) locally. 131 | 132 | * From the Watson Assistant tool, click on the `upload` icon to import a workspace. 133 | 134 | ![convo](doc/source/images/import_conversation_workspace.png) 135 | 136 | * Click to choose a file, navigate to `workspace.json` document and select `Import`. 137 | 138 | * Click on `Watson Assistant` at the top to go back to the workspace listing. 139 | 140 | * Find the `Workspace ID` by clicking on the context menu (three vertical dots) of the new workspace and select `View details`. 141 | 142 | ![convo](doc/source/images/open_conversation_details.png) 143 | 144 | * Click on the `View details`. Note down the `Workspace ID`. 145 | 146 | ### 4. View Watson Assistant Intents, Entities and Dialog 147 | 148 | To view the conversation Intents, Entities and Dialog select the workspace and choose the `Intents` tab, `Entities` tab and `Dialog` tab. 149 | 150 | ***Intents*** 151 | 152 | Intents are purposes or goals expressed in a customer's input, such as answering a question or processing a bill payment. By recognizing the intent expressed in a customer's input, the Watson Assistant service can choose the correct dialog flow for responding to it. 153 | 154 | ![intents](doc/source/images/conversation_agent_intents.png) 155 | 156 | ***Entities*** 157 | 158 | Entities represent a class of object or a data type that is relevant to a user's purpose. By recognizing the entities that are mentioned in the user's input, the Watson Assistant service can choose the specific actions to take to fulfill an intent. 159 | 160 | There are two types of the entities available under the Watson Assistant. One is `My entities` and another is `System entities`. Refer below for `My Entities`. 161 | 162 | ![entities](doc/source/images/conversation_agent_entities.png) 163 | 164 | In this conversation two system entities have been used namely `@sys-date` and `@sys-number`. User has to `switch on` the button before using it. 165 | 166 | ![system entities](doc/source/images/conversation_system_enities.png) 167 | 168 | ***Dialog*** 169 | 170 | The dialog uses the intents and entities that are identified in the user's input, plus context from the application, to interact with the user and ultimately provide a useful response. 171 | 172 | ![dialog](doc/source/images/conversation_dialog_pic.png) 173 | 174 | In this conversation, the slots feature under dialog has been used to gather multiple informations from the user. Slots for `Max` dialog is represented in the above image. 175 | 176 | ### 5. Import the Node-RED flow 177 | 178 | * From the cloned repo navigate to the [node-red-flow](https://github.com/IBM/watson-nao-robot/blob/master/node-red-flow) folder. 179 | * Open the `NODERED_BASED_URL` and click on `Go To Your Node-RED flow editor` to launch the Node-RED editor. 180 | * Import both Node-RED flows into the editor in two separate Node-RED instances. 181 | * Update the Node-RED URL (replace `NODERED_BASE_URL` with the correct URL in the first_flow.json) under path in the json file. 182 | * Open the `first_flow.json` file with a text editor and copy all the contents to Clipboard in the first instance of Node-RED app. 183 | * In the second instance of Node-RED app, open the `second_flow.json` file with a text editor and copy all the contents to Clipboard. 184 | * On the Node-RED flow editor for both flows, click the Menu and select `Import` -> `Clipboard`, select new flow and paste the contents from text editor & click `Import`. 185 | * Components of Node-RED flow includes a web socket server, Watson Assistant Service, Watson Studio & user defined functions which tie them together to enable exchange of information. 186 | * Please review steps 1 to 10 under the Architecture diagram to understand the flow of events using Node-RED. 187 | 188 | ![node-red-flow](doc/source/images/import_nodered_flow.png) 189 | 190 | #### Configure Watson Assistant credentials in Node-RED 191 | 192 | * Double click on the `conversation` node. `Edit conversation node` prompt will open. 193 | 194 | * Enter the `Workspace ID` that we noted in [Configure Watson Assistant Application](#3-configure-watson-conversation-application). 195 | 196 | * If the service credentials from IBM Watson Assistant are username/password based as shown in the diagram below 197 | 198 | ![upass](https://raw.githubusercontent.com/IBM/pattern-utils/master/watson-assistant/WatsonAssistantCredentials.png) 199 | 200 | * Add username & password from Watson Assistant as shown below & click `Done`. 201 | 202 | ![upass-creds](https://raw.githubusercontent.com/IBM/pattern-utils/master/node-red/NodeREDAssistantCredentials.png) 203 | 204 | * If the service credentials from IBM Watson Assistant are IAM based as shown below in the diagram 205 | 206 | ![iam](https://raw.githubusercontent.com/IBM/pattern-utils/master/watson-assistant/watson_assistant_api_key.png) 207 | 208 | * Add the API key, Workspace ID as shown below and click `Done` 209 | 210 | ![iam-creds](https://raw.githubusercontent.com/IBM/pattern-images/master/node-red/NodeRedWatsonAssistantIAMCreds.png) 211 | 212 | #### Deploy the Node-RED flows by clicking on the `Deploy` button 213 | 214 | > *First flow* 215 | > ![](doc/source/images/first_flow.PNG) 216 | 217 | > *Second flow* 218 | > ![](doc/source/images/second_flow.PNG) 219 | 220 | ### 6. Note the websocket URL 221 | 222 | The websocket URL is `ws://``/ws/orchestrate` where the `NODERED_BASE_URL` is the marked portion of the URL in the above image. 223 | 224 | > **Note**: An example websocket URL for a Node-RED app with name `myApp` - `ws://myApp.mybluemix.net/ws/orchestrate` where `myApp.mybluemix.net` is the `NODERED_BASE_URL`. 225 | The `NODERED_BASE_URL` can have an additional region information say `eu-gb` for UK region and `NODERED_BASE_URL` could be `myApp.eu-gb.mybluemix.net`. 226 | 227 | ### 7. Create a new Watson Studio project 228 | 229 | * Sign up or log into IBM's [Watson Studio](https://dataplatform.cloud.ibm.com). Once in, you'll land on the dashboard. 230 | 231 | * Create a new project by clicking `+ New project` and choosing `Data Science`: 232 | 233 | ![studio project](https://raw.githubusercontent.com/IBM/pattern-utils/master/watson-studio/new-project-data-science.png) 234 | 235 | * Enter a name for the project name and click `Create`. 236 | 237 | * **NOTE**: By creating a project in Watson Studio a free tier `Object Storage` service and `Watson Machine Learning` service will be created in your IBM Cloud account. Select the `Free` storage type to avoid fees. 238 | 239 | ![studio-new-project](https://raw.githubusercontent.com/IBM/pattern-utils/master/watson-studio/new-project-data-science-name.png) 240 | 241 | * Upon a successful project creation, you are taken to a dashboard view of your project. Take note of the `Assets` and `Settings` tabs, we'll be using them to associate our project with any external assets (datasets and notebooks) and any IBM cloud services. 242 | 243 | ![studio-project-dashboard](https://raw.githubusercontent.com/IBM/pattern-utils/master/watson-studio/overview-empty.png) 244 | 245 | ### 8. Create the notebook 246 | 247 | * From the new project `Overview` panel, click `+ Add to project` on the top right and choose the `Notebook` asset type. 248 | 249 | ![studio-project-dashboard](https://raw.githubusercontent.com/IBM/pattern-utils/master/watson-studio/add-assets-notebook.png) 250 | 251 | * Fill in the following information: 252 | 253 | * Select the `From URL` tab. [1] 254 | * Enter a `Name` for the notebook and optionally a description. [2] 255 | * Under `Notebook URL` provide the following url: [https://github.com/IBM/watson-nao-robot/blob/master/notebook/robo_notebook.ipynb](https://github.com/IBM/watson-nao-robot/blob/master/notebook/robo_notebook.ipynb) [3] 256 | * For `Runtime` select the `Python 3.5` option. [4] 257 | 258 | ![add notebook](https://github.com/IBM/pattern-utils/raw/master/watson-studio/notebook-create-url-py35.png) 259 | 260 | * Click the `Create` button. 261 | 262 | * **TIP:** Once successfully imported, the notebook should appear in the `Notebooks` section of the `Assets` tab. 263 | 264 | ### 9. Add the data 265 | 266 | * This notebook uses the dataset [data.csv](data/data.csv). We need to load this assets to our project. 267 | 268 | * From the new project `Overview` panel, click `+ Add to project` on the top right and choose the `Data` asset type. 269 | 270 | ![add asset](https://raw.githubusercontent.com/IBM/pattern-utils/master/watson-studio/add-assets-data.png) 271 | 272 | * A panel on the right of the screen will appear to assit you in uploading data. Follow the numbered steps in the image below. 273 | 274 | * Ensure you're on the `Load` tab. [1] 275 | * Click on the `browse` option. From your machine, browse to the location of the `data.csv` file in this repository, and upload it. [not numbered] 276 | * Once uploaded, go to the `Files` tab. [2] 277 | * Ensure the files appear. [3] 278 | 279 | ![add data](https://raw.githubusercontent.com/IBM/pattern-utils/master/watson-studio/data-add-data-asset.png) 280 | 281 | ### 10. Update the notebook to read the data as DataFrame 282 | 283 | Launchh the notebook and select the cell below `2. Read the Data & convert it into Dataframe` section in the notebook. 284 | 285 | Use `Find and Add Data` (look for the `10/01` icon) and its `Files` tab. You should see the file names uploaded earlier. Make sure your active cell is the empty one created earlier. Select `Insert to code` (below your file name). Click `Insert pandas DataFrame` from drop down menu. 286 | 287 | ![data frame](doc/source/images/insert_dataframe.PNG) 288 | 289 | #### Update the websocket URL in the notebook 290 | 291 | In the cell below `7. Expose integration point with a websocket client`, update the websocket url noted in [section 5](#5-note-the-websocket-url) in the `start_websocket_listener` function. 292 | 293 | ![websocket](doc/source/images/update_websocket_url.png) 294 | 295 | ### 11. Run the notebook 296 | 297 | When a notebook is executed, what is actually happening is that each code cell in 298 | the notebook is executed, in order, from top to bottom. 299 | 300 | Each code cell is selectable and is preceded by a tag in the left margin. The tag 301 | format is `In [x]:`. Depending on the state of the notebook, the `x` can be: 302 | 303 | * A blank, this indicates that the cell has never been executed. 304 | * A number, this number represents the relative order this code step was executed. 305 | * A `*`, this indicates that the cell is currently executing. 306 | 307 | * Click the `(►) Run` button to start stepping through the notebook. 308 | 309 | ### 12. Results Sent To The Node-Red Flow 310 | 311 | The results from Watson Studio are sent to Node-RED based URL which is relayed to NAO Robot. The response time for the answer to the question is approximately 8 seconds. 312 | 313 | Let's see a few sample responses: 314 | 315 | > **User**: What is the highest profit of Capri Italy in 2007? 316 | > 317 | > **NAO**: The highest profit of Capri Italy in 2007 is 120,000. 318 | 319 | ![output](doc/source/images/results.PNG) 320 | 321 | ### 13. Update the NAO Robot Choregraphe Behaviour with service credentials and Node-RED URL 322 | 323 | > **NOTE**: Choregraphe works only with Python 2x. Please use Python 2x for Choregraphe service. 324 | 325 | Open the NAO robot project [`WatsonNaoRobot.pml`](choregraphe/watson_nao_robot/WatsonNaoRobot.pml). Connect to the NAO robot using the `Connection` -> `Connect` menu from Choregraphe. 326 | 327 | #### Update Watson Speech to Text credentials in the Behavior 328 | 329 | * Select the [`behavior.xar`](choregraphe/watson_nao_robot/WatsonSTT/behavior.xar) file in the project folder structure in the top left pane. 330 | * Double click the `WatsonSTT Python Script` box in the choregraphe canvas pane. 331 | * Update the Watson Speech to Text credentials in the `auth` variable in the Python code inside the `Python Script` box as shown below. 332 | 333 | ![creds](doc/source/images/choregraphe_update_credentials.png) 334 | 335 | #### Update Node-RED URL in the Behaviour 336 | 337 | * Select the behavior.xar file in the project folder structure in the top left pane. 338 | * Double click the `PostToNode-RED Python Script` box in the choregraphe canvas pane. 339 | * Update the Node-RED URL in the `url` variable in the Python code inside the `Python Script` box as shown below. 340 | 341 | ![chore](doc/source/images/choregraphe_update_node_red.png) 342 | 343 | ### 14. Transfer the behaviour to NAO Robot 344 | 345 | Save the changes to the NAO robot project (WatsonNaoRobot.pml). 346 | 347 | * Select `Connection` from Choregraphe Menu and click `Upload to the robot and Play` sub menu to transfer behavior files to the NAO Robot and activate this code on the Robot. 348 | * Press the front tactile head sensor of the NAO robot and ask your question related to the dataset analysis and insights. 349 | 350 | ![transfer](doc/source/images/choregraphe_transfer_behavior.png) 351 | 352 | ## Troubleshooting 353 | 354 | [See DEBUGGING.md.](DEBUGGING.md) 355 | 356 | ## License 357 | 358 | This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the [Developer Certificate of Origin, Version 1.1 (DCO)](https://developercertificate.org/) and the [Apache Software License, Version 2](http://www.apache.org/licenses/LICENSE-2.0.txt). 359 | 360 | [Apache Software License (ASL) FAQ](http://www.apache.org/foundation/license-faq.html#WhatDoesItMEAN) 361 | -------------------------------------------------------------------------------- /choregraphe/watson_nao_robot/WatsonSTT/behavior.xar: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | media/images/box/root.png 5 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | media/images/box/sensors/tactileHead.png 20 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | media/images/box/box-diagram.png 58 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | media/images/box/box-diagram.png 89 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | media/images/box/box-diagram.png 120 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | media/images/box/interaction/rec_sound.png 163 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | media/images/box/interaction/rec_sound.png 185 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | media/images/box/wait.png 242 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | media/images/box/folder.png 281 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | media/images/box/box-python-script.png 319 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | media/images/box/box-python-script.png 359 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | -------------------------------------------------------------------------------- /conversation/workspace.json: -------------------------------------------------------------------------------- 1 | {"name":"Update the name","created":"2017-09-16T08:30:09.934Z","intents":[{"intent":"max","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z","examples":[{"text":"max","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"maximum","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"highest","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"}],"description":null},{"intent":"bottom","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T10:41:09.750Z","examples":[{"text":"bottom three","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"bottom five","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T10:34:57.593Z"},{"text":"bottom seven","created":"2017-09-17T10:41:09.750Z","updated":"2017-09-17T10:41:09.750Z"}],"description":null},{"intent":"average","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T07:00:16.062Z","examples":[{"text":"avg","created":"2017-09-17T07:00:16.062Z","updated":"2017-09-17T07:00:16.062Z"},{"text":"average","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"mean","created":"2017-09-17T07:00:10.758Z","updated":"2017-09-17T07:00:10.758Z"}],"description":null},{"intent":"min","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z","examples":[{"text":"min","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"minimum","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"lowest","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"low","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"}],"description":null},{"intent":"top","created":"2017-09-17T08:31:47.862Z","updated":"2017-09-17T08:41:10.930Z","examples":[{"text":"top seven","created":"2017-09-17T08:32:08.833Z","updated":"2017-09-17T08:32:08.833Z"},{"text":"top three","created":"2017-09-17T08:31:57.993Z","updated":"2017-09-17T08:31:57.993Z"},{"text":"top five","created":"2017-09-17T08:32:03.504Z","updated":"2017-09-17T08:32:03.504Z"}],"description":null},{"intent":"summation","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z","examples":[{"text":"total","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"summation","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"},{"text":"sum","created":"2017-09-17T01:46:13.166Z","updated":"2017-09-17T01:46:13.166Z"}],"description":null}],"updated":"2017-09-17T11:01:01.265Z","entities":[{"entity":"Measure","values":[{"value":"Revenue","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T10:53:44.281Z","metadata":null,"synonyms":["Revenue"]},{"value":"Gross_profit","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T10:53:51.685Z","metadata":null,"synonyms":["Profit"]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T10:53:51.685Z","metadata":null,"description":null},{"entity":"sys-number","values":[],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Selectname","values":[{"value":"Retailer_country","created":"2017-09-17T07:42:51.686Z","updated":"2017-09-17T10:55:08.436Z","metadata":null,"synonyms":["Countries","Country"]},{"value":"Product","created":"2017-09-17T07:42:51.686Z","updated":"2017-09-17T10:55:13.696Z","metadata":null,"synonyms":["Products","Product"]}],"created":"2017-09-17T07:10:01.065Z","updated":"2017-09-17T10:55:13.696Z","metadata":null,"description":null},{"entity":"sys-date","values":[],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Unit_sale_price","values":[{"value":"Unit sale price","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Quantity","values":[],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Retailer_country","values":[{"value":"Japan","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"country","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Australia","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"China","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Finland","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"United Kingdom","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Korea","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"countries","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Denmark","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Switzerland","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Mexico","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Italy","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"United States","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Austria","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Belgium","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sweden","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Singapore","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Spain","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Germany","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"France","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Brazil","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Netherlands","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Canada","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Order_method_type","values":[{"value":"Sales visit","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Telephone","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"E-mail","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Mail","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Fax","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Special","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Web","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Product_cost","values":[{"value":"Product cost","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Unit_cost","values":[{"value":"Unit cost","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Planned_revenue","values":[{"value":"Planned revenue","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Unit_price","values":[{"value":"Unit price","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Product_type","values":[{"value":"First Aid","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Tents","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Navigation","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Lanterns","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Irons","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Packs","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Safety","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Cooking Gear","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Binoculars","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Woods","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Watches","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Eyewear","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Insect Repellents","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Rope","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Climbing Accessories","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Knives","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Tools","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Golf Accessories","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sunscreen","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Putters","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sleeping Bags","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Product_line","values":[{"value":"Golf Equipment","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Personal Accessories","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Outdoor Protection","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Camping Equipment","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Mountaineering Equipment","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null},{"entity":"Product","values":[{"value":"Star Gazer 6","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Zone","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"products","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Calamine Relief","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Trendi","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Course Pro Golf and Tee Set","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Fairway","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Husky Rope 200","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Polar Wave","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"EverGlow Lamp","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Glacier GPS Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Signal Mirror","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Bella","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Lux","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Insect Bite Relief","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Kitchen Kit","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Deluxe Family Relief Kit","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hibernator Pillow","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Axe","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sun Shield","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Shovel","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Double Edge","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sun Shelter 15","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sun Shelter Stick","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Mountain Man Deluxe","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Flicker Lantern","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Max Gizmo","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Husky Rope 100","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"BugShield Spray","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Edge Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Canyon Mule Journey Backpack","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Climbing Helmet","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Seeker Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Mountain Man Combination","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Inferno","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Glacier GPS","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Lady Hailstorm Titanium Irons","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Polar Sun","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Star Gazer 2","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Glacier Basic","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Venue","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"EverGlow Single","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Pocket Gizmo","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Canyon Mule Climber Backpack","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Star Lite","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Star Peg","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"EverGlow Double","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Cook Set","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Polar Ice","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Kerosene","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Husky Rope 50","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hawk Eye","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Ice","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hibernator Lite","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Opera Vision","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly 4","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"BugShield Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Hammer","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hibernator Camp Cot","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hibernator Self - Inflating Mat","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sam","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Kettle","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Astro Pilot","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Compact Relief Kit","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Husky Harness Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Canyon Mule Extreme Backpack","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sky Pilot","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Single Flame","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly Charger","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hailstorm Steel Irons","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Maximus","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"BugShield Lotion","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sun Shelter 30","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Course Pro Golf Bag","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Star Dome","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Cup","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Grip","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Polar Sports","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Ranger Vision","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Double Flame","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly Rechargeable Battery","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"EverGlow","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"product","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hibernator Pad","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Trail Master","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Canyon Mule Cooler","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Husky Rope 60","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"EverGlow Butane","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TX","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Course Pro Putter","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Deluxe Cook Set","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Chalk Bag","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Bear Survival Edge","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hailstorm Titanium Irons","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Cat Eye","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Course Pro Umbrella","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Seeker Mini","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Auto Pilot","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Trail Scout","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Course Pro Gloves","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly Climbing Lamp","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Belay","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Mountain Man Digital","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Water Bag","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Bear Edge","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Canyon Mule Carryall","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Seeker 35","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Glacier Deluxe","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Star Gazer 3","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Trail Star","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly Mapreader","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Husky Harness","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Lady Hailstorm Steel Woods Set","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Aloe Relief","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Pulley","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly 2","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Infinity","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Zodiak","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hibernator Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly Multi-light","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Sun Blocker","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Utensils","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Lady Hailstorm Steel Irons","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Granite Carabiner","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Mountain Man Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"BugShield Natural","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Kodiak","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hailstorm Titanium Woods Set","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Single Edge","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Firefly Lite","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hailstorm Steel Woods Set","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Capri","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Seeker 50","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Blue Steel Putter","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Lady Hailstorm Titanium Woods Set","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Legend","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Blue Steel Max Putter","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Canyon Mule Weekender Backpack","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"TrailChef Canteen","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"BugShield Lotion Lite","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Retro","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Mountain Man Analog","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Dante","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Hibernator","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]},{"value":"Polar Extreme","created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"synonyms":[]}],"created":"2017-09-17T06:39:34.645Z","updated":"2017-09-17T06:39:34.645Z","metadata":null,"description":null}],"language":"en","metadata":{"api_version":{"major_version":"v1","minor_version":"2017-05-26"}},"description":"https://nodechatnew.mybluemix.net/Robot_webpage_array_new","dialog_nodes":[{"type":"event_handler","title":null,"output":{"text":"Which Year?"},"parent":"slot_7_1505627498532","context":null,"created":"2017-09-17T05:51:39.793Z","updated":"2017-09-17T05:55:02.268Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_9_1505627498533","previous_sibling":"handler_8_1505627498533"},{"type":"event_handler","title":null,"output":null,"parent":"slot_7_1505627498532","context":{"date":"@sys-date"},"created":"2017-09-17T05:51:39.191Z","updated":"2017-09-17T05:54:39.333Z","metadata":null,"next_step":null,"conditions":"@sys-date","event_name":"input","description":null,"dialog_node":"handler_8_1505627498533","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which Year?"},"parent":"slot_41_1505630083757","context":null,"created":"2017-09-17T06:34:44.847Z","updated":"2017-09-17T06:35:03.384Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_43_1505630083757","previous_sibling":"handler_42_1505630083757"},{"type":"event_handler","title":null,"output":null,"parent":"slot_41_1505630083757","context":{"date":"@sys-date"},"created":"2017-09-17T06:34:44.423Z","updated":"2017-09-17T06:34:53.727Z","metadata":null,"next_step":null,"conditions":"@sys-date","event_name":"input","description":null,"dialog_node":"handler_42_1505630083757","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Profit or Revenue?"},"parent":"slot_205_1505644080179","context":null,"created":"2017-09-17T10:28:01.634Z","updated":"2017-09-17T10:28:18.620Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_207_1505644080179","previous_sibling":"handler_206_1505644080179"},{"type":"event_handler","title":null,"output":null,"parent":"slot_205_1505644080179","context":{"Measure":"@Measure"},"created":"2017-09-17T10:28:01.188Z","updated":"2017-09-17T10:28:08.990Z","metadata":null,"next_step":null,"conditions":"@Measure","event_name":"input","description":null,"dialog_node":"handler_206_1505644080179","previous_sibling":null},{"type":"slot","title":null,"output":null,"parent":"node_174_1505639007409","context":null,"created":"2017-09-17T09:56:03.408Z","updated":"2017-09-17T09:56:09.825Z","metadata":null,"variable":"$Measure","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_194_1505642163340","previous_sibling":"slot_191_1505642129955"},{"type":"slot","title":null,"output":null,"parent":"node_174_1505639007409","context":null,"created":"2017-09-17T09:55:30.076Z","updated":"2017-09-17T09:55:43.400Z","metadata":null,"variable":"$number","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_191_1505642129955","previous_sibling":"slot_188_1505642093846"},{"type":"slot","title":null,"output":null,"parent":"node_174_1505639007409","context":null,"created":"2017-09-17T09:54:54.024Z","updated":"2017-09-17T09:55:05.532Z","metadata":null,"variable":"$Selectname","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_188_1505642093846","previous_sibling":"handler_175_1505639033457"},{"type":"event_handler","title":null,"output":{"text":{"values":["top three or top five?"],"selection_policy":"sequential"}},"parent":"node_174_1505639007409","context":null,"created":"2017-09-17T09:03:53.837Z","updated":"2017-09-17T09:56:42.882Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_175_1505639033457","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"bottom three or bottom five?"},"parent":"slot_202_1505644050885","context":null,"created":"2017-09-17T10:27:31.897Z","updated":"2017-09-17T10:28:00.115Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_204_1505644050885","previous_sibling":"handler_203_1505644050885"},{"type":"event_handler","title":null,"output":null,"parent":"slot_202_1505644050885","context":{"number":"@sys-number"},"created":"2017-09-17T10:27:31.435Z","updated":"2017-09-17T10:27:40.292Z","metadata":null,"next_step":null,"conditions":"@sys-number","event_name":"input","description":null,"dialog_node":"handler_203_1505644050885","previous_sibling":null},{"type":"slot","title":null,"output":null,"parent":"node_32_1505629979351","context":null,"created":"2017-09-17T06:35:03.397Z","updated":"2017-09-17T06:35:12.037Z","metadata":null,"variable":"$Measure","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_44_1505630103209","previous_sibling":"slot_41_1505630083757"},{"type":"slot","title":null,"output":null,"parent":"node_32_1505629979351","context":null,"created":"2017-09-17T06:34:43.989Z","updated":"2017-09-17T06:34:53.315Z","metadata":null,"variable":"$date","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_41_1505630083757","previous_sibling":"slot_38_1505630067302"},{"type":"slot","title":null,"output":null,"parent":"node_32_1505629979351","context":null,"created":"2017-09-17T06:34:27.524Z","updated":"2017-09-17T06:34:38.266Z","metadata":null,"variable":"$Retailer_country","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_38_1505630067302","previous_sibling":"slot_35_1505630048863"},{"type":"event_handler","title":null,"output":{"text":{"values":["Minimum of which product?"],"selection_policy":"sequential"}},"parent":"node_32_1505629979351","context":null,"created":"2017-09-17T06:34:09.155Z","updated":"2017-09-17T06:35:45.931Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_34_1505630048833","previous_sibling":"node_33_1505630016914"},{"type":"slot","title":null,"output":null,"parent":"node_32_1505629979351","context":null,"created":"2017-09-17T06:34:09.939Z","updated":"2017-09-17T06:34:21.339Z","metadata":null,"variable":"$Product","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_35_1505630048863","previous_sibling":"handler_34_1505630048833"},{"type":"response_condition","title":null,"output":{"text":{"values":["I will be calculating the lowest $Measure of $Product in $Retailer_country in ."],"selection_policy":"sequential"},"action":"question_completed"},"parent":"node_32_1505629979351","context":{"intent":"min","entities_array":[{"value":"","entity":"Product"},{"value":"","entity":"Retailer_country"},{"value":"","entity":"Year"},{"value":"Measure","entity":"$Measure"}]},"created":"2017-09-17T06:33:37.124Z","updated":"2017-09-17T06:36:56.671Z","metadata":null,"next_step":null,"conditions":"","description":null,"dialog_node":"node_33_1505630016914","previous_sibling":null},{"type":"slot","title":null,"output":null,"parent":"node_197_1505644008360","context":null,"created":"2017-09-17T10:28:00.757Z","updated":"2017-09-17T10:28:08.541Z","metadata":null,"variable":"$Measure","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_205_1505644080179","previous_sibling":"slot_202_1505644050885"},{"type":"slot","title":null,"output":null,"parent":"node_197_1505644008360","context":null,"created":"2017-09-17T10:27:30.980Z","updated":"2017-09-17T10:27:39.851Z","metadata":null,"variable":"$number","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_202_1505644050885","previous_sibling":"slot_199_1505644030790"},{"type":"slot","title":null,"output":null,"parent":"node_197_1505644008360","context":null,"created":"2017-09-17T10:27:11.846Z","updated":"2017-09-17T10:27:22.478Z","metadata":null,"variable":"$Selectname","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_199_1505644030790","previous_sibling":"handler_198_1505644030771"},{"type":"event_handler","title":null,"output":{"text":{"values":["bottom three or bottom five?"],"selection_policy":"sequential"}},"parent":"node_197_1505644008360","context":null,"created":"2017-09-17T10:27:11.007Z","updated":"2017-09-17T10:28:37.205Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_198_1505644030771","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which Product?"},"parent":"slot_23_1505614036666","context":null,"created":"2017-09-17T02:07:17.870Z","updated":"2017-09-17T05:50:19.126Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_25_1505614036666","previous_sibling":"handler_24_1505614036666"},{"type":"event_handler","title":null,"output":{},"parent":"slot_23_1505614036666","context":{"Product":"@Product"},"created":"2017-09-17T02:07:17.440Z","updated":"2017-09-17T05:50:11.555Z","metadata":null,"next_step":null,"conditions":"@Product","event_name":"input","description":null,"dialog_node":"handler_24_1505614036666","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which Country?"},"parent":"slot_38_1505630067302","context":null,"created":"2017-09-17T06:34:28.422Z","updated":"2017-09-17T06:34:43.973Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_40_1505630067302","previous_sibling":"handler_39_1505630067302"},{"type":"event_handler","title":null,"output":null,"parent":"slot_38_1505630067302","context":{"Retailer_country":"@Retailer_country"},"created":"2017-09-17T06:34:27.988Z","updated":"2017-09-17T06:34:38.686Z","metadata":null,"next_step":null,"conditions":"@Retailer_country","event_name":"input","description":null,"dialog_node":"handler_39_1505630067302","previous_sibling":null},{"type":"slot","title":null,"output":null,"parent":"node_47_1505630462593","context":null,"created":"2017-09-17T06:43:56.462Z","updated":"2017-09-17T06:44:10.540Z","metadata":null,"variable":"$Retailer_country","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_49_1505630635429","previous_sibling":"handler_48_1505630635407"},{"type":"slot","title":null,"output":null,"parent":"node_47_1505630462593","context":null,"created":"2017-09-17T06:44:30.945Z","updated":"2017-09-17T06:44:41.389Z","metadata":null,"variable":"$Measure","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_55_1505630670756","previous_sibling":"slot_52_1505630656049"},{"type":"slot","title":null,"output":null,"parent":"node_47_1505630462593","context":null,"created":"2017-09-17T06:44:16.286Z","updated":"2017-09-17T06:44:26.358Z","metadata":null,"variable":"$date","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_52_1505630656049","previous_sibling":"slot_49_1505630635429"},{"type":"event_handler","title":null,"output":{"text":{"values":["Total of which country?"],"selection_policy":"sequential"}},"parent":"node_47_1505630462593","context":null,"created":"2017-09-17T06:43:55.677Z","updated":"2017-09-17T06:45:15.230Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_48_1505630635407","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Profit or Revenue?"},"parent":"slot_44_1505630103209","context":null,"created":"2017-09-17T06:35:04.291Z","updated":"2017-09-17T06:35:23.606Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_46_1505630103209","previous_sibling":"handler_45_1505630103209"},{"type":"event_handler","title":null,"output":null,"parent":"slot_44_1505630103209","context":{"Measure":"@Measure"},"created":"2017-09-17T06:35:03.861Z","updated":"2017-09-17T06:35:12.466Z","metadata":null,"next_step":null,"conditions":"@Measure","event_name":"input","description":null,"dialog_node":"handler_45_1505630103209","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which year?"},"parent":"slot_52_1505630656049","context":null,"created":"2017-09-17T06:44:17.228Z","updated":"2017-09-17T06:44:30.800Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_54_1505630656049","previous_sibling":"handler_53_1505630656049"},{"type":"event_handler","title":null,"output":null,"parent":"slot_52_1505630656049","context":{"date":"@sys-date"},"created":"2017-09-17T06:44:16.805Z","updated":"2017-09-17T06:44:26.772Z","metadata":null,"next_step":null,"conditions":"@sys-date","event_name":"input","description":null,"dialog_node":"handler_53_1505630656049","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which Country?"},"parent":"slot_60_1505631112139","context":null,"created":"2017-09-17T06:51:56.592Z","updated":"2017-09-17T06:52:17.477Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_62_1505631112139","previous_sibling":"handler_61_1505631112139"},{"type":"event_handler","title":null,"output":null,"parent":"slot_60_1505631112139","context":{"Retailer_country":"@Retailer_country"},"created":"2017-09-17T06:51:55.896Z","updated":"2017-09-17T06:52:12.472Z","metadata":null,"next_step":null,"conditions":"@Retailer_country","event_name":"input","description":null,"dialog_node":"handler_61_1505631112139","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Profit or Revenue?"},"parent":"slot_55_1505630670756","context":null,"created":"2017-09-17T06:44:31.922Z","updated":"2017-09-17T06:44:57.577Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_57_1505630670756","previous_sibling":"handler_56_1505630670756"},{"type":"event_handler","title":null,"output":null,"parent":"slot_55_1505630670756","context":{"Measure":"@Measure"},"created":"2017-09-17T06:44:31.484Z","updated":"2017-09-17T06:44:41.833Z","metadata":null,"next_step":null,"conditions":"@Measure","event_name":"input","description":null,"dialog_node":"handler_56_1505630670756","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which Product?"},"parent":"slot_35_1505630048863","context":null,"created":"2017-09-17T06:34:11.028Z","updated":"2017-09-17T06:34:27.403Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_37_1505630048863","previous_sibling":"handler_36_1505630048863"},{"type":"event_handler","title":null,"output":null,"parent":"slot_35_1505630048863","context":{"Product":"@Product"},"created":"2017-09-17T06:34:10.411Z","updated":"2017-09-17T06:34:21.780Z","metadata":null,"next_step":null,"conditions":"@Product","event_name":"input","description":null,"dialog_node":"handler_36_1505630048863","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"top three or top five?"},"parent":"slot_191_1505642129955","context":null,"created":"2017-09-17T09:55:30.989Z","updated":"2017-09-17T09:56:03.361Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_193_1505642129956","previous_sibling":"handler_192_1505642129955"},{"type":"event_handler","title":null,"output":null,"parent":"slot_191_1505642129955","context":{"number":"@sys-number"},"created":"2017-09-17T09:55:30.538Z","updated":"2017-09-17T09:55:43.838Z","metadata":null,"next_step":null,"conditions":"@sys-number","event_name":"input","description":null,"dialog_node":"handler_192_1505642129955","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Products or Countries?"},"parent":"slot_199_1505644030790","context":null,"created":"2017-09-17T10:27:12.731Z","updated":"2017-09-17T10:56:05.861Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_201_1505644030790","previous_sibling":"handler_200_1505644030790"},{"type":"event_handler","title":null,"output":null,"parent":"slot_199_1505644030790","context":{"Selectname":"@Selectname"},"created":"2017-09-17T10:27:12.278Z","updated":"2017-09-17T10:27:22.911Z","metadata":null,"next_step":null,"conditions":"@Selectname","event_name":"input","description":null,"dialog_node":"handler_200_1505644030790","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Profit or Revenue?"},"parent":"slot_194_1505642163340","context":null,"created":"2017-09-17T09:56:04.374Z","updated":"2017-09-17T09:56:20.927Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_196_1505642163340","previous_sibling":"handler_195_1505642163340"},{"type":"event_handler","title":null,"output":null,"parent":"slot_194_1505642163340","context":{"Measure":"@Measure"},"created":"2017-09-17T09:56:03.898Z","updated":"2017-09-17T09:56:10.266Z","metadata":null,"next_step":null,"conditions":"@Measure","event_name":"input","description":null,"dialog_node":"handler_195_1505642163340","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which Country?"},"parent":"slot_1_1505627419049","context":null,"created":"2017-09-17T05:50:20.173Z","updated":"2017-09-17T05:50:32.074Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_3_1505627419049","previous_sibling":"handler_2_1505627419049"},{"type":"event_handler","title":null,"output":null,"parent":"slot_1_1505627419049","context":{"Retailer_country":"@Retailer_country"},"created":"2017-09-17T05:50:19.728Z","updated":"2017-09-17T05:50:27.275Z","metadata":null,"next_step":null,"conditions":"@Retailer_country","event_name":"input","description":null,"dialog_node":"handler_2_1505627419049","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Profit or Revenue?"},"parent":"slot_10_1505627898314","context":null,"created":"2017-09-17T05:58:19.367Z","updated":"2017-09-17T05:58:33.532Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_12_1505627898314","previous_sibling":"handler_11_1505627898314"},{"type":"event_handler","title":null,"output":null,"parent":"slot_10_1505627898314","context":{"Measure":"@Measure"},"created":"2017-09-17T05:58:18.941Z","updated":"2017-09-17T05:58:26.275Z","metadata":null,"next_step":null,"conditions":"@Measure","event_name":"input","description":null,"dialog_node":"handler_11_1505627898314","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which Country?"},"parent":"slot_49_1505630635429","context":null,"created":"2017-09-17T06:43:57.349Z","updated":"2017-09-17T06:44:16.267Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_51_1505630635429","previous_sibling":"handler_50_1505630635429"},{"type":"event_handler","title":null,"output":null,"parent":"slot_49_1505630635429","context":{"Retailer_country":"@Retailer_country"},"created":"2017-09-17T06:43:56.909Z","updated":"2017-09-17T06:44:11.006Z","metadata":null,"next_step":null,"conditions":"@Retailer_country","event_name":"input","description":null,"dialog_node":"handler_50_1505630635429","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Which Year?"},"parent":"slot_63_1505631137407","context":null,"created":"2017-09-17T06:52:18.598Z","updated":"2017-09-17T06:52:33.964Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_65_1505631137407","previous_sibling":"handler_64_1505631137407"},{"type":"event_handler","title":null,"output":null,"parent":"slot_63_1505631137407","context":{"date":"@sys-date"},"created":"2017-09-17T06:52:18.106Z","updated":"2017-09-17T06:52:25.550Z","metadata":null,"next_step":null,"conditions":"@sys-date","event_name":"input","description":null,"dialog_node":"handler_64_1505631137407","previous_sibling":null},{"type":"slot","title":null,"output":null,"parent":"node_1_1505579917227","context":null,"created":"2017-09-17T05:58:18.500Z","updated":"2017-09-17T05:58:25.871Z","metadata":null,"variable":"$Measure","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_10_1505627898314","previous_sibling":"slot_7_1505627498532"},{"type":"response_condition","title":null,"output":{"text":{"values":["I will be calculating the highest $Measure of $Product in $Retailer_country in ."],"selection_policy":"sequential"},"action":"question_completed"},"parent":"node_1_1505579917227","context":{"intent":"max","entities_array":[{"value":"","entity":"Product"},{"value":"","entity":"Retailer_country"},{"value":"","entity":"Year"},{"value":"Measure","entity":"$Measure"}]},"created":"2017-09-17T02:07:28.886Z","updated":"2017-09-17T06:32:56.132Z","metadata":null,"next_step":null,"conditions":null,"description":null,"dialog_node":"node_26_1505614048612","previous_sibling":"handler_29_1505628146891"},{"type":"slot","title":null,"output":null,"parent":"node_1_1505579917227","context":null,"created":"2017-09-17T05:50:19.283Z","updated":"2017-09-17T05:50:26.866Z","metadata":null,"variable":"$Retailer_country","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_1_1505627419049","previous_sibling":"slot_23_1505614036666"},{"type":"response_condition","title":null,"output":{"text":{"values":[],"selection_policy":"sequential"}},"parent":"node_1_1505579917227","context":null,"created":"2017-09-17T02:07:29.900Z","updated":"2017-09-17T04:17:32.510Z","metadata":null,"next_step":null,"conditions":null,"description":null,"dialog_node":"node_27_1505614049652","previous_sibling":"node_26_1505614048612"},{"type":"slot","title":null,"output":{},"parent":"node_1_1505579917227","context":null,"created":"2017-09-17T02:07:16.998Z","updated":"2017-09-17T05:50:11.125Z","metadata":null,"variable":"$Product","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_23_1505614036666","previous_sibling":"node_27_1505614049652"},{"type":"slot","title":null,"output":null,"parent":"node_1_1505579917227","context":null,"created":"2017-09-17T05:51:38.741Z","updated":"2017-09-17T05:54:38.920Z","metadata":null,"variable":"$date","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_7_1505627498532","previous_sibling":"slot_1_1505627419049"},{"type":"event_handler","title":null,"output":{"text":{"values":["Maximum of which product?"],"selection_policy":"sequential"}},"parent":"node_1_1505579917227","context":null,"created":"2017-09-17T06:02:27.131Z","updated":"2017-09-17T06:02:56.580Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_29_1505628146891","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Profit or Revenue?"},"parent":"slot_66_1505631153918","context":null,"created":"2017-09-17T06:52:34.990Z","updated":"2017-09-17T06:52:52.253Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_68_1505631153918","previous_sibling":"handler_67_1505631153918"},{"type":"event_handler","title":null,"output":null,"parent":"slot_66_1505631153918","context":{"Measure":"@Measure"},"created":"2017-09-17T06:52:34.538Z","updated":"2017-09-17T06:52:41.461Z","metadata":null,"next_step":null,"conditions":"@Measure","event_name":"input","description":null,"dialog_node":"handler_67_1505631153918","previous_sibling":null},{"type":"slot","title":null,"output":null,"parent":"node_58_1505631091605","context":null,"created":"2017-09-17T06:52:17.656Z","updated":"2017-09-17T06:52:25.079Z","metadata":null,"variable":"$date","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_63_1505631137407","previous_sibling":"slot_60_1505631112139"},{"type":"slot","title":null,"output":null,"parent":"node_58_1505631091605","context":null,"created":"2017-09-17T06:52:34.096Z","updated":"2017-09-17T06:52:41.014Z","metadata":null,"variable":"$Measure","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_66_1505631153918","previous_sibling":"slot_63_1505631137407"},{"type":"slot","title":null,"output":null,"parent":"node_58_1505631091605","context":null,"created":"2017-09-17T06:51:54.929Z","updated":"2017-09-17T06:52:11.994Z","metadata":null,"variable":"$Retailer_country","next_step":null,"conditions":null,"description":null,"dialog_node":"slot_60_1505631112139","previous_sibling":"handler_59_1505631112129"},{"type":"event_handler","title":null,"output":{"text":{"values":["Average of which country?"],"selection_policy":"sequential"}},"parent":"node_58_1505631091605","context":null,"created":"2017-09-17T06:51:52.439Z","updated":"2017-09-17T06:53:00.639Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_59_1505631112129","previous_sibling":null},{"type":"event_handler","title":null,"output":{"text":"Products or Countries?"},"parent":"slot_188_1505642093846","context":null,"created":"2017-09-17T09:54:55.136Z","updated":"2017-09-17T10:53:27.339Z","metadata":null,"next_step":null,"conditions":null,"event_name":"focus","description":null,"dialog_node":"handler_190_1505642093846","previous_sibling":"handler_189_1505642093846"},{"type":"event_handler","title":null,"output":null,"parent":"slot_188_1505642093846","context":{"Selectname":"@Selectname"},"created":"2017-09-17T09:54:54.682Z","updated":"2017-09-17T09:55:05.983Z","metadata":null,"next_step":null,"conditions":"@Selectname","event_name":"input","description":null,"dialog_node":"handler_189_1505642093846","previous_sibling":null},{"type":"frame","title":"max","output":{},"parent":null,"context":null,"created":"2017-09-16T16:38:34.409Z","updated":"2017-09-17T06:08:55.386Z","metadata":{"fallback":"leave","_customization":{"mcr":true}},"next_step":null,"conditions":"#max","description":null,"dialog_node":"node_1_1505579917227","previous_sibling":"Welcome"},{"type":"frame","title":"bottom","output":{"text":{"values":["I will be calculating the bottom $number $Measure generated in $Selectname."],"selection_policy":"sequential"},"action":"question_completed"},"parent":null,"context":{"intent":"bottom","entities_array":[{"value":"Selectname","entity":"$Selectname"},{"value":"sys-number","entity":"$number"},{"value":"$Measure","entity":"$Measure"}]},"created":"2017-09-17T10:26:48.456Z","updated":"2017-09-17T10:47:01.696Z","metadata":{"fallback":"leave"},"next_step":null,"conditions":"#bottom","description":null,"dialog_node":"node_197_1505644008360","previous_sibling":"node_174_1505639007409"},{"type":"frame","title":"summation","output":{"text":{"values":["I will be calculating the total $Measure of $Retailer_country in ."],"selection_policy":"sequential"},"action":"question_completed"},"parent":null,"context":{"intent":"summation","entities_array":[{"value":"","entity":"Retailer_country"},{"value":"","entity":"Year"},{"value":"Measure","entity":"$Measure"}]},"created":"2017-09-17T06:41:02.834Z","updated":"2017-09-17T06:50:01.533Z","metadata":{"fallback":"leave"},"next_step":null,"conditions":"#summation","description":null,"dialog_node":"node_47_1505630462593","previous_sibling":"node_32_1505629979351"},{"type":"frame","title":"average","output":{"text":{"values":["I will be calculating the average $Measure of $Retailer_country in ."],"selection_policy":"sequential"},"action":"question_completed"},"parent":null,"context":{"intent":"average","entities_array":[{"value":"","entity":"Retailer_country"},{"value":"","entity":"Year"},{"value":"Measure","entity":"$Measure"}]},"created":"2017-09-17T06:51:32.673Z","updated":"2017-09-17T09:36:50.236Z","metadata":{"fallback":"leave"},"next_step":null,"conditions":"#average","description":null,"dialog_node":"node_58_1505631091605","previous_sibling":"node_47_1505630462593"},{"type":"frame","title":"min","output":{},"parent":null,"context":null,"created":"2017-09-17T06:32:59.529Z","updated":"2017-09-17T06:34:09.940Z","metadata":{"_customization":{"mcr":true}},"next_step":null,"conditions":"#min","description":null,"dialog_node":"node_32_1505629979351","previous_sibling":"node_1_1505579917227"},{"type":"frame","title":"top","output":{"text":{"values":["I will be calculating the top $number $Measure generated in $Selectname."],"selection_policy":"sequential"},"action":"question_completed"},"parent":null,"context":{"intent":"top","entities_array":[{"value":"Selectname","entity":"$Selectname"},{"value":"sys-number","entity":"$number"},{"value":"$Measure","entity":"$Measure"}]},"created":"2017-09-17T09:03:27.768Z","updated":"2017-09-17T10:59:10.262Z","metadata":{"fallback":"leave"},"next_step":null,"conditions":"#top","description":null,"dialog_node":"node_174_1505639007409","previous_sibling":"node_58_1505631091605"},{"title":"Welcome","output":{"text":{"values":["Hello. How can I help you?"],"selection_policy":"sequential"}},"parent":null,"context":null,"created":"2017-09-16T16:38:28.925Z","updated":"2017-09-16T16:38:28.925Z","metadata":null,"next_step":null,"conditions":"welcome","description":null,"dialog_node":"Welcome","previous_sibling":null}],"workspace_id":"Update New workspace ID","counterexamples":[],"learning_opt_out":false} --------------------------------------------------------------------------------