Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
shivamshukla12
Contributor
729
Hi Guys ,

Hope you are doing great!! And wishing you a very happy read.

 

We see that AI is touching almost every corner and helping people in getting their job done easily. Yeah AI is trying to fill the gap of repetitive activities easily and providing helping hands to the users by giving them the exact & relevant information by deleting the dependency.

Making people independent in completing their end-to-end tasks.

 

A Small talk is always there to help you.

"Hey CAI - give me the status of my invoice - Hi Status of your invoice is - "Invoiced".

Thanks - Great

Thank you for talking to me"

 

Architecture.


 

Architecture diagram clearly states that CAI is helping end users by providing the required information from backend system (S/4 HANA) using OData services.

  • First case end-users are trying to communicate to CAI and CAI further talking to backend for required information

  • Second scenario CAI is integrated with Workzone and Workzone users are trying to talk to CAI smoothly


Note: OData Services in the backend are developed to bring the data to CAI Client … lets see how you do this easily.

 

  • Create your CAI trial account here - if you already have then login into your account.

  • Click create new BOT and give it any name you want and choose below attributes for your bot.


         


 

  • Let's create our first bot and go... Click create

  • So first of all we need to understand few concepts (Intents/Entities/Skill/Actions)

  • All these 4 things going to play a very crucial role in BOT training and development.


Intents - This is something which you want to say to your BOT but make sure it doesn't conflict with any other intent.

Have a good read here

 

Entities - Any keyword which is extracted from the expressions which are feeding to intent.

Have a good read here

Skills - Who will be responsible if BOT got any intent trigger - it actually tells the BOT to perform some actions

Actions - Handler of any activity which is triggered by Intents

 

Lets start creating intents now.

Click New Intent 

Any Name and lets create (getmyinvoice)


 

Let's start feeding the expressions in your intent.


Data feeding done now lets see the magic of Machin learning behind CAI.

Entity Number is automatically identified here... lets see how this works in real.


We got the number now which is your billing document and can be used get the invoice information.

We got the intent and entity both lets go to BUILD and add Skill (fetch_invoice) something like this.

Skill                                                                                                    Triggers 


 

Requirement


 

Once we have completed this lets complete the Action as well to fetch Invoice details here Go to Actions and create a new action group.

 

First Add simple text   (Lets Bring invoice information...)

Second add Consume external API Service .


 

 

So lets add the API details with authentication and some headers value like (Accept = */*).

 


 

Authentication -  Choose Basic - > username/password

Response - Give the variable name (Inv_data) to capture response from Service.

if everything is good then we will get invoice result back in Inv_data.

 

Important Note - We have invoice entity number which is holding the value of invoice number so we need to modify the url like this.

OData GET - {url}/Invoices(InvoiceNumber='{{memory.number.raw}})?$format=json

 

Lets train the BOT now. Click Train - once training is completed you will see the yellow icon turned into green.

We can test our BOT now.

 


 

Lets start testing... click on expression analysis

Enter
bring invoice details 5105609510



 

 

 

 

 

 

 

 

 

You see number is automatically populated.

Lets go to chat preview and start talking to BOT. you see the chat preview hope you also get the same response -- if not then please add your comments/feedback.

One thing which we missed how to write the response back in output.

 

Write your response like -  {{api_service_response.Inv.data.d.InvoiceNumber}}  You can add your fields and text in textbox.

 

So in this part I could tell you how to consume the external service in CAI and in next Part will share the integration of BOT with SAP Workzone

 

Thanks,

Shivam
Labels in this area