> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voxworks.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Closing and Outcomes

> The Closing fixed section: the farewell, the outcome codes a survey call can end with, the closing text spoken for each, the four codes the survey shell always uses, the missing-code alert, and how outcomes map to session statuses in Results.

## What is the Closing section?

**Closing** is the last fixed section in the **Outline** on the [Questions tab](/surveys/questions-tab). It is described as *"Every code the interview can end with, the closing spoken for it, and the farewell spoken last."*

Every survey call ends with an **outcome code** — `completed`, `refused`, `screened_out` and so on. The Closing section is where you list every code the survey can end with and write what the respondent hears for each. Edit it and click **Save**; the confirmation is *Closing saved*.

***

## How a survey call ends

When the interview ends, the respondent hears two things in order:

1. The **closing text** for the outcome code the call ended with.
2. The **Farewell** — *"Spoken last on every path, inbound included."*

For example, a completed interview might end: *"That's the end of the survey — your answers will really help."* (the `completed` closing text) followed by *"Thanks so much for your time. Goodbye."* (the farewell).

Because the farewell always follows, don't start closing texts with "Thank you" — the farewell already says it.

Two endings are different:

* **Voicemail** ends silently after the message or SMS — no closing text, no farewell. See [Voicemail and SMS](/surveys/voicemail).
* **`no_contact`** (a wrong person, or a screener who would not put the call through) has no closing text, so the respondent hears only the farewell.

***

## Farewell

The **Farewell** group has one field, **Farewell**. Write one short sign-off that works after any closing text, for example *"Thanks for your time today. Goodbye."*

***

## Outcomes

The **Outcomes** group lists every outcome code. Click **+ Add outcome** to add a row. Each row has:

| Part             | What it is                                                                                                                                                |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Code**         | Lower case letters, numbers and underscores (*"Outcome codes are lower case letters, numbers or underscores."*). Up to 100 outcomes.                      |
| **Closing text** | *"Spoken verbatim when the session ends with this code, before the farewell."*                                                                            |
| Source           | Where the code is used: a `Shell · …` label for the four shell codes, the routing rules that end with it, or *Not referenced by any rule or shell route*. |

### The four shell codes

The survey shell always ends calls with one of these, whether or not any rule names them. They must all be listed:

| Code                 | Source label              | When it is used                                                                                                                                                                         |
| -------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `completed`          | *Shell · survey complete* | The last question was finished.                                                                                                                                                         |
| `callback_requested` | *Shell · busy route*      | The respondent was busy — at the consent question ("not now") or through the [busy behaviour](/surveys/behaviours) — or the call could not get a usable answer at the consent question. |
| `refused`            | *Shell · stop route*      | The respondent declined at the consent question, or asked to stop through the [stop behaviour](/surveys/behaviours).                                                                    |
| `no_contact`         | *Shell · gatekeeper*      | The call never reached the respondent: wrong person, a screener who would not connect, or voicemail.                                                                                    |

A new survey starts with no outcomes listed, so [Readiness](/surveys/readiness) shows a blocker for each shell code — *"Outcome “completed” is missing — the survey shell always ends with it."* — until you add them.

### Your own codes

Add a code for every other way your survey can end:

* A **Screen out** or **Terminate interview** action on a [routing rule](/surveys/routing-rules) — for example `screened_out` for respondents outside the target group, or `under_18`.
* A **Complete survey** action that ends early with its own code.
* A **Number** question's **Screen out** setting, which uses `excluded` unless you choose another outcome (see [Number](/surveys/question-types/number)).

Give each one a closing text. A screen-out with no closing text leaves the respondent hearing only the farewell, and Readiness warns about it.

### The missing-code alert

If a rule or the shell ends with a code that is not listed, the section shows an alert such as *"2 referenced outcome codes are missing — completed, refused. Every code a rule or the shell ends with must be listed here before this version can be published."* Click **Add them** to add a row for each missing code, then write their closing texts and **Save**.

Readiness blocks compiling and publishing on the same problems:

* *"Outcome code “(code)” is listed twice."*
* *"(rule) ends with outcome “(code)”, which is not listed in Outcomes."*
* *"Outcome “(code)” is missing — the survey shell always ends with it."*

***

## How outcomes appear in Results

Each survey session records an **outcome code** and a **status**. The status is the session's lifecycle; the outcome code is the business result. They are separate — the Results **Terminal statuses** card notes *"Lifecycle status and business outcome are separate dimensions"*.

| Outcome code                                                                                        | Session status |
| --------------------------------------------------------------------------------------------------- | -------------- |
| `completed`                                                                                         | completed      |
| A shell code (`callback_requested`, `refused`, `no_contact`) reached part-way through the interview | terminated     |
| Any other code — a screen-out or terminate on a question                                            | screened out   |

A call that ends at the gatekeeper — declined, not now, wrong person, voicemail — never enters the questionnaire and files **no session**. It is counted only in the Results **Contact funnel**. See [Results](/surveys/results).

The outcome code is also on the call as the `survey.temp.outcome` custom variable, with a readable reason in `survey.temp.termination_reason` — see [Survey variables and piping](/surveys/survey-variables).
