Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Dialogflow CX - manage data stores between environments

Hi Team,

I have an dialogflow cx agent configured with data stores. What is the best way to manage data stores between environments. For example, with webhooks, we can have unique endpoints between environments. Similar to this, i would like to know how we need to manage data stores for different environments of an agent.

0 7 384
7 REPLIES 7

Hey

so first thing you cannot have same datastore in different environment you need to create for every environment and once you create the datastore In the environment you can attach the datastore with new agent

and also more important you cannot directly export an agent with data store to different environment agent and restore it 

 

 

My recommendation is going to be to have different data stores per environment so whenever you promote your Dialogflow agent to a production environment, you do the same with the data stores

If I understand correct, 

1)lets say in gcp resource (A) i have a cx agent(test-dev) which is attached to a data store(ds-dev). Similarly in gcp resource (B) i have other cx agent(test-stg) which is attached to a data store(ds-stg). So when a agent is using data store, we can’t perform export and restore in other agent. Am i right?

2) In gcp resource(A), i have a single cx agent(Nova) which has three environments in it(dev, stage, prod). Similarly, i have 3 data stores one for each environments(ds-dev, ds-stage, ds-prod). Agent’s dev environment should point to ds-dev, stage environment should point to ds-stage, prod environment should point to ds-prod. So this way we can manage agent environments with data stores. Am i right?

that is correct, option B is the way to go so you just need one agent with multiple environments and different data stores

1. Yes in different environment you cannot directly export and restore it but yeah in same environment you can do.

2. Yes you are correct 

Thanks. Currently we are migrating our ES agents to CX. For each es agents, we have different resources. Like, in gcp resource(A), we have nova-dev agent. This es dev agent is connected to cloud logging, big query and firebase which exist in the same gcp resource(A). Similarly, in gcp resource(B), we have nova-stage agent. This es stage agent is connected to to cloud logging, big query and firebase which exist in the same gcp resource(B). While migration for es, we export es dev agent zip file and import in es stage agent. This worked out well. However, We cant have this similar setup for cx because of this data store requirement we have. If i have nova-dev cx agent in resource (A), I can’t export the zip file and restore in nova-stage cx agent in resource (B).

So based on your suggestion, i believe its best to have single cx nova agent in resource (A) and have different environments for that agent. In the same gcp resource (A), we need to create separate data stores for dev, stage, prod. Connect these data stores with nova agent and map data stores based on agent environments (nova agent dev environment > data store dev, nova agent stage environment > data store stage, nova agent prod environment > data store prod).

Need your advice on this?

exactly, you are correct, thanks to the environment concept on CX, this is the path you should follow.

It will be easier to manage than ES.

Best,

Xavi