Setting Up Conditions in Workflows

Updated 

Conditions are a key component of workflows, acting as the decision-making logic that evaluates specific criteria. They help determine the next steps in the process, ensuring that workflows are flexible and can adapt to different situations.

You can refer to the Survey Workflows Overview article to understand the use cases and value additions.

Prerequisites

This feature is available as part of Customer Feedback Management, and accessing workflow conditions does not require any specific permissions.

Setting Up Conditions in Workflows

Actions and conditions are fundamental elements of workflows, enabling targeted automation.

  • Conditions: Set the criteria that must be fulfilled for the workflow to progress to the next step.

  • Actions: Define the tasks the workflow will execute once the conditions are met.

The Customer Feedback Management Workflows module offers a variety of actions and conditions to automate processes like survey distribution, case management, and audience engagement. Let's have a look at it:

  1. Add a Condition or Action: Click Add Element(+ icon) to define your workflow logic. You can view and select from a list of supported conditions and actions.

  2. Start with a Condition: Begin incorporating conditions into workflows to ensure alignment with the intended use case.

  3. Define Paths for Conditions:

    When setting up conditions, you can:

    1. Name Your Condition Sets: Use descriptive names like "Checking NPS Score" to identify and understand the workflow logic easily.

    2. Define Conditional Paths: Group-related conditions to create distinct paths for different scenarios based on specific criteria.

    3. Specify a Default Path: Set a fallback path to ensure the workflow continues even when no conditions are met.

  4. Customize Your Workflow: Customize your workflow by designing a sequence of conditions and actions that align with your desired outcome. Clearly define how each step interacts to ensure the workflow effectively meets its objectives.

    Example: To trigger a response workflow when an NPS question receives a score of less than six, use the Survey Decision Box condition to set this logic.

How to Use it?

The following condition nodes are supported across workflows.

Nodes

Description

Response Event

Salesforce Outbound Message Event

Sprinklr Audience Profile Event

Survey Decision Box

Creates branches in the workflow based on responses to survey questions, or transaction fields.

Yes

No

No

Decision Box

Adds a decision point in the workflow to branch based on specific conditions. Supported assets include cases, profiles, workflow variables and other assets.

Yes

Yes

Yes

Condition 1: Survey Decision Box

Note:

Supported Event: Response Event only.

Set up conditions based on survey responses, transactional metadata and response transactions for personalized actions.

When you receive responses to your latest customer survey, it’s important to respond in a way that reflects each customer's experience. Some customers may rate your product highly, while others might point out areas for improvement. With conditional workflows, you can ensure that every follow-up message aligns with the sentiment behind each response.

For example, if a customer gives a score of 9 or 10 on an NPS survey, you can automatically send a personalized thank-you email to show appreciation. On the other hand, if someone rates below 6, your workflow can trigger a thoughtful follow-up to acknowledge their concerns and offer support. This ensures that every customer feels heard and valued.

But it doesn’t stop there. You can take personalization even further by integrating transaction data into your workflows. This allows you to tailor messages based on customer context, such as preferred language or location.

For instance, a customer in Germany who gives a high score could receive their thank-you email in German, while a customer in the Middle East with a lower score might receive an apology email in Arabic. This combination of feedback and transactional context enables you to create deeply personalized and culturally relevant experiences for every customer.

By using conditions in your workflows, you're not just automating responses, you're building meaningful, timely, and personalized interactions that strengthen customer relationships.

Enhance customer engagement by automating follow-up actions based on survey responses and transactional metadata. By setting conditions in the workflow, businesses can ensure that customers receive relevant and personalized communication tailored to their sentiment and context.

The Survey Decision Box let's you set up conditions based on both survey responses and transactional metadata, if available.

To set it up, simply add a condition to your workflow by selecting the Survey Decision Box. From there, you can define criteria like specific answer ranges (e.g., NPS scores) or attributes tied to transaction fields (e.g., language preference or transaction value).

