Home / ES to CX migration / Migrating your Dialogflow ES conversation flow to CX
ES to CX migration

Migrating your Dialogflow ES conversation flow to CX

Check out my courses Learn Dialogflow ES and Learn Dialogflow CX if you would like to learn Dialogflow in depth. 

If you would like to migrate your Dialogflow ES conversation flow to Dialogflow CX, you can follow this systematic process and use it like a “recipe”.

This is the second part in my series on migrating your Dialogflow ES bot to Dialogflow CX.

Please note: there isn’t really an exact, one-to-one mapping between ES and CX. Besides, CX is somewhat harder to use and more expensive, so clearly they are not competing products even in the eyes of its creators.

So this represents a sort of “best effort” approach to migrating your ES bot to CX. There are certainly going to be some corner cases where you cannot do an exact migration and might have to tweak your CX bot a little to get the same results.

This process will only use a single Flow in the CX agent. I recommend keeping your CX bot as simple as possible.

The four types of ES intents

In Dialogflow ES, an intent can have input and output contexts.

Let us use the following naming convention

Has Input ContextHas Output ContextIntent Type
YesYesi+o+
YesNoi+o-
NoYesi-o+
NoNoi-o-

Migrating the conversation flow

Here are the steps:

Create a new page corresponding to all contexts

For each context in the original ES agent, create a new Page in the Dialogflow CX agent. For a given ES intent, its iPage will be the page corresponding to its input context, and its oPage will be the page corresponding to its output context.

The iPage for an intent which has no input context will be the Start page.

Add all i-o- and i-o+ intents to the Start Page

When you create a new Dialogflow CX agent, the Start page is already added into the Default Flow. In fact, it cannot be deleted from the Default flow.

Add all the intents you marked as i-o- and i-o+ into the Start page.

Add all i+o- and i+o+ intents to the corresponding iPage

Add all intents into the corresponding iPage, that is the page which has the same name as the intent’s input context.

Add transition routes

Note: all these are transition routes have intent requirements.

You only need to add transition routes where the ES intent had an output context, which means it also has a corresponding oPage.

So what happens in the CX bot if the ES intent does not have an output context? It simply means that the transition route is an intent requirement where the transition happens to the same page, meaning no state change. This seemingly very simply concept (no state change) actually has some very useful implications when it comes to managing your bot conversation.

Add a transition route to the intent’s iPage. Use the current intent as an intent requirement, and when the intent requirement is met, transition to the intent’s oPage.

An example

Let us consider the example of the ES vs CX decision tree bot I created a while back.

Here is the Mindomo flowchart for the Dialogflow ES bot.

Let us classify the intents in the ES agent first.

Intent NameIntent TypeiPageoPage
1 Welcome Intenti-o+StartawaitVoiceBot
2 voicebot.yesi+o-awaitVoiceBot
3 voicebot.noi+o+awaitVoiceBotawaitPureFAQBot
4 purefaqbot.yesi+o-awaitPureFAQBot
5 purefaqbot.noi+o+awaitPureFAQBotawaitSlotFilling
6 slotfilling.yesi+o-awaitSlotFilling
7 slotfilling.noi+o+awaitSlotFillingawaitFollowup
8 followup.yesi+o-awaitFollowup
9 followup.noi+o-awaitFollowup

Here is what the corresponding flow diagram looks like for Dialogflow CX

The first thing that you notice is that the output contexts have been turned into pages inside the CX bot (although with slightly different names).

Let us see the Start page:

It has just the Default Welcome Intent.

Let us look at intent requirements in the awaitVoiceBot page

When you click into the userSaysNo intent requirement, notice that it transitions to the next page. In this case, it is the intent’s oPage, which is awaitPureFAQBot. On the other hand, notice that userSaysYes intent requirement does not have any transitions and doesn’t perform any change of state.

userSaysNo intent requirement
userSaysYes intent requirement

You can keep repeating this process for all the Pages in the CX bot. Watch the full video series to see this entire example worked out.

Why Dialogflow CX?

After seeing this example, you might wonder why you need Dialogflow CX (which is more expensive) when you can do everything in ES itself?

That would be the wrong conclusion. 🙂

For example, you can see that you can reuse intent routes in CX. You also can transition back to the same page and not get into a bad state. CX also automatically maintains session level information you collect from the user. This required you to specifically use session variables in ES. You have more fine grained fallback handling in CX. You can implement things like conditional logic inside the conversation layer itself.

In other words, as you bot becomes more complex and handles more follow up questions, you will find that Dialogflow CX can provide a big boost to your bot development efforts.


The BotFlo app gives you many tools which can speed up your Dialogflow bot development

This website contains affiliate links. See the disclosure page for more details. 
"The magic key I needed as a non-programmer"

The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn.

- Kathleen R
Cofounder, gathrHealth
Check out my YouTube courses

Dialogflow CX Beginner Tutorial

Dialogflow ES vs CX using a Decision Tree Bot

Intro to NLU for technical non-programmers

Better Dialogflow ES Bots Using the CTFS Framework

Search the autogenerated transcripts of all my YouTube videos
In this free course, I provide some tips for managing large Dialogflow ES bots without compromising on accuracy.

Similar Posts

One Comment