Skip to main content

Trigger PCS Application from Digital Assistant/Chatbot

Introduction

In this article I will be explaining about triggering the PCS application from the chatbot.

Main article

Many of us might have known about triggering the PCS integrations from the OICS or VBCS.

Have you ever done it from chatbots?

Let’s build a dummy process application in first place which we want to trigger from the chatbot.

The main purpose of this would be to notify the user over the mail with the details that he had filled in the form.

In this case I have created a message-based process and named it as chatbot.

Create a basic form with two fields UserID and IntegrationName.



Now create a new message-based process:

For the message action at the begin providing the details as below:



Select the form in the User Task (Submit) action:



Now Follow the below steps to get the integration configured in chatbot environment:

1.       Go to the settings section and select API services.


Provide the details as below :


Once done go to the authentication section and select basic authentication from the drop-down list:

Provide your OIC/PCS credentials.

Now in the methods section, provide the input payload for the integration call.

{

    "processDefId": "oracleinternalpcs~chatbot!1.4~ChatbotProcess",

    "serviceName": "ChatbotProcess.service",

    "operation": "postUserInput",

    "action": "Submit",

    "params": {

        "userId": "John",

        "intName": "hcfsdrvh"

    }

}

Click on test the request and save the response:



Now please refer to my previous blog on building the basic chatbot:
https://oracletechshares.blogspot.com/2022/07/easy-chatbotdigital-assistant.html

following the above steps build the utterances of your own choice.

In this case, my utterance is ‘I want to raise a ticket.’

Now go to the flow section of the ODA and drop the rest service section and drop action call REST service and select the endpoint from the dropdown. Once done you should be able to see the complete details of the endpoint you have provided in the configuration step.

Let’s test the Chatbot we had built so far.




As you could see the chatbot replied with message saying process request has been raised along with the ID.

 

Now, if we check our process tasks, we would be able to see our request as below:



I you are wondering how I’ve designed the chat with replies.

Please check these blogs of mine:

https://oracletechshares.blogspot.com/2022/07/easy-chatbotdigital-assistant.html

https://oracletechshares.blogspot.com/2022/09/trigger-oic-from-digital.html

 

Hope you all liked the article and learnt something new for the day.


- PREETHAM KONJETI 







Comments

Popular posts from this blog

Backup Integrations of an Instance with a single click using OIC

  Introduction One common mistake that most of OICS developers make is not taking the backup of their integrations religiously and if they want to take backups clicking on the export of the integrations individually could be quite tedious. Main Article In this blog I will be explaining about automating the backup process in OICS. Below is the order of the steps that are to be followed: STEP:1 1) Configure a Rest trigger connection as shown below. Provide the below payload in the request section:     {   "IntegrationName”: "" } STEP:2   Configure the new rest connection as mentioned below. (This basically list downs all the integration details as per the provided name).   Provide the Query parameters as below:   Provide the response payload as below: {   "hasMore" : "false",   "items" : [ {     "id" : "",     "name" : "",     "lockedFlag" : &quo

Deploy all integrations to new environment with a single click using OIC

 

Implement While loop in XSLT of OICS

Introduction: In the XSLT mapper of OICS by default we don't have the while loop to implement, but there can be a situation where we need to implement while , when such situation shows up how to implement it? Main Article: In the above XML, the filename is static....say we need to populate the same field with 5 file names in a single shot in other words to bring dynamism to the Code we have to use loop. Lets do it using While loop. But in XSLT we don't have while loop by default, then how can we achieve this? Just like functions in any other languages we have a thing called 'Template' in XML. Using this we can achieve the while loop. 1) In the above code, match='/'  indicates the default template to be called , In this case the default templated calls the ' customWhile ' template which we had created with parameter 1 as the input. 2) Once the template is called in the very first step as check would be performed to check the input param falls in our desir