UiPath HyperHack - DRUID Chatbot technical question topic

Hello, As you are participating in chatbot category of UiPath HyperHack - 20.10 Product Release , this is the space for you to ask any technical question related to DRUID chatbot and our DRUID expert will help address your queries. This support will be available to you until Finals, 3rd Dec 2020.Here are the some of the resource you will find useful.

3 Likes

Thanks cristina.antonescu For wonderful information.

I have a query related to a REST API call, I have created the connector for REST API and getting the user input from the conversation, and passing it as a request.

My query is how we can capture the response from API call and send it to the conversation.

I have created the entity for the response, how to map response with response entity, or how to call the response in the flow?

Thanks,
Priyanka

Hello Priyanka,
The API request and response data is mapped within the same Connector Action Call. Therefore, immediately after the call is finished, data is available in the response entity from that flow step onwards.
The response of the API call is mapped in the RESPONSE tab of the Task, to a DRUID Entity, in a similar way with the Request tab.
Just fill in the values from the JSON API response body in the “ConnectorFieldName” box, and the corresponding DRUID Entity Field name (where you want to store the API response data) in the “DruidEntityFieldName” box.

After the connector call is finished, the response data mapped in the DRUID Entity is available to be used in the flow, as context information (available to be used in any flow, throughout the entire conversation, or until the DRUID Response entity is altered by other means: set variable, other connector action call, etc).

NOTE: keep in mind that if you set different request and response entities on the connector action (General tab), any existing data in the response entity will be deleted at connector action runtime, and only data coming from the connector response will be stored in the response entity. This will not happen when request and response entities are the same (existing data which is not overwritten by the connector response will be kept).

Thanks cristina.antonescu for your answer.

  1. As you suggested, I have tried mapping the “ConnectorFieldName” box and “DruidEntityFieldName” box as per the below screenshot.

  2. just a small doubt - in this case “ConnectorFieldName" Response, we don’t need to create it somewhere else right, we can define it in response and it will automatically assign the API response to Response and mapped it to [[Weather.Response ]] entity?

  3. Do we need to create a separate flow for a response, is it mandatory?
    I have designed flows and steps like below.

  4. Do we need to perform some operation on JSON data we are getting from API?
    As after mapping as per your suggestion, I am not getting a response.

Your help will be highly appriciated.

  1. OK
  2. If the weather API you are calling contains “Response” field in the response body json, then the mapping is correct. However, seeing that there is no value in [[Weather]].Response, may indicate the fact taht the API does not return data in the “Response” field, or the structure of the API response json is different. In order to see exactly how the API responds to your call, and further how the API response is mapped to DRUID [[Weather]] entity, you can use the Connector Audit Log menu, for extended API call history. There, in “Response Task” section, you will see the exact API response JSON, and will know what fields from the API response should be mapped to the DRUID Entity.

Also, using the “Test” tab in the connector task (next to the “Request” and “Response” tabs) can help you check the functionality of the connector action directly from the editing stage, without needing to test it from the conversation.


Here, you can configure the request Entity, which in your case would look like this:
{
entityTypeName”: “Weather”,
“City”:“Pune”
}
And then press the Test button. Bellow, you should see the response of your API, in real time, exactly as in the Connector Audit Log (Response Task, Response Entity, etc).

  1. No, one flow is enough. But don’t forget to add the Connector Action in the Pre-Action section of the 2nd step (“Get Response”). In this way, the connector action will be called before the message is displayed in the chat, so you can have the [[Weather]].Response value already mapped and ready to be displayed.
  2. No, the DRUID connector can be configured so that to map the API response accordingly.

Hi Christina
I signed up for trial license of druid to start with but where as I do not see any option to add flows or entities. Could you please help. We are kind of blocked on the first step itself.

Thanks,
Ramesh

Thanks cristina.antonescu for detailed explaination.

As you mentioned, I am calling connector in Pre-Action of 2nd Flow.

Also, I have tested the response as you mentioned and I am getting the Response from API.


Can you figure out what could be the issue as API is working fine and getting the response but not passing the response to the conversation flow?

Hello @ramesh_dignotiosoft,

if you are logged in as a user with administrator rights, please make sure you have selected the bot and the solution as in the picture below

This information is also available in the documentation that can be accessed from the Help menu.

Thanks Cristina,
Created a GreetingFlow but when tried to test got below message.

image

Can you tell me please, which tenant is this happening ?

Hi Christina,
It’s ram439 client.

We are blocked so we tried to import ready packages from druid portal and run but when
we tried importing Druid starter zip and UiPath starter zip, the web UI seems to be problem. A pop up comes success but the UI gets hanged. Does druid work with chrome browser.

We developed chatbots with AWS Lex and SAP Conversational AI platforms before but Druid has some cool features compared to them but developer UI is not user friendly seems lot of issues. Do you have any suggestion for us?

Hello @ramesh_dignotiosoft,

I made the changes below on the bot configured by you and imported the Druid Starter solution.

  • Default language should be “English (United States)”
  • Need to set up Roles in the Security tab
  • Should have cheked “First step” and “Last step” on the step of the flow

Please check and let me know if you still need help.

Hello @Priyanka_Bhalere,
sorry for the late reply.
In order to capture values from the Weather entity, you must add the fields with the information you are interested in extracting, in the Weather entity. So, you should follow the steps below.

The following entities are required:
[[ WeatherInfo ]] - with following fields: id, main, description, icon (or only the required fields)

