Jump to content

Power Virtual Agent - Failed to log request: EspMethodCall::setParam: invalid value specified for "catalogName"


Recommended Posts

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 &quot;catalogName&quot;</error>
    </params>
    <flowCodeDebugState>
        <executionId>07137cc7-09f5-4af7-9dc1-1f46b467f675</executionId>
    </flowCodeDebugState>
</methodCallResult>

Please advise how I can resolve.

Link to comment
Share on other sites

@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?

Link to comment
Share on other sites

@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?

Link to comment
Share on other sites

@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 &quot;bpmName&quot;</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>
Link to comment
Share on other sites

  • 11 months later...

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.

image.png

 

Please note that he Catalog Item needs the BP and IC configured.

Link to comment
Share on other sites

@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?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...