UiPath / AmazonConnect

Fulfill Amazon Connect contact flows with unattended UiPath automation
Other
4 stars 11 forks source link

Getting error while obtaining release key #14

Open lsatapathy opened 3 years ago

lsatapathy commented 3 years ago

Hi,

I am trying to get the Release Key by the creating a new test event based on the "connect-contact-flow-event" event template (with my folderID and process name) provided in the last part of the article.

But I am getting an error stating "HTTP call to 'https://cloud.uipath.com//ctsqrgyvsd/UiPathLearningTenant/odata/Releases?$filter=Name%20eq%20'BillLookup')' failed with statusCode 400".

Below is my Input: { "Name": "ContactFlowEvent", "Details": { "ContactData": { "ContactId": "NONE" }, "Parameters": { "folderId": "1410065", "processName": "BillLookup" } } }

Note: I have provided correct folderId and processName FolderName

Could you please let me know how to resolve this issue.

Error: Error Message

justmarks commented 3 years ago

@parasgera can you investigate why this is failing?

@lsatapathy, If you call that URL in the error message directly, you should be able to get the result as an interim solution

parasgera commented 3 years ago

@lsatapathy I see you are using a modern folder and by default, the folder type is 'Classic'. Can you try by adding the parameter folderType with value modern?

Your input should look something like this:

{
    "Name": "ContactFlowEvent",
    "Details": {
        "ContactData": {
            "ContactId": "NONE"
        },
        "Parameters": {
            "folderId": "1410065",
            "folderType": "modern",
            "processName": "BillLookup"
        }
    }
}

@justmarks We should probably now default the folder type to 'Modern' as Orchestrator is deprecating classic folders. But if we do that, upgrades to new the CFT would fail for older working flows.

lsatapathy commented 3 years ago

Hi @parasgera ,

I tried adding the "folderType" parameter in my existing test json. Still I am getting the same error. image

Error: image

Could you please take a look and let me know how to resolve this.

Thanks, Lipsa

lsatapathy commented 3 years ago

@justmarks @parasgera ,

I just copied the url showing in the Error message and tried opening it in the browser. I am able to see one "Key" attribute present. For now, I will provide with the same key in my contact inbound and outbound flows.

lsatapathy commented 3 years ago

I have followed all the steps mentioned in the document. Also added the Inbound contact flows to the phone number and in the test settings. image

image

While clicking on the Test chatbot, it showing error. image

Could you please let me know how to resolve this?

justmarks commented 3 years ago

That "initialization failed" error is coming from Amazon and unfortunately I'm unfamiliar with how to solve that. I suggest contacting Amazon Connect support to figure that out. In the meantime, does it work when you call the phone number?

lsatapathy commented 3 years ago

@justmarks , Yes it's working when I am calling to the phone number.

Could you please guide how to integrate this with AWS Lex?

justmarks commented 3 years ago

Unfortunately, we don't have detailed instructions for setting up integration with LEX. The general way to think about this is that the Amazon Connect contact flow does the orchestration of the different services, AWS LEX does the NLP and intent analysis, and then UiPath can be used for fulfillment of those requests. The basic flow is:

  1. Call Get Customer Input to use LEX to ask the customer a question and get a response
  2. Use Set Contact Attribute to store the response
  3. Use Invoke Lambda with the UiPath_PackInputs lambda function to package all the inputs from 2 (you can do #1/2 repeatedly) in a format that can be used by The UiPath_StartFunction call
  4. Use Invoke Lambda with the UiPath_StartFunction, passing in the output of PackInputs

Example Contact Flow image

Configuration of the Get Customer Input image

Configuration of Set Contact Attribute image

Configuration of Pack Inputs Lambda call image

Configuration of UiPath_StartFunction Lambda call image

MimicIT commented 1 year ago

I'm having the same issue ("failed with statusCode 400"). Thought it might be because of the two // in the cloud url, so updated my Stack to remove the trailing / in the setup, but that didn't make a difference. Also tried adding the "modern" folder type.

2022-09-02 14_45_28-AmazonConnect_Stack png at master · UiPath_AmazonConnect

I can't access the url directly - says "You are not authenticated" but I am - as an admin.

Sooooo close, but completely stumped.