- In the CloudCode task, you can access
this.env
to detect the current environment. - On the app, this is possible using the
journey
API
More detailed discussion here: How do I programmatically check which environment the app is in?
- It’s not possible to programmatically access an app’s name, but please submit new ideas on our public roadmap.
Since the app name doesn’t vary across environments though, one option could be to define the app name as a global const in your app code?