Let us try to understanding the configuration:

  1. Click Add Element (+ icon).

  2. Select Survey Decission Box from the drop-down list and fill the following details:

    1. Name: Enter a meaniful name to your condition that will appear on the workflow canvas, making it easy to identify it's purpose.

    2. Define Conditions: Select between Survey Questions, Transaction Fields and Response Translations.

      1. Survey Questions: Select a question (e.g., NPS score) and set criteria such as a specific range of scores to define conditions (e.g., range of scores).

        You can add multiple conditions within the workflows by clicking on + Condition Group.

        Note: To combine conditions using "AND" and "OR", you can structure your logic to handle multiple conditions and ensure that the workflow proceeds under a default path if none of the conditions are met.

      2. Transactional metadata: Define conditions based on data such as language preference, transaction value, etc.

      3. Response Translations: Establish conditions according to the responses translations, in various languages.

  3. Multiple Paths: Click + Add Another Path to add multiple paths. You can use "AND" and "OR" to combine conditions. Set a default path to ensure the workflow proceeds even if no conditions are met.

  4. Click Save, after configuring the conditions and paths. The conditions and paths you’ve defined will now be displayed on the workflow canvas, offering a clear visual representation of your decision logic.

    1. Click Edit or Delete by hovering over the nodes inorder to edit or delete.

  5. Click + option to add more conditions or actions needed allowing you to refine the workflow further based on your use case.

Condition 2: Decission Box

Note:

All three events are supported, but available assets may vary.

Set up conditions based on Sprinklr assets and Salesforce variables, depending on the event type.

Once you've set up your Salesforce outbound event, you may want to use the data it provides, such as a customer's preferred language, to guide the path of your workflow. Or, perhaps you've created an internal Sprinklr asset, like a case or profile, using the Create Record node within the Audience Profile event through the Workflow API. Now, you’re looking to use fields from that asset to make more informed, automated decisions.

This is where the Decision Box node comes in. It allows you to define conditions and create branching paths in your workflow based on the data available,whether it's from Salesforce or your internal systems.

For example, you can direct customers into different journeys based on their language, location, account status, or any other relevant field. This makes it easy to build personalized, context-aware workflows that adapt in real time to each customer’s specific needs.

By using the Decision Box node, you can ensure that every action in your workflow is data-driven, timely, and aligned with customer expectations,helping you deliver more relevant and impactful experiences at scale.

The Decision Box node lets you define conditions based on the following:

  • Standard Sprinklr assets available for the event

  • Variables or assets created within the current workflow

  • Salesforce fields available for the Salesforce event

You can combine these options to create condition paths, offering flexibility in designing dynamic workflows based on various data. This ensures that actions are tailored and relevant to each customer's specific context.

Let's try and understand the configuration steps:

  1. Click + option in the workflow canvas.

  2. Select Decission Box from the selected list of conditions and actions.

  3. Fill details to the decission box:

    1. Name: Add a meaningful name that will appear on the workflow canvas, making it easy to identify its purpose.

    2. Path Name and Conditions:

      1. Path Name: Add a meaningful path name.

      2. To define the condition follow these steps:

        1. Choose the Asset Type: Select from available assets, such as standard Sprinklr assets (e.g., Profile or Case), variables created earlier using the "Create Record" action node, or Salesforce fields relevant to the workflow, if applicable.

        2. Select the Specific Field: After selecting an asset, click on it to see the list of available fields that can be used to define your condition.

        3. Create Conditional Logic: Set conditions based on these fields, such as language preference, customer segment, or transaction details, to guide the workflow's progression based on the available data.

          Note:

          • Salesforce variables will be accessible solely during the creation of a workflow in the Salesforce outbound message event. The fields that will be available are those displayed in step 12 of the process of Salesforce outbound message event setup.

          • To ensure that variables and their related fields show up in the Decision Box, they need to be established earlier in the workflow, prior to the Decision Box node.

    3. Multiple Paths: Click + Add Another Path to add multiple paths within the workflows.

      1. You can use "AND" and "OR" to combine conditions.

      2. Set a default path to ensure the workflow proceeds even if no conditions are met.

    4. Click Save, after configuring the conditions and paths. The conditions and paths you’ve defined will now be displayed on the workflow canvas, offering a clear visual representation of your decision logic.

      1. Click Edit or Delete by hovering over the nodes inorder to edit or delete decision box.

    5. Click + option to add more conditions or actions needed allowing you to refine the workflow further based on your use case.

Key points to note

You can evaluate the feature in the following manner and verify that the conditions are functioning as intended:

  • Add Actions and Conditions: Set up the necessary actions and conditions in your workflow to define the workflow's behavior.

  • Run the Workflow: Run the workflow using test data to confirm that it functions as intended, making sure that all actions and conditions are activated and executed properly.

  • Refer to Event-Specific Articles: For detailed instructions on testing particular workflows for various events (such as Salesforce events or response events), please refer to the relevant articles that offer detailed, step-by-step testing guidance.

Please note that availability and functionality of conditions may vary depending on the selected event type.