Encode the environment in a variable (ie production vs staging)

We would like to create a javascript or SKUID variable that will detect what environment the age is in. The use case is that we have a SKUID portal with embedded tableau iframes, and whenever we refresh the sandbox in order to do some testing, we need to go in and modify all the iframes so they point to the Tableau staging server.

ideally, this variable would detect that it is in a salesforce sandbox and take the value of the Tableau Staging url, ad similarly with production. We would then embed this variable in the iframe so that when it executes it draws from Tableau Staging instead of Prod.

The Global Merge Variable:


is probably what you're after.


You can use it in a formula field:


or in a snippet: