Can you distinguish Sandbox vs Production in a flow?

I have a Javascript transformation I’m working on in sandbox working with Jira Assets. Some Asset IDs are different between my Jira Sandbox and Jira Production. I’m trying to see if there is a way to distinguish which Celigo environment I’m in so I can pass through the correct values if it’s running in sandbox or prod. Right now I’m doing this via an environment variable that is set manually, but wanted to see if there was a way to tell automatically via some type of helper function.

See below for what I’m trying to accomplish:

function transform(options) {
const record = options.record;
const environment = 'sandbox';
const prodWorkspaceId = "0a12b3c4-56d7-8901-e2fg-3hijklm4n56p";
const sbxWorkspaceId = "9z87yx6w-vu5t-4321-09s8-76r54qp3210n";
const workspaceId = environment === 'sandbox' ? sbxWorkspaceId : prodWorkspaceId;

const customfield_10117 =[ ];

if (record.Has_Boolean__c) {
const objectId = environment === 'sandbox' ? "4451593" : "4604317";
customfield_10117.push({
"workspaceId": workspaceId,
"id": ${workspaceId}:${objectId},
"objectId": objectId
});
}

record.customfield_10117 = customfield_10117;

}

You can store that kind of environment-specifc data in an integration setting, and set it to the correct value in each tile. That way you don’t need to update it every time you update your scripts from sandbox to prod.

In the script the settings can be accessed through the options object, for example options.settings.integration.myObjectId

https://docs.celigo.com/hc/en-us/articles/360045461272-Create-custom-settings-access-them-in-integrator-io-forms#create-custom-settings-access-them-in-integrator-io-forms-0