- Previous
- Next
Overview
This page presents an overview of the integration of one of the Amazon ALEXA Skills that have been shown during the Think 2019 ICS Community Day in February 2019.
A detailed explanation of each of the skills is provided in the remaining pages of this section.
In this page we select The Amazon Alexa QuotesDB skill as an example; we will not drill into the complexity of the NodeRED flow implementing the server-side part of the Amazon ALEXA Skill but we will, rather, show how the use of the NodeRED dominodb nodes has allowed us to create the flow with little or no knowdlege of the DOMINO databases (two of them) that were used to implement the skill.
Details
More details about the integration are provided in the other pages of this section:
- The Amazon Alexa QuotesDB skill
- The Amazon Alexa Vacations skill
- The Amazon Alexa Domino Monitor skill
A Video showing the live session from the Think 2019 ICS Community Day is available here YouTube Video (look from minute 13:00)
The Implementation
This integration is composed of two parts:
- The first part is the definition of the Amazon ALEXA Skill itself, which happens inside the Amazon ALEXA Developer Portal.
In order to give an idea, here is a screenshot of the Amazon ALEXA Skill definition:
What is noticeable, here:
- We defined few Slots to keep track of the actions performed by the Skill
- We implemented the dialog completely within the NodeRED flow (disabling auto-delegation)
- the second part happens inside NodeRED and uses, among others, the NodeRED dominodb nodes.
The NodeRED flow managing this is shown in the picture below.
We highlighted the NodeRED dominodb nodes instances that have been used using the red pencil and the corresponding catch nodes using the blue pencil.
Let’s drill in those highlighted sections:
-
the Get Username node.
This node is an instance of the Get Documents node which uses the Configuration DB DOMINO database node.
It inquires the DOMINO database associated to the Configuration DB node using a DQL query (which comes as an input from a previous node) of this form:
msg.DDB_query = "amazonPIN = 1234"
and returns thedemouser
field from the database which contains the real name of the user.
This query is used during the authentication of the Skill, when the Skill asks for the PIN code.
In case the query fails, a proper catch node (identified within the #1 blue rectangle) is used which gracefully asks the user to re-enter her PIN code. It also verifies if the PIN is recognized. -
The Get Quotes node.
This node is an instance of the Get Documents node and uses the Production DB DOMINO database node.
It inquires the Production DB using a query (which comes from a previous node) of this form:
msg.DDB_query = "status = 'pending' AND amazonPIN = 1234"
and returns thestatus, customer, accountNum, description, seller, TotalCost, UnitCost, total, id, amazonPin
fields from the database.
This query is used when the user has decided which kind of quotes she is looking at.
In case the query fails, a proper catch node (identified within the #2 blue rectangle) is used which ends the Amazon ALEXA session. -
the get by Unid node.
This node is an instance of the DocumentMgr node and uses the Production DB DOMINO database node.
It inquires the Production DB using a@unid
(which comes from a previous node) of this form:
msg.DDB_unid = "value"
and returns thestatus, customer, accountNum, description, seller, TotalCost, UnitCost, total, id, amazonPin
fields from the database.
This query is used when the user has decided which quote she wants to modify the status for.
In case the query fails, a proper catch node (identified within the #3 blue rectangle) is used ends the Amazon ALEXA session. -
The Change Status and Get Modified Doc nodes.
These nodes are, both, instaces of the same DocumentMgr node and they both use the Production DB DOMINO database node.- The first (named Change Status ) performs a Replace Items operation (the red arrow).
It uses themsg.DDB_unid
and themsg.DDB_itemValues
information which are passed from a previous node. - the second (named Get Modified Doc ) performs a Read Document operation (the blue arrow) where it returns the
status, customer, accountNum, description, seller, TotalCost, UnitCost, total, id, amazonPin, $UpdatedBy, Comments, ActionDate, ApprovalType, Reviewer
fields from the mdofied document.
It uses the samemsg.DDB_unid
information that the previous node used. This set o two nodes is used when the user needs to commit the status change.
In case any of the two operations fail, a proper catch node (identified within the #4 blue rectangle) is used ends the Amazon ALEXA session.
- The first (named Change Status ) performs a Replace Items operation (the red arrow).
Conclusion
That was simple right ?
In this example we proved that, using the DOMINO we could really concentrate on the task of properly implementing the server-side code of an Amazon ALEXA skill; the fact that we were interacting with one or more DOMINO databases has been very much simplified by the use of the NodeRED dominodb nodes without worrying at all about the complexity of how to interact with the DOMINO engine.
In the remaining part of this section, we provide the code associated with the 3 Amazon ALEXA Skills that were presented during the Think 2019 ICS Community Day in February 2019.
- Previous
- Next