Search code examples
dialogflow-cx

Is there any way to use or integrate external NLU engines in DialogFlow CX?


Well the question is that, is there any way to use a external NLU engine to follow a conversational flow built on DialogFlow CX?

I know currently DialogFlow CX has evenhandlers that could trigger some flows, so I want to know if I can integrate another NLU engine sending its intents through evenhandlers so that the flow in DialogFlow is executed receiving the intents from the external NLU engine at each page or state of the conversation.


Solution

  • There are two ways you could do this, but none is just a click away.

    1. After CX: Fulfillment Webhook – TO all the pages you want to do intent detection for add a webhook that includes the user message to call the external NLU. Webhook should return a parameter value that you will then use to route, in effect this will do the NLU outside but the routing within Dialogflow CX.

    2. Before CX: Double Client –  Similar idea, using parameters to let CX do the routing, but in this case, you have your CX Client call the external NLU and pass in a parameter with the resulting intent match (and other slots if applicable) when you call detectIntent for the first time.

    In either case, you'd need to include the parameter-based routing in all pages that need that routing. I'd recommend in that case to look into Route Groups