Global Variables - An Overview

Updated 

Sprinklr has introduced Global Variables which is a unified and reusable configuration layer that simplifies workflow development, enhances consistency, and reduces manual errors.

Managing reusable data across workflows has historically been a challenge in Sprinklr. Admins often rely on Groovy scripts or hardcoded values to define constants or mappings, resulting in redundancy, inconsistencies, and error-prone updates. To address this, the Global Variables has been introduced.

Objectives

  • Simplify Data Mapping: Eliminate the need for embedding mappings directly within workflow steps.

  • Centralized Control: Admins can modify a value in one place, instantly affecting all dependent workflows.

  • Minimize Code Dependency: Reduce reliance on Groovy scripts for basic data manipulation.

  • Increase Reliability: Standardize frequently used values to reduce misconfigurations.

Key Enhancements

The following are some of the key enhancements:

  • System-Wide Scope - Global Variables will be accessible across all workflow types, including:

    • Guided Workflows

    • Conversational AI

    • IVR (Interactive Voice Response)

    • ACW (After Call Workflows)

    • Journey Facilitator

  • Seamless Integration - There is no need to manually import Global Variables into individual workflows. Once defined, they are immediately usable wherever needed.

  • Central Management - Global Variables will be managed from a dedicated UI, allowing administrators to create, view, and update variables without needing to touch individual workflows.

Challenges addressed by Global Variables and Solution

Challenge

Values such as mappings or constants was getting implemented separately in each workflow, typically using Groovy code. This was leading to:

  • Code duplication

  • Maintenance complexity

  • Higher risk of inconsistencies

  • Increased development time

For example, updating a country-to-region map requires editing each workflow that includes it. A missed update in one script could lead to incorrect routing or logic execution.

Solution

Sprinklr has introduced Global Variables as a configuration component.

  • Admins define global values once.

  • These values can be referenced by name inside any workflow.

  • Updating the variable updates its use system-wide instantly.

How It Works

  1. Admin creates a Global Variable from the Create Global Variable page. Variable is assigned a name and a supported type (String, Number, List).

  2. Workflows reference the variable using its name.

  3. Any change made to the variable reflects across all referencing workflows instantly.

Use Cases

The following are some of the Global Variables use cases:

IVR (Interactive Voice Response)

  • Example: A mapping of numeric input to department names ({ "1": "Sales", "2": "Support" }).

  • Benefit: No need to hardcode mappings in every call tree. Just update the Global Variable to reflect changes.

Guided Workflows/Conversational AI

  • Example: Shared business rules, escalation thresholds, product codes.

  • Benefit: Ensure all workflows use uniform values, reducing inconsistencies.

Journey Facilitator & ACW

  • Example: Use customer region mappings or consent flags reused in multiple post-call flows.

  • Benefit: Simplifies data continuity across entire customer lifecycle touchpoints.

For more information on creating Global Variables and using them in workflows, refer to