0

I have been working on a POC and I am able to invoke Dialogflow fulfilment webhook from external API and get the response but not able to get the knowledge base response when Beta feature options are disabled. When I enable Beta features, I am getting knowledge base response but not getting webhook response. Not able to make both Knowledgebase and webhook work together with beta features option.

Is it possible with Dialogflow CX ? Knowledge works but not Webhook with following:

const knflow = require('@google-cloud/dialogflow').v2beta1;
      const ksclient = new knflow.SessionsClient({
        keyFilename: "C:/Temp/XXXXXX.json"
      });
 const sessionPath = ksclient.projectAgentSessionPath(
        projectId,
        sessionId
      );
var responses = await ksclient.detectIntent(request);

Webhook works but not knowledgebase with the following:
const sessionPath = sessionClient.sessionPath(projectid,sessionid);

        var chatMessage = chatRequest.messageDetails.message;
var responses = await sessionClient.detectIntent(request);
Kiran
  • 1
  • 1
  • Can you add any details like what do you mean by 'Not able to make both Knowledge Base and webhook work together with beta features option.'? What is your current implementation and what are you trying to accomplish? [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask), [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) Show the community what you have tried. As for Dialogflow CX, currently Knowledge Connectors is not yet supported in the platform. – Jessica Rodriguez Oct 30 '20 at 19:33
  • I need to handoff to human agent if dialogflow not able to answer customer. Dialogflow has a combination of knowledge base and webhook implementation. – Kiran Nov 02 '20 at 19:28

1 Answers1

0

In Dialogflow ES, Knowledge Connector is in Beta version. You will only be able to use Knowledge Connectors on your agent if you've enabled the 'Beta features and APIs' option in your agent settings.

If you use nodeJS client library, consider to check the DetectIntent Response, response from Webhook can be found on fulfillmentText or fulfillmentMessages fields under queryResult. While responses from Knowledge Connectors can be found under alternativeQueryResults.

You may also consider to upgrade ‘@google-cloud/dialogflow’ library version to "^3.3.0" in your package.json.

For agent to Human hand-off, you can take a look at this sample github implementation: https://github.com/dialogflow/agent-human-handoff-nodejs.

yasar
  • 1
  • 1