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
Post a Comment