Global Variables in Guided Workflows

Updated 

Global Variables are configurable values that can be defined once and reused across multiple workflows within a specific environment. They provide a centralized way to manage shared data, improving consistency and simplifying updates across workflows.

Key Benefit

  1. Efficiency: Define once, use everywhere—eliminates the need to duplicate values across workflows.

  2. Consistency: Ensures all workflows reference the same value, reducing the risk of mismatched data.

  3. Easy Maintenance: Updating a global variable automatically reflects across all linked workflows, saving time and effort.

Steps to Create Global Variables

  1. Click the New Tab icon. Under the Sprinklr Service tab, select Guided Workflows within Resolve.

  2. From the left panel, click Guided Workflow Global Variables.

  3. Now, click +Add Global Variable to add a new variable. You can also edit an existing global variable from here. To do so, click the Options icon and then click Edit.

  4. If you edit a Global Variable, a warning message also pops up as shown in the screenshot below.

  5. If you create a new variable, the Create Global Variable pop-up screen will open, where you can define the following fields:

    • Variable Name: You can define a name for your global variable that will be accessible across all workflows in the environment.

    • Variable Value: You can either add a static value or a Groovy code as well.

  6. Once done, click Save.

Note: Global variables are not available in the resource selector by default. To use them in a workflow, you must explicitly import them where needed.

Steps to Import Global Variables in a Guided Workflow

  1. Click the New Tab icon. Under the Sprinklr Service tab, select Guided Workflows within Resolve.

  2. From the left panel, click Guided Workflow Manager.

  3. Now, you can either edit or add a Guided Workflow.

  4. Click Manage Resources in the top right corner.

  5. Click the arrow adjacent to Create New Resource and then click Import Global Variable.

  6. The Global Variables pop-up window will open. You can select the global variable you created from the dropdown. You can also select multiple global variables at once.

  7. Once done, click Save.

  8. Now, to view these variables, click Manage Resources again. The selected global variables will be populated under the Global Resources section. These variables can be used across the workflow.