> ## 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.

# SMS | Get Valid Email - v0.1

> The composite tool that collects a validated email address via an SMS round-trip mid-call — how the exchange runs, its inputs and spoken lines, and how the validated email is written back.

## What it does

**SMS | Get Valid Email - v0.1** collects a valid email address by SMS round-trip, without the caller having to spell it aloud. In one step it:

1. speaks an **Opening Line** asking whether the caller can reply to a text with their email,
2. sends the **SMS Text** to the caller's mobile,
3. tells the caller the text is on its way and waits for the reply, keeping the conversation alive while it does,
4. reads the reply, extracts the email address and validates its format, and
5. speaks a **Success Line** confirming the address back — or a **Failure Line** if it couldn't be collected.

It is a [composite tool](/tools/composite-tools): the whole exchange runs behind a single step. Use it instead of asking for an email by voice — spoken emails are error-prone, while a texted reply arrives exactly as typed. Under the hood it uses the same platform SMS stack as the other [SMS tools](/tools/sms/overview); no integration needs to be connected.

***

## Use cases

* **Fill a missing email on the contact record.** Point **Skip If Set** at `{{contact.email}}` (string, e.g. `jane.citizen@example.com`) and map the **Email** output back to the same field — contacts with a known email skip the exchange entirely, everyone else gets the round-trip once.
* **Collect a delivery address for documents mid-call.** Ask for the email at the point in the flow where it's needed (a quote, a confirmation, a claim form) and reference why in the SMS text.
* **Optional email.** Where the email is nice-to-have, point the step's true and otherwise conditions at the same next step, and let the default Failure Line ("No worries at all — we'll leave the email for now.") close it out gracefully.

The caller must be on an Australian mobile (04 / +614) — the round-trip can't run to a landline or an overseas number. If your calls may reach landlines, treat the email as optional and route the otherwise path onward.

***

## Inputs

| Setting              | Description                                                                                                                                                                                               | Default                                                                                                              |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Opening Line**     | Verbatim line spoken before the SMS is sent — should ask whether the caller can reply to a text with their email. Literal or variable.                                                                    | "We just need to get your email. Are you able to use your phone to reply to a text message with your email address?" |
| **Recipient Mobile** | Mobile number the SMS is sent to and replies are read from. Must be an Australian mobile (04 / +614). Typically a variable such as `{{contact.phone}}` (string, e.g. `+61412345678`). Required.           | —                                                                                                                    |
| **SMS Text**         | Body of the SMS sent to the caller. Literal or variable.                                                                                                                                                  | "Please reply to this message with your email address."                                                              |
| **Skip If Set**      | A variable reference, typically `{{contact.email}}` (string, e.g. `jane.citizen@example.com`). If it resolves to a real value the step ends immediately with a true result and nothing is spoken or sent. | —                                                                                                                    |
| **Failure Line**     | Verbatim line spoken when the email can't be collected (the caller can't text, the send fails, or they opt out) before the step finishes false. Literal or variable.                                      | "No worries at all - we'll leave the email for now."                                                                 |
| **Success Line**     | Verbatim line spoken when the email is collected. May reference `{{sms.email}}` to read the address back.                                                                                                 | A varied confirmation that reads the collected email back                                                            |

The default Success Line already confirms the collected address back to the caller — don't add a second confirmation step after the tool.

***

## Outputs

| Output     | Description                                                                                                              |
| ---------- | ------------------------------------------------------------------------------------------------------------------------ |
| **result** | Hidden boolean — routes the step. True when a valid email was collected (or Skip If Set fired).                          |
| **Email**  | The validated email address as a string. Map it to `{{contact.email}}` (or another durable field) in **Output mapping**. |

## Variables this tool writes

| Variable        | Type   | Example                    | Description                                                                                        |
| --------------- | ------ | -------------------------- | -------------------------------------------------------------------------------------------------- |
| `{{sms.email}}` | string | `jane.citizen@example.com` | The validated email address collected from the SMS reply — the source behind the **Email** output. |

The `sms` namespace is shared with the other SMS tools (and with the calendar booking composite's SMS confirmation), and a later SMS step can overwrite it — always map **Email** onto a durable variable rather than reading `{{sms.email}}` in later steps. The tool's spoken lines and SMS text are inputs, not outputs.

***

## Routing and wiring tips

* **true** — a valid email was captured (or the step skipped because one was already set). **Otherwise** — not collected: the caller couldn't text, declined, the send failed, or no valid email arrived in the reply.
* Point **Skip If Set** at the **same** variable the **Email** output writes to, so repeat visits skip cleanly instead of re-texting the caller.
* The tool speaks its own success and failure lines — don't script another acknowledgement on the very next step.
* For names, phone numbers and reference codes, use [Data Collection - v0.2](/tools/composite/data-collection) instead — the SMS round-trip is specific to emails.

***

## Next Steps

* [Composite Tools](/tools/composite-tools) — how composite steps run, and how inputs, results and outputs connect to your call.
* [SMS Tools](/tools/sms/overview) — the underlying send and read tools and the `sms` variable namespace.
* [Data Collection - v0.2](/tools/composite/data-collection) — collect and verify a field by voice.
* [Tool Steps](/flows/steps-tool) — configuring inputs, conditions and output mapping on a step.
