Tips for automating the ES to CX migration process

If you read the article on migrating an existing Dialogflow ES agent to CX, you will notice that it follows a step by step method.

In practice, this means you can automate those steps using the REST API provided by ES and CX.

Note: in my opinion, it is not possible to automate the entire migration process. But you can considerably speed up the process by using the REST API.

Here are some tips if you wish to programmatically do this migration.

Use Actions in your ES bot

Obviously webhook code cannot be automatically migrated because it has custom logic. However, if you use actions in Dialogflow ES, you can use Tags in CX and this means you will need fewer changes to the webhook code.

Slot filling is tricky

If you have an ES bot which uses slot filling, migrating the slot filling to CX will be quite tricky. However, CX has much more robust support for slot filling than ES.

Large context lifespans can be tricky

Another issue is if you have large context lifespans. These make the state of your ES bot quite hard to predict. Since CX uses a state machine as the underlying primitive, a bot with minimal context lifespan values will be much easier to migrate to ES automatically.

Good ES naming conventions help

If you use good naming conventions in your ES bot, you can reuse those names in CX and find that it makes the automated migration process much smoother.

Use a test script

Probably one of the best ways to verify if your migration worked properly is to generate a test script for your ES bot and then use the same script inside CX to see if everything works as expected.