Skip to main content

Oracle APEX – Amazon ALEXA integration WITHOUT Amazon Lambda ! (PART 2)

In the last blog post I prepared Oracle side. In this post I will show, how to prepare ALEXA Skill and how to integrate all layers.

Few weeks ago Amazon implemented new version of Alexa Skill Kit. Alexa Skill Kit is like a APEX builder. Low code technology, so you don't need to write any code :)

Let's start ! Go to Amazon Developer Console

1. Click Get Started on Alexa Skills Kit


2. As you can see on screen below there is already one skill on my list. Click on Create Skill to Create new one.


3. The name of my Skill will be - APEXUTIL Pizza  :) but you can name it as you wish.



4. Select Custom


5. Create Invocation. Users say a skill's invocation name to begin an interaction with a particular custom skill.
For example, if the invocation name is "apex pizza", users can say:
"Alexa, ask apex pizza ...."


6. One skill can have one or more Intents. An intent represents an action that fulfills a user's spoken request. For demo I'll use only one Intent: "howmanyorders". There are few others Intents but these are predefined and you can't edit.




7. Intent will use one Utterance with one Slot (slot is some like variable). The utterances specify the words and phrases users can say to invoke your intents. Each intent is mapped to several utterances. Slots are indicated within the utterances with curly brackets.
I used "askdate" slot name in AMAZON.data type. AMAZON.data can converts words that represent dates into a ISO-8601 date format. You can read more in documentation. (if you want to define Slot use "{}" ).






If you are here it means your skill is ready! Now you need to setup Endpoint - connection between skill and Oracle REST service.

8. As I mentioned in previous post blog your web service must be secured (SSL). It's obligatory rule. Also as I mentioned in topic you can build whole solution without Lambda microservice, you can use only HTTPS Endpoint.

If you don't remember your REST service URL you can check it in SQLDeveloper.



Instead of http://localhost:8080 use your domain. In my case final URL looks like this: https://www.apexutil.com/ords/aps/v1/alexa.




If you successful Build your Model you can start test it. Click Test tab from top menu.



As you can see my skill passed all tests !

The last step is the Launch proces. From top menu select Launch tab. If you want to use skill as a Dev skill it's not neccessary, but if you complete these informations your skill will look more proffessioinall.



Before you start test skill with Echo device check is skill accessed on your mobile Alexa app. Open Alexa application on mobile device -> Menu ->Skills->Your skill ->DEV SKILLS





If skill is Enabled let's try with your Echo !
"Alexa ask Apex Pizza how many orders have been placed this week ?"

or watch my ECHO : )

Comments

  1. Thank you for this blog. It's very interesting. I followed all steps you described and got the model successfuly built. However, I got an error using the skill I created. I tried to test another skill using your URL: https://www.apexutil.com/ords/aps/v1/alexa. and got the following error: There was a problem communicating with the requested skill.
    Anything wrong/missed while using your URL?
    Thanks.

    ReplyDelete
  2. If you wish to test my web service try this https://www.apexutil.com/apex/aps/v1/alexa.

    ReplyDelete

Post a Comment

Popular posts from this blog

ORACLE APEX with MySQL !

About 10 years ago I tried to build APEX application on MS SQLServer. It was possible but performance was not satisfactory. (You can read this post here)...
Today I will describe how to use APEX with MySQL. Obviusly I don't think it is good idea to build APEX app only on MySQL. It can be used as part of Hybryd solution (Oracle + MySQL or Postrgres).



My description covers integration with MySQL. As a result will be APEX application with Interactive Report and CRUD form based on MySQL data.
Description contains two parts: First part is a MySQL site, Second part is a APEX application part


Prerequisites:
Oracle 11g+APEX 18.1+MySQL/PostgresRestSQL
I. MySQL Part
1. MySQL contains simple apexdb database with one apexutil table.



2. To use this database install RestSQL. What is RestSQL? RestSQL is an open-source, ultra-lightweight data access layer for HTTP clients. RestSQL is a persistence framework or engine in the middle tier of a classic three tier architecture: client, application ser…

Oracle APEX – Amazon ALEXA integration WITHOUT Amazon Lambda ! (PART 1)

I found few examples how to integrate Amazon Alexa with Oracle. All solutions used Amazon Lambda microservice (node.js). But it’s not necessary. You need only two elements: Oracle with ORDS and Amazon Alexa Skill.



Prerequsites:
-Amazon account (https://developer.amazon.com/ )
-Oracle 11g +
-Oracle ORDS (accessed thru SSL)
-APEX (optionaly)

1. For demo I used only one simple table:
create table alexa_orders   (   alo_id      raw(16) default sys_guid() primary key,   alo_name    varchar2(4000),   alo_qty     number,   alo_value   number,   alo_date    date,   alo_status  varchar2(1024),   alo_ship_datedate  );
You can use these inserts to populate sample datas
insert into alexa_orders ( alo_name, alo_qty , alo_value , alo_date, alo_status, alo_ship_date) values ('Pizza Pepperoni', round(dbms_random.value(1,10),0), round(dbms_random.value(5,1000),2), sysdate-dbms_random.value(1,3),'In progress',sysdate+((1/1440)*dbms_random.value(1,120))); insert into alexa_orders ( …