> For the complete documentation index, see [llms.txt](https://help.metaforms.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.metaforms.ai/survey-programming-decipher/unified-flow/unified-flow-for-survey-programming.md).

# Unified Flow for Survey Programming

## Introduction

The Unified Flow is the next generation of the Metaforms survey programming experience for Decipher. While the workflow looks different from the Legacy Flow, every change has been made with one goal: reducing the number of manual steps, clicks, and repeated instructions needed to program a survey, so your programmers spend their time on survey logic rather than on operating the tool.

This document outlines the specific improvements and efficiencies your team will gain when transitioning from the Legacy Flow to the Unified Flow. Each section explains how a task worked in the Legacy Flow, how it works now, and the practical benefit of the change.

## Improvements and Efficiencies

### 1. Quota Programming in a Single Step

**In the Legacy Flow:** Creating a quota was a two-to-three step process. You first created the quota in the quota sheet using AI generation, then returned to the XML tab, placed your cursor in the correct location, and separately generated the matching quota tag so the sheet and XML stayed aligned.

**In the Unified Flow:** A single prompt such as “Create quota for gender” does everything at once. The AI generates the quota sheet and inserts the corresponding quota tag in the XML at the same time, keeping both perfectly in sync. This applies to complex setups as well, including cross quotas and dynamic priority quotas.

**What this means for you:** Quota programming drops from a multi-step, two-tab workflow to one instruction. There is no risk of the quota sheet and XML drifting out of sync because they are generated together.

### 2. Edit with AI — No Need to Select Code

**In the Legacy Flow:** To edit a specific section, you had to scroll to and select the exact XML lines you wanted to change, press Ctrl+K to open the Edit with AI widget, and then provide your instruction inside that widget. The edit only applied to the selection you made.

**In the Unified Flow:** You simply describe the change in the AI Assistant chat box. The AI identifies where in the script the edit needs to be made and applies it — even if the change spans multiple questions. If you want to target a specific place, you can include the question ID (QID) in your prompt.

**What this means for you:** No more hunting through the XML to find and select the right lines before every edit. You describe what you want; the AI finds where it belongs.

### 3. Faster Survey-Wide Edits

**In the Legacy Flow:** Applying a generic change across the entire survey (for example, a formatting or text convention that affects every question) meant repeating the select-and-edit process section by section, which was slow for large scripts.

**In the Unified Flow:** A single instruction in the chat applies a generic edit across the whole survey in one pass. The AI locates every place the change is needed and updates them together.

**What this means for you:** Global changes that previously took many repeated edit cycles are completed significantly faster, with consistent results across the full script.

### 4. Your Manual Edits Are Understood and Respected

**In the Legacy Flow:** If a programmer made manual edits directly in the XML, subsequent AI generations had no reliable awareness of those changes, so the AI could produce output that did not follow the pattern the programmer had established by hand.

**In the Unified Flow:** The AI specifically reads your manual edits before each generation to understand what you have changed. When it continues generating, it follows the patterns and conventions you have established in the script.

**What this means for you:** Much higher probability that AI output matches your hand-written style and structure. Manual work and AI work blend together instead of fighting each other, reducing rework.

### 5. No Specialization Selection Required

**In the Legacy Flow:** Before programming a complex question, you had to make sure the correct specialization (for example, MaxDiff, Conjoint, or a JavaScript-based setup) was selected, and only then create the question. Choosing the wrong specialization meant redoing the work.

**In the Unified Flow:** There is no specialization selector. You simply mention the logic or methodology in your prompt — for example “Use JS for this QID”, “Program this QID using the MaxDiff indices method”, or “Program this QID using a custom Conjoint method” — and Metaforms handles it based on your instruction.

**What this means for you:** One less configuration decision before every complex question, and no penalty for not knowing in advance which specialization a question requires. The methodology is driven by plain-language prompts.

### 6. Fewer Edits on Complex Logic (JavaScript, MaxDiff, Conjoint)

**In the Legacy Flow:** Complex setups involving custom JavaScript, MaxDiff, or Conjoint typically required several rounds of generation and correction before the output matched the intended behavior.

**In the Unified Flow:** Because the agent reasons through the requirement and asks clarifying questions before programming, the number of edits required for these complex setups is considerably lower. The first output is much closer to the final result, and refinements are handled through simple follow-up prompts.

**What this means for you:** The most time-consuming parts of survey programming — advanced logic and specialized methodologies — need noticeably fewer correction cycles, which is where the largest time savings are realized.

### 7. One Chat, Full Context — No Repeating Yourself

**In the Legacy Flow:** Each generation or edit was an isolated action. If you established an instruction or convention for one question, you had to repeat that instruction every time you worked on another part of the survey, because the tool retained no memory of your earlier requests.

**In the Unified Flow:** All programming happens in a single AI Assistant conversation, so the AI has the full context of everything that has happened in the script. If you give an instruction once — for example, a styling convention or a logic pattern for a particular question type — the AI carries that context forward and applies it without being told again.

**What this means for you:** Less typing, fewer repeated instructions, and more consistent output across the survey. The tool learns your project’s conventions as you go.

### 8. Long Questionnaires No Longer Break Generation

**In the Legacy Flow:** The generation widget read the entire questionnaire for every generation or edit. For long QNRs, this could cause generation to fail outright because of the document’s size, sometimes forcing manual workarounds such as trimming the file.

**In the Unified Flow:** The agent reads only the questions and sections it actually needs for the current generation or edit, rather than the whole questionnaire every time. Large, complex questionnaires are processed in manageable parts.

**What this means for you:** Long questionnaires — including very large multi-sheet documents — can be programmed smoothly from start to finish, without the size-related generation failures seen in the Legacy Flow.

### 9. Restructure Your XML with a Prompt

**In the Legacy Flow:** Structural reorganization of the script — for example, moving all res tags to the start of the XML — was either not practically possible or extremely slow, since it had to be done through manual cut-and-paste across the file.

**In the Unified Flow:** These structural moves are now possible and fast. You describe the reorganization you want in the chat, and the AI restructures the script accordingly in a fraction of the time.

**What this means for you:** Script housekeeping and standards alignment that programmers previously avoided (or did painfully by hand) becomes a quick, prompt-driven task.

### 10. Ask the AI Why — and Keep Asking

**In the Legacy Flow:** There was no meaningful way to interrogate the tool about its output. If you wanted to understand why a script was implemented a certain way, you had to reverse-engineer the code yourself.

**In the Unified Flow:** You can ask the AI directly why a script is implemented the way it is, and then ask follow-up questions for further clarification — all within the same conversation. The AI explains its reasoning with full awareness of your project’s context.

**What this means for you:** Faster reviews, easier debugging, and a built-in learning resource. Junior programmers can understand advanced setups by asking, and senior programmers can validate the AI’s decisions before accepting changes.

### 11. Template Instructions Are Applied Automatically — No More Apply Button

**In the Legacy Flow:** If your organization had template instructions set up, programmers had to manually click the Apply button above each template instruction to insert the required code for that specific step. This had to be repeated for every instruction, on every project.

**In the Unified Flow:** There is no Apply button. The AI reads and applies your template instructions automatically while generating questions in the chat. Programmers simply proceed with their work, and the template setup is taken care of in the background. If a template has no instructions configured, nothing changes for the user.

**What this means for you:** One fewer manual workflow to remember and repeat on every project.

### 12. A Head Start on Change Management

**In the Legacy Flow:** Change Management is not available in the Legacy Flow.

**In the Unified Flow:** Change Management is built on the same agent architecture as ad-hoc survey programming in the Unified Flow — the same AI Assistant chat, the same accept/reject review workflow, and the same prompt-driven way of working. Every ad-hoc project your team programs in the Unified Flow is, at the same time, hands-on practice for Change Management.

**What this means for you:** By adopting the Unified Flow for ad-hoc projects now, your team becomes familiar with the platform and is ready to use Change Management effectively

## Summary

Taken together, these changes remove the most repetitive mechanics of the Legacy Flow — applying template instructions, multi-step quota creation, selecting code before every edit, repeating instructions, and choosing specializations — and replace them with a single, context-aware assistant that understands your questionnaire, your script, and your manual edits.

There is a learning curve in moving from direct script editing to a prompt-driven workflow, and we expect the first projects to feel different. But once your team is past that initial adjustment, the Unified Flow consistently requires fewer steps, fewer corrections, and less time per survey than the Legacy Flow — and it is where all new capabilities, such as Change Management, are being built. The Legacy Flow remains accessible throughout your transition, so your team can adopt the Unified Flow at a comfortable pace without any disruption to live work.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.metaforms.ai/survey-programming-decipher/unified-flow/unified-flow-for-survey-programming.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