[[ Weather ]] - with following fields:

  • Lon
  • Lat
  • WeatherInfo - EntityList, refers entity [[WeatherInfo]]

For coordinate capture, the mapping will done this way:
coord.lon => [[Weather]].Lon
coord.lat => [[Weather]].Lat

Mapping in the section " ResponseMainEntity " should be like:
Connector field name = weather (as in the answer in JSON)
Druid Entity Field Name = [[Weather]].WeatherInfo
Druid Child Mapping Code = be filled with “WeatherInfo”

Press the button " AddNewChildMapping " and enter the newly createad section at the top, to rename the section in “WeatherInfo”. Will be completed the field ResponseDruidEntityName with the value [[WeatherInfo]]

Mapping in section “WeatherInfo”:
Connector field name = id
Druid Entity Field Name = [[WeatherInfo]].Id
Connector field name = main
Druid Entity Field Name = [[WeatherInfo]].main
Connector field name = description
Druid Entity Field Name = [[WeatherInfo]].description

The final result will be in [[Weather]].WeatherInfo[0].main == assuming you only have one record in the collection

Below I send you an example of an answer from the API, wich will guide you in the configurations you have to do

{
“odata.metadata”: “odata.metadata”,
“value”: [
{
“odata.type”: “SP.Data.Workflow_x0020_TasksListItem”,
“odata.id”: “808817de-9f2a-44a6-bf75-4358cb58a5c2”,
“odata.etag”: "“1"”,
“odata.editLink”: “Web/Lists(guid’d20fc45f-aaec-4b7e-a64b-9284daec52ca’)/Items(100197)”,
“AssignedTo@odata.navigationLinkUrl”: “Web/Lists(guid’d20fc45f-aaec-4b7e-a64b-9284daec52ca’)/Items(100197)/AssignedTo”,
“AssignedTo”: {
“odata.type”: “SP.Data.UserInfoItem”,
“odata.id”: “c549b320-9f7a-4457-a863-0664e5973df6”,
“Title”: “Title”
},
“Id”: 100197,
“Title”: “desk”,
“Status”: “Not Started”,
“WorkflowLink”: {
“Description”: “Description”,
“Url”: “http://url/Lists/ExpenseRequest/DispForm.aspx?ID=1
},
“WorkflowOutcome”: “Pending”,
“WorkflowName”: “Expense Request Approval”,
“WorkflowListId”: “ca77c5b2-265c-4b44-b592-dcdb215124ed”,
“WorkflowItemId”: 23221,
“MultiOutcomeTaskInfo”: “MultiOutcomeTaskInfo”,
“GUID”: “77db48e4-1d26-4ddc-b9c5-7a7a699c2c64”,
“WorkflowInstanceID”: “a7697636-2879-4690-98ef-439ff893978f”,
“ID”: 100197,
“Created”: “2020-11-06T10:46:55Z”
},
{
“odata.type”: “SP.Data.Workflow_x0020_TasksListItem”,
“odata.id”: “24daa2c9-1aad-4966-b07e-a8495853b33b”,
“odata.etag”: "“1"”,
“odata.editLink”: “Web/Lists(guid’d20fc45f-aaec-4b7e-a64b-9284daec52ca’)/Items(99987)”,
“AssignedTo@odata.navigationLinkUrl”: “Web/Lists(guid’d20fc45f-aaec-4b7e-a64b-9284daec52ca’)/Items(99987)/AssignedTo”,
“AssignedTo”: {
“odata.type”: “SP.Data.UserInfoItem”,
“odata.id”: “d6231e21-969f-4c13-a530-faf2bf2f3790”,
“Title”: “Title”
},
“Id”: 99987,
“Title”: “work mobile phone”,
“Status”: “Not Started”,
“WorkflowLink”: {
“Description”: “work mobile phone”,
“Url”: “http://url/Lists/ExpenseRequest/DispForm.aspx?ID=2
},
“WorkflowOutcome”: “Pending”,
“WorkflowName”: “Expense Request Approval”,
“WorkflowListId”: “ca77c5b2-265c-4b44-b592-dcdb215124ed”,
“WorkflowItemId”: 23218,
“MultiOutcomeTaskInfo”: “MultiOutcomeTaskInfo”,
“GUID”: “35b8393c-ff0c-434e-bc3d-d1cf49805925”,
“WorkflowInstanceID”: “53bfed4e-4a7d-4a88-9b01-2185054472d5”,
“ID”: 99987,
“Created”: “2020-11-05T08:27:11Z”
}
]
}

Which maps acording to the images below
image
image

Hello Cristina
How do I callback Druid from UiPath-RPA, inorder to pass a response of value retrieved from Ochestrator Queue?
Thanks in advance

Hello @preeharris,

Please access Druid ChatBot Platform documentation, UiPath connector chapter.
In this section you will find all the information needed.
image

Thank you Cristina…

You’re welcomed have a nice day!

Hey @cristina.antonescu ,
How can one use WhatsApp channel for demo?
I found this link interesting, https://www.druidai.com/wiki/documentation/best-practices/whatsapp-channel/
However, it doesn’t work for me. Do you know if the demo account has WhatsApp/Teams enabled automatically?

Hello @SUBHAM_KUMAR,

Integration with WhatsApp is done through Vonage (ex NEXMO).
So, you need an account there, then you will have to fill in the credentials received, in chatbot, in the section of WhatsApp, from Channels tab – see picture below
image

1 Like