Creating an endpoint for your Alexa skill using the Alexa nodes in Interplay
The following steps will help you set up a simple endpoint to receive and reply to Alexa queries using Interplay and the predefined Alexa nodes.
You will require an Alexa developer account. Once you have signed into your account it is required to make a new skill. Simply leave the default selections and name your skill
Choose Start from scratch
Follow the instructions on the Alexa developer console to create an invocation. At this point you can also define your own intents if you so wish.
Some key configurations to note is that you should configure the endpoint as shown in the following image. Select Https as the endpoint and in the field enter the url as https://[YOUR_DOMAIN_NAME].interplay.iterate.ai/[YOUR_ENDPOINT_NAME]. The domain name is the name of the interplay instance that you created through our dashboard. It is also the first section of the url to access your interplay instance. The endpoint name we will define in the flow in the following steps. Be sure to select the second option for the certificate, as shown in the following image.
Now we must configure the flow to accept requests. You can drag and drop the Alexa components or simply select Alexa as the default project when creating your Interplay instance.
The following components need to be configured:
- VA in
- Alexa Request Switch
- Alexa Intent Switch
- Alexa Speech
In the VA in node, you need to write the endpoint name you specified in the endpoint configuration in the Alexa console.
In the Alexa Request Switch node you need to set up the following three basic request rules to handle requests properly:
As the output of the LaunchRequest all that needs to be configured is an Alexa Speech node to send a greeting. If you don’t want the session to end after the launch request the end session check mark should be left unchecked else the session will close.
Now we must match the intent switch rules to the intents you have defined in the Alexa developer console
Any intent defined in the console will come in to the Alexa Intent Switch node exactly as defined there fore it is important to pay close attention to the rules defined in the node.
The rule that is confirmed can then by handled appropriately using any of the response nodes for Alexa. Be it an Alexa Speech node, a directive, card, or an audio node.
Then the final step if you wish to get the skill verified is to make use of the Alexa Signature Verification node. This will make sure those signatures sent while running the publishing test will be verified. This particular node as mentioned in its documentation is returns a new property in the msg object. This property can be accessed from msg.verified. It is a simple boolean value. The user can then send the correct response appropriately from a follow up Function node.
Once a correct response is set to an intent the last step is to connect the flow to a VA Out node which will send the response back to Alexa.
These are all the steps required to set up a simple Alexa flow in conjunction with the Alexa developer console to create simple Alexa interactions