Red Hat Mobile Application Platform provides a platform to create mobile applications for many use cases and technologies. Workforce management mobile applications are essential in any size corporation and are increasingly popular in many IT organizations. Most workforce management mobile applications include forms that need to be filled out by employees and customers. Red Hat Mobile Application Platform includes many form templates to accelerate the development process of such mobile applications.
Use case
In this blog post, we address the use case where employees need to fill and submit forms as part of their daily workflow and would prefer to use a voice assistant. In this situation, an employee might have his hands busy doing work, or it is simply faster to use voice than actually typing it.
We created a sample project and mobile application for an employee that works for a major racing car company and his role is to test drive cars on different racing tracks and submit a report at the end of each test.
Red Hat Mobile Application Platform forms
Forms and form templates are very well supported as part of Red Hat Mobile Application Platform. You can find many tutorials and guides as part of Red Hat Mobile Application Platform to create form projects that include mobile applications with embedded forms. For this project, we provide the source code for three components:
This code is available for download from github and can be imported into a Red Hat Mobile Application Platform instance.
API.AI
api.ai is a natural language processing service that provides a cloud endpoint for processing language and conversations. In order to use this service, you have to create an account and create a bot for your application. api.ai documentations can be found here. At a minimum, your bot must have an intent and some entities. An intent defines the flow of a conversation, opening and closing statements and questions, variables needed from the conversation and built-in machine learning capabilities.
Creation of the bot can be done manually using the api.ai portal, or it can be executed programmatically using the provided api.ai HTTP/JSON endpoint. For this project, Red Hat Mobile Application Platform CloudApp uses the api.ai endpoint to programmatically create a bot based on the forms associated with the Red Hat Mobile Application Platform project. Detailed information is provided in the coming sections.
Integrating Red Hat Mobile Application Platform forms with API.AI
To integrate Red Hat Mobile Application Platform forms with an api.ai bot, we mapped the Red Hat Mobile Application Platform form fields to fields in the bot’s intent and entity definitions. The first field we mapped is the name of the form mapped to the name of the intent. As seen in the figure below, our form name is “cardrivertestreport” and that maps to an api.ai intent called “cardrivertestreport”.
We also mapped the specific Red Hat Mobile Application Platform form field information to parameter information in api.ai intent and entities. As we can see in the figure below, we mapped the following information:
-
Red Hat Mobile Application Platform form field instruction to api.ai intent field prompt. This prompt is spoken by the api.ai voice assistant when a value is needed for a form field.
-
Red Hat Mobile Application Platform form field code is mapped to the parameter name in api.ai intent.
-
Red Hat Mobile Application Platform form required field was also mapped to the api.ai parameter required field in the intent.
-
Red Hat Mobile Application Platform form field drop down values are mapped to api.ai parameter entities. As we can see in the figure below, Red Hat Mobile Application Platform form field “carmodel” has a drop down menu with multiple values that are mapped to api.ai entity “carmodel” values.
The mapping and creation of api.ai intents and entities are done programmatically by the Red Hat Mobile Application Platform CloudApp. CloudApp gathers all associated forms of a Red Hat Mobile Application Platform project, reads all the fields and does the mapping programmatically using the api.ai HTTP/JSON endpoint.
To start this integration process we created a Red Hat Mobile Application Platform Web Client that provides a push button for initiating this integration. As seen in the figure below, pushing the “Power” button initiates the integration code in CloudApp.
Background image downloaded from pixabay
In the figure below, we can see an overview of the project. In the center, we see the Red Hat Mobile Application Platform project containing the CloudApp, Web Client and Cordova mobile application. To initiate the integration process, we use the Web Client to push the “Power” button that calls the CloudApp. CloudApp reads all forms associated with this project and sets up intents and entities on api.ai. After the setup is complete and api.ai is provisioned, the user can start using the mobile application in the field. In our use case, we have the race car driver filling and submitting forms handsfree while he is driving using his voice only.
Demo and code
All the code used in this project can be found on github:
-
Red Hat Mobile Application Platform CloudApp: https://github.com/nakfour/apiai-form-cloudapp
-
Red Hat Mobile Application Platform Mobile Client: https://github.com/nakfour/apiai-form-template
-
Red Hat Mobile Application Platform Web Client: https://github.com/nakfour/apiai-form-webapp
You can also watch this two-part video demo presentation:
-
Part 1: Using Red Hat Mobile Application Platform Web Client to provision intents and entities on api.ai
-
Part 2: Race car driver using Red Hat Mobile Application Platform mobile application to fill and submit forms handsfree and using voice assistant
Conclusion
In this blog post, we demonstrated how to add a voice assistant to Red Hat Mobile Application Platform forms. We kept it simple by using one context in an api.ai intent. However, for more detailed and complicated forms and conversations, more than one context is most likely needed in api.ai intents.
Juana Nakfour is a senior Mobile Technical Account manager with more than 15 years advanced R&D experience in the telecommunications industry. Juana’s focus is broad and includes wireless communication networks, embedded/mobile devices and microservices.
A Red Hat Technical Account Manager (TAM) is a specialized product expert who works collaboratively with IT organizations to strategically plan for successful deployments and help realize optimal performance and growth. The TAM is part of Red Hat’s world-class Customer Experience and Engagement organization and provides proactive advice and guidance to help you identify and address potential problems before they occur. Should a problem arise, your TAM will own the issue and engage the best resources to resolve it as quickly as possible with minimal disruption to your business.
Connect with TAMs at a Red Hat Convergence event near you! Red Hat Convergence is a free, invitation-only event offering technical users an opportunity to deepen their Red Hat product knowledge and discover new ways to apply open source technology to meet their business goals. These events travel to cities around the world to provide you with a convenient, local one-day experience to learn and connect with Red Hat experts and industry peers.
저자 소개
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
오리지널 쇼
엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리
제품
- Red Hat Enterprise Linux
- Red Hat OpenShift Enterprise
- Red Hat Ansible Automation Platform
- 클라우드 서비스
- 모든 제품 보기
툴
체험, 구매 & 영업
커뮤니케이션
Red Hat 소개
Red Hat은 Linux, 클라우드, 컨테이너, 쿠버네티스 등을 포함한 글로벌 엔터프라이즈 오픈소스 솔루션 공급업체입니다. Red Hat은 코어 데이터센터에서 네트워크 엣지에 이르기까지 다양한 플랫폼과 환경에서 기업의 업무 편의성을 높여 주는 강화된 기능의 솔루션을 제공합니다.