Rob Gething Posted January 13, 2022 Posted January 13, 2022 I have setup a PVA according to Teams Power Virtual Agent - Hornbill, but when I trigger the "I need help" topic, it fails with: <?xml version="1.0" encoding="utf-8" ?> <methodCallResult status="ok"> <params> <outcome>failure</outcome> <error>Failed to log request: EspMethodCall::setParam: invalid value specified for "catalogName"</error> </params> <flowCodeDebugState> <executionId>07137cc7-09f5-4af7-9dc1-1f46b467f675</executionId> </flowCodeDebugState> </methodCallResult> Please advise how I can resolve.
Steve Giller Posted January 17, 2022 Posted January 17, 2022 @Rob Gething From the error the first thing I'd check is that a valid value for catalogName is being presented.
Rob Gething Posted January 17, 2022 Author Posted January 17, 2022 @Steve Giller { "methodCall": { "@service": "apps/com.hornbill.servicemanager", "@method": "chatbotLogRequest", "params": { "userId": "robert.gething@6m0jtc.onmicrosoft.com", "requestType": "Incident", "summary": "Software", "description": "Test", "serviceId": 5, "catalogId": 77 } } } The BuildPVAPackage PS script says please provide the following: The ID of your Hornbill instance: The API key for your Teams PVA account on your Hornbill instance: Topic - I Need Help: Service ID [integer], 0 to log against no Service: Catalog Item ID [integer], 0 to log against no Catalog Item: It makes no mention of catalogName so how do I set this?
Victor Posted January 17, 2022 Posted January 17, 2022 @Rob Gething you don't set the catalog name for chatbotLogRequest API. This is retrieved by the API during runtime. chatbotLogRequest uses a series of subsequent APIs this the error presented does not necessarily mean that there is an problem with an input params for chatbotLogRequest but possibly for one of the APIs it is using. In this case is "logIncident", given that request type for chatbotLogRequest is "Incident". This API uses this param (catalog name) when invoked by chatbotLogRequest and if this param is missing when logIncident is invoked you would receive the error. Within chatbotLogRequest, the catalog name value is established based on catalog ID. Can you confirm the catalog ID you used is a valid value?
Rob Gething Posted January 18, 2022 Author Posted January 18, 2022 @Victor, When I change the ServiceID to 1 and CatagoryID to 1, which are valid IDs: { "methodCall": { "@service": "apps/com.hornbill.servicemanager", "@method": "chatbotLogRequest", "params": { "userId": "robert.gething@6m0jtc.onmicrosoft.com", "requestType": "Incident", "summary": "Software", "description": "Test.", "serviceId": 1, "catalogId": 1 } } } I get: <?xml version="1.0" encoding="utf-8" ?> <methodCallResult status="ok"> <params> <outcome>failure</outcome> <error>Failed to log request: EspMethodCall::setParam: invalid value specified for "bpmName"</error> </params> <flowCodeDebugState> <executionId>de85ba5b-6c7b-4983-a440-9e73f7ddff4e</executionId> </flowCodeDebugState> </methodCallResult> If I set the ServiceID to 0 and CatagoryID to 0, I get: <?xml version="1.0" encoding="utf-8" ?> <methodCallResult status="ok"> <params> <outcome>success</outcome> <requestRef>IN00001306</requestRef> </params> <flowCodeDebugState> <executionId>9a0fcd8d-912f-4c16-ae13-d56c2174f184</executionId> </flowCodeDebugState> </methodCallResult>
Victor Posted January 18, 2022 Posted January 18, 2022 @Rob Gething the below shows a request is created (IN00001306) but it fails to trigger an associated workflow. I would check the catalog item with ID 1 if it has a BP configured and if that is a valid BP. The above also shows that catalog 77 (first post) is not a valid catalog ID.
SamS Posted January 17, 2023 Posted January 17, 2023 Just to be clear, the correct Service ID can be obtained from the URL bar and the Catalog Item ID can be grabbed by hovering over the Catalog Item in question. Please note that he Catalog Item needs the BP and IC configured.
SamS Posted January 17, 2023 Posted January 17, 2023 @Rob Gething Having had a look in the code, it appears that a CatalogItem ID of 77 and a Service ID of 5 are the defaults in the script which should have been replaced by the PowerShell script - with the IDs given under the "I Need Help"-topic. Could you please confirm you imported/uploaded the RESULTING HornbillPVA_v1_2_0_0.zip file (assuming you are using the latest script (as of this writing)) and NOT the template HornbillPVASolution.zip file?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now