App info variable: connector environment (Production | Test | Development)

Hello,

It would be great to have an App info variable to get and use the connector environment in triggers. This would make it possible to have certain logic only when we run the app in a test environment for example.

Hey @LouisVanhalst - Welcome to Community

Got a feature request written for this, but a few clarifying questions -

Environment name is impacted by which environments have been setup (see table below), If only 2 environments have been setup, then the environments are “Test and Development” and “Production”. If I took this connector and added a third environment, now “Test and Development” would be split into “Test” and “Development”, breaking your app logic. This feels far from optimal.

Environment is derived by the lifecycle phase of the application (development, pending approval, published version), and this is available on the app info.app version property. This allows you to check what connector version will be used, regardless of how many environments have been used in the application.

Development → will always be called “Development Version”

Pending Approval (Testing) → will always contain the word “pending”

Production → will always contain “Version” and not contain “pending”

Does this make sense? Does this address your needs?
Pete

Hello @Pete_Hartnett,

Thank you for the quick anwser! Just tried this and it seems to be working when I launch the development version in developer mode and the production version in the player. However, am I correct that this solution does not work when running the production environment in developer mode? It seems like the app version in the developer mode will always be seen as “Development” even in the case when we are running a production environment connector.

@Pete_Hartnett One of my customers might need this too but even if this works for now, I’m a bit reluctant to implement it unless I have a rock-solid guarantee that it will work in the long term.

Is it possible to officially document expected values in the App Version value?

Hey @fti

Thanks for the ping on this, not sure how I missed your reply the last time around.

However, am I correct that this solution does not work when running the production environment in developer mode?

This is a good catch, that does appear to be a case that we cannot support with dev mode with this approach.

If there are concerns with dev mode impacting production, this can be locked down from account settings:

Can you explain a little more the need here? Are they driving app logic based on this property?

This table below is something that we have confirmed is accurate in every cell:

Pete