Workflow Loops
About Workflow Loops
You can use workflow loops to execute a set of automated tasks for multiple entries in a list. For example, you can send an NPS summary to each store manager containing the average NPS for their store, or send a monthly employee satisfaction score to each people manager in the organization.
Qualtrics achieves workflow loops through scheduled data extraction tasks. You can be specific about what gets executed for each data entry that’s extracted, otherwise known as a “list.” In other words, this is the list of all the people in a particular role (e.g., account managers, people managers, etc.), or all cities (e.g., Seattle, New York, etc.), or, more generally, all items in a table.
Data Extraction Tasks
When creating workflows that loop, the first task you must add is a data extraction task. These types of tasks extract data from another source that you can then use or save elsewhere. Sources you can extract data from include:
One of these tasks must be added to the workflow before you can specify what happens on each loop. Once you start building the tasks that appear in each loop, you are allowed to add any additional tasks you want.
Requirements for Workflow Loops
Before you create a workflow loop, here are some important things to keep in mind:
- Workflow loops are only compatible with scheduled workflows.
- You can only add 1 loop list to a workflow at a time. That means if you’ve added multiple data extraction tasks to your workflow, you can only base a loop off 1 of them.
- Loops can only process files of a certain size. That means the file you extract must meet the following requirements:
- The file cannot be more than 10,000 rows.
Example: In other words, if you’re processing users, there’s a limit of 10,000 users. If you’re processing contacts, there’s a limit of 10,000 contacts.Qtip: If you exceed 10,000 rows, the workflow will not run.
- The file cannot be larger than 1GB.
- Each row cannot exceed 1MB.
- The file cannot be more than 10,000 rows.
- Loops cannot be added inside other loops.
- You can only add up to 5 tasks in a looping list.
Setting Up Workflow Loops
This section covers how to set up a workflow loop using the example of sending a weekly NPS email to users that belong to the manager role. However, this is not the only use of workflow loops.
- Go to the Workflows page, or the tab in a survey.
- Click the dropdown next to Create a workflow.
- Select Started at a specific time.
- Configure your schedule.
Example: We want to send an NPS email to each manager at the start of every week. Thus we chose to make our workflow happen weekly on Monday at 9am. - Click the plus sign ( + ) to add a task.
- Select a data extraction task.
Example: We chose Extract employee data from SuccessFactors because we want to repeat certain workflows for every manager, who we have saved in SuccessFactors. - Select Add a for-each loop.
- Under For each item in a list, select the task you set up in step 6.
- Click the plus sign ( + ) and select tasks as desired.
Warning: You should not use other data extractor, transformer or loader tasks inside of your loop. See this page for a list of such tasks. If you want to use a data loader task, consider building a standard ETL workflow instead of using loops.Example: Next, we add a calculate metric task to find their NPS score. We set up a filter on this task so that the Manager embedded data field must be equal to the user’s ID. Note that this is represented as piped text for the user ID field extracted during the web service’s API call. Without this filter, the wrong NPS score could be calculated.
- Click the plus sign ( + ) and select conditions as desired.
Example: We only want to send an email for NPS scores that count as detractors, so we set a condition to only send if the calculate metric task’s NPS is less than or equal to 6.
- Click the plus sign ( + ) and add more tasks as desired.
- When finished setting up, make sure your workflow is enabled.
Run History
When you look at the run history for a workflow with loops, you can see the run history for each of the loops triggered. This enables you to narrow down performance issues related to specific workflow loops.
When you’re inside the Run History tab, click the name of the workflow to see more details. In addition to the workflow’s event and tasks, you’ll also see For each loop. Click this to see a breakdown of how each event and task performed in each loop.
- The number of loops where tasks failed or succeeded. These numbers are affected by filters.
- Filter to see loops where tasks failed or succeeded.
Qtip: See more on Workflow Statuses.
- Each loop is numbered in the order it was executed.
- The time each loop started (in your account’s time zone).
- Click a loop to see more details about the tasks executed during that loop and whether they succeeded. You’ll also see the ID for each task (T-ID #).
- Click a task to view its JSON file.