Learn about Environment Variables

What is the Purpose of Environment Variables?

An environment variable is a value that users can define to affect how processes behave on a computer. These variables are part of the environment in which a process runs.

Environment variables can be used as follows:

  • These variables can hold a record type ID which can change between Salesforce environments.
  • It can hold a link to an external user acceptance testing website that then needs to be changed to the product link when migrating.
  • The environment variable can hold a reference to a Titan Flow project that is triggered once a Sign document is signed and needs to reference a different Flow project when moving to another environment.
  • This variable can be some static value that is used multiple times across different projects, and you want one main area where can manage it.

How are Environment Variables used in Titan?

The environment variables are shared across your Titan environment and can be accessed from any Titan project. They can be exported to another Titan environment and can be changed without modifying the project.

You can use environment variables instead of hardcoded record IDs.

Why are Environment Variables used?

Environment variables are used for the following:

  • Centralized Configuration: With environment variables, configurations are managed centrally, making it easier to maintain and ensure consistency across projects.
  • Flexibility: Implementers and managers can easily switch between environments or service tiers without diving deep into each project’s individual settings.
  • Efficiency: It reduces the manual effort involved in updates and reduces the risk of errors from manual configurations.
  • Data Consistency: By referencing another Titan project, values remain consistent and up-to-date, minimizing the potential for discrepancies.
  • Multi-Environment Support: Applications often need to operate in multiple environments, such as development, testing, staging, and production. Environment variables help manage configuration differences among these environments. By changing environment variables, you can control which services and resources an application connects to, ensuring the correct environment-specific settings are used.

How to Video

  • 00:00 An introduction to environment variables in Titan.
  • 1:16 See how to add a static environment variable.
  • 4:33 Watch how to export an environment variable.

How do you add Environment Variables?

Path:

Titan Dashboard > Settings > Environment Variables

  • You can add a static or project variable.
  • Variables can be either public or private. Private variables can only be used for Salesforce Push and Get integrations and run on Titan servers. Public variables can be accessed from anywhere in the project.
  • You can export or delete a variable.
Note:

You can use ftGetEnvParamValue()  when configuring a custom head or using custom JavaScript.

Add a static variable

A static variable holds a string of text.

  1. Click the Add Variable option. A line is added to the screen.
  2. Type the name of the variable in the field (1). Static (2)  is the default option.
  3. Type the variable value (3) in the field.
  4. Click the checkbox if the variable is Public (4).
  5. Click the Save button.
Environment Variables
Environment Variables
  1. Click the Yes button if you are sure that you want to save the variable.
Confirmation message
Confirmation message

See the example of a static variable:

Example
Example

Learn how to use environment variables to do Salesforce Integration in Titan Web.

Learn how to use environment variables to do Salesforce Integration in Titan Sign.

Add a project variable

A project variable references a certain published Titan project.

  1. Click the Add Variable option. A line is added to the screen.
  2. Type the name of the variable in the field (1).
  3. Use the drop-down list to select the Project (2) option.
  4. Click the Choose Project (3) button.
Environment Variables
  1. Use the Search field to search for a project.
Select an object screen
Select an object screen
  1. Alternatively, click on a Titan product in the list on the left to view only the projects associated with that product, for instance, Forms. You can use the Search option to search for a specific product.
Select an object screen
Select an object screen
  1. Click the checkbox if the variable is Public (4).
  2. Click the Save button.
  3. Click the Yes button if you are sure that you want to save the variable.
Confirmation message
Confirmation message

See the examples of project environment variables:

Learn how to use environment variables to redirect to another Titan Web project.

Learn how to use environment variables to trigger a sign action from Titan Web.

Learn how to use environment variables to trigger a Titan Flow project from Titan Web.

Learn how to use environment variables to redirect a Titan Sign project to a URL.

Learn how to use environment variables to trigger a Titan Flow project from Titan Sign.

Export a variable

  1. Use the checkbox to select a variable, or click the Kebab icon of the variable you want to export.
  2. Select the Export option. The Export Projects screen opens.
Export variables
Export variables

This is the default option.

  1. Use the drop-down list to select the related account. This is an account where you are a power user.
  2. Click the Export button.
Export variables screen - static variable
Export variables screen – static variable

Static variables are exported to the new account with the exact same value.

For project variables, you can configure the new value in the target account.

Export variables screen - project variable
Export variables screen – project variable

You will see the confirmation message when the variable is exported successfully.

Confirmation message
Confirmation message

Export using a PIN

Note:

Prerequisite:

Copy the code: Titan > Settings > Account Settings > Generate PIN > Copy Code

This image has an empty alt attribute; its file name is image-9-1024x602.png

  1. Select the PIN radio button. This action will export the selected variable to a new Titan environment. To find the PIN, access the account for the environment where you would like to move your selected variable to.
Export variables screen
Export variables screen
  1. Paste the PIN in the field.
  2. Click the Export button.

Delete a variable

  1. Click the Kebab icon and select the Delete option.
Delete variable
Delete variable
  1. Click the Yes button if you are sure that you want to delete the variable.
Confirmation message
Confirmation message

Learn more about custom variables.

Hidden Title

Need more help?