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

Deploying a Dialogflow CX agent with two different environments

I have a Dialogflow CX agent that I want to use on two different websites together with the Dialogflow messenger. However, for each website, I want to use a different environment of the agent. For the first website, I want to use a ‘Production’ environment. For the second website, I want to use a ‘Draft’ environment.

I have found that I can choose an environment when I'm enabling the unauthenticated API, but since I want to use two different environments this makes me to choose one or the other.

Is it possible to have the same agent connected to different environments at the same time? Is there a environment parameter that I can add to my df-messenger element?

3 9 868
9 REPLIES 9

Hi!

to do that you have to go the environments section under the manage tab and click on publish

Hello, I can’t find the ‘Publish’ option for the respective environment under the ‘Manage’ tab. Am I in the wrong place? I want two separate widgets that is connected to the same agent, but different environments.

EricaP_0-1718284508597.png

 

it is here:

xavidop_0-1718284886649.png

 

Sorry, I don't understand. Do you mean the "Publish" that is to the left of "Agent settings"?

yes

But there I can only choose one environment at a time, I want to use both the ‘production’ and ‘draft’ environments of the same agent simultaneously on different Dialogflow messenger pages. Some people need to use the agent in its current state in Dialogflow messenger. Meanwhile, I want to test changes on a separate page using the ‘draft’ environment, while the ‘production’ environment is active.

you are right, for unauthenticated, there is only one env at a time

Hi @xavidop ,

That's correct, but what if someone wants to have a different webhook URLs for different environments? When I am changing the url of draft environment it's overidding the existing environments wehbook uels too.

Any alternatives? That would be helpful for me as well