4

I have started to use versions and environments for release management such that we have separate development, test, and production environments. I would like to have a parallel setup on the webhook side such that the development Dialogflow CX environment points to the development webhook, etc. However I have been unable to figure out how to specify different webhook URLs, authentication, etc. for the different Dialogflow CX environments.

There is no mention of this in the documentation or API. Anyone have any experience with this?

  • My guess is that an environment doesn't contain the URLs for webhooks but rather, those are part of the agent "defintion". An environment is merely a "container" where the agent definitions can be deployed for execution. I see "A flow version is an immutable snapshot of your flow data and associated agent data like intents, entities, webhooks, pages, route groups, etc." .... which seems to state that a webhook is a contained in the flow and not related to the environment. – Kolban Oct 14 '21 at 16:21
  • Thanks @Kolban. I fear that is the correct interpretation. I just hope it isn't true, because that would make it unmanageable to have parallel webhook environments, which seems like a huge oversight and mistake on the part of the designers. – Thorsten Nordholm Søbirk Oct 14 '21 at 16:57
  • That is the case - webhooks are defined at the Agent level. While there is a limit of 100 webhooks defined per Agent, it would require that you defined dev/test/prod webhooks and then changed the dev version of the agent to point to the dev webook. Can you describe a bit more about how you'd see a per environment webhook config working? Currently, Environments and Versions are defined as operating on Flows vs the Agent. – ghchinoy Oct 15 '21 at 23:20
  • @ghchinoy I would imagine something like: Once other environments have been defined, these would appear under each defined webhook with a section to enter the URL and authentication information for each environment perhaps with an option to "use settings from default environment" so this wouldn't break any existing agents. Or turn it around so that all webhooks appear under each defined environment with an option to override the default environment's URL and authentication settings, similar to how it works in Dialogflow ES. – Thorsten Nordholm Søbirk Oct 18 '21 at 14:26
  • You can set up different environments to use different webhook configurations. This way, you are able to properly have a separate development, test, and production environments. My suggestion is to create different cloud functions. Then, create a webhook, and attach it to the cloud function. Then, deploy the webhook into a version, and that version into an environment. – Jose Gutierrez Paliza Oct 19 '21 at 18:27
  • @JoseGutierrezPaliza the problem with the current functionality is that each time I want to deploy a new version to production I have to change the webhook URL and credentials to production settings in draft, create a new version, assign to production environment, and then change the webhook URL and credentials back to the development settings in draft. Or am I missing something? – Thorsten Nordholm Søbirk Oct 22 '21 at 08:55
  • 1
    @ThorstenNordholmSøbirk As of 05/2023, there are now environment specific webhooks! https://cloud.google.com/dialogflow/cx/docs/concept/webhook#environment-specific ref release notes https://cloud.google.com/dialogflow/docs/release-notes#May_23_2022 – ghchinoy Jul 20 '22 at 14:18

0 Answers0