Skip to main content
Store static values in Constants

Constants are ideal for storing values that remain unchanged.

Sanne Willekens avatar
Written by Sanne Willekens
Updated yesterday

When building care flows, there will be situations where you need to reuse data youโ€™ve already used elsewhere. This is especially common when setting up integrations, where you might frequently repeat values such as an API URL or API key.

Using constants, you can define these static values once and reuse them in multiple places throughout your care flow, ensuring consistency and reducing repetition.

Within Awell, there are two types of constants:

  1. Global constants:
    These are defined at the organizational level and are accessible across all care flows.

  2. Care flow constants:
    These are defined at the individual care flow level and are only accessible within the scope of the current care flow.

Creating constants

Global constants

Global constants are managed in the CareOps application under settings. Note that this section is only accessible to Organisation admins.

Global constants must be managed manually across environments as they are not synchronized between Sandbox and Production. Instead, you need to configure constants separately for each environment. The names of global constants must be identical in all your environments.

Important notes:

  • When you update the value of a global constant, the change will only take effect after the care flow that uses the constant is re-published.

  • Updating a global constant does not impact care flows that were already published or any ongoing care flows. Only newly published care flows and instances created after the update will use the updated value.

Care flow constants

  1. Go to the Elements tab of your care flow

  2. Select Constants in the right-hand menu

  3. Click the "Create constant" button

    1. Enter a name for the constant

    2. Enter a value for the constant

    3. Define if you want to conceal your value. Note: this action is irreversible. Once a value is concealed it will not be shown through the UI and will stay encrypted. When used in API calls, the receiving end will of course receive the decrypted value.

  4. Click "Save" to start using your constant in your care flow.

Use a constant

Both global and care flow constants can be used in the same way:

  1. Open an action or location where you'd like to insert the constant (e.g. an API call)

  2. Type / to open the data variables menu

  3. Search and select one of the available constants in the drop-down.

Did this answer your question?