Build Custom Service Components for the Oracle Digital Assistant in Minutes!

Hello there,

I will not keep you with a long post. You need to be familiar with the Oracle Digital Assistant to try out this.

To implement custom components, you use the Oracle Digital Assistant Node.js SDK to interface with Digital Assistant’s custom component service. You can then deploy to the Digital Assistant embedded container, a Mobile Hub backend, or a Node.js server.

Here i will explain deploying on Digital Assistant Embedded container.

Prerequisites:

  • Node Package Manager, Node version 8.x or lower
  • Access to Oracle Digital Assistant 18.4.3+

1. Install node globally on your windows machine;

npm install -g @oracle/bots-node-sdk

2. Create a directory on windows ie. helloworld

3. Enter in the directory using cmd (terminal)

3. Initialize new node project inside the folder ie. helloworld

npm init -y

4. Install Node SDK locally

npm install --save-dev @oracle/bots-node-sdk

5. Create a custom component with a custom name. ie LaHelloWorld

bots-node-sdk init -c LaHelloWorld

6. Navigate out of the folder.

cd ..

7. Start node server and test the custom component just created.

bots-node-sdk service helloworld

8. Open the browser and test the URL given on cmd

Capture

9. Crt + C to cancel the node server process

10. Navigate back to the folder

cd helloworld

11. Create a package to deploy.

npm pack

12. Go to the skills on Oracle Digital Assistant ie. LN_customc101

(Download and import one I  created on here)

13. Open it and go to custom component service menu

14. Click add a service

15. Give it a name ie. Helloworld and select Embedded container.

16. Upload the packaged helloworld1.x.0.0.tgz packaged earlier.

17. Click create and wait for it to be deployed.

Capture1

18. Test your work! It works! 🙂

Capture2

 

Check out this code on Github

Learn more | Useful resources, check out;

 

Author: Labanish

I am a Senior Cloud Solutions Architect at Oracle. Am interested in Cloud Automation, Cloud Native Applications dev and Emerging Tech. I have over 6 years work experience handling different tech roles in East Africa, Romania & now in United Kingdom. All views are mine.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: