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

# Send to Contact

> Send an SMS message to the contact during the conversation.

## Description

Sends an SMS message to the contact's phone number. The SMS is scheduled for delivery and returns `true` if successfully queued.

***

## Manual Inputs

| Name                | Data Type | Required | Description                         |
| ------------------- | --------- | -------- | ----------------------------------- |
| SMS message to send | string    | Yes      | The text content of the SMS message |

***

## Global Inputs

This tool automatically uses:

| Variable            | Description                              |
| ------------------- | ---------------------------------------- |
| `{{contact.phone}}` | The contact's phone number (destination) |

***

## Manual Outputs

| Name   | Data Type | Description                           |
| ------ | --------- | ------------------------------------- |
| result | bool      | `true` if SMS was queued successfully |

***

## Global Outputs

| Variable                    | Data Type | Description                                                                                                                                                                                                                                                                                                                    |
| --------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `{{sms.send_error_spoken}}` | string    | Raw diagnostic (prefixed `SMS sending error:`), written only when an unexpected error interrupts the send — not on the common validation failures. Despite the name it is not a caller-ready line; use it for logging or branching and speak your own fallback. See [Variables this tool writes](#variables-this-tool-writes). |

***

## Conditions

### Success (true)

The tool returns `true` when:

* The SMS is successfully queued for delivery

### Failure (false)

The tool returns `false` when:

* The contact's phone number is missing or invalid
* The assistant's phone number is not configured
* The message content is empty
* Another error occurs when scheduling the SMS

***

## Variables this tool writes

Send to Contact writes a single variable, and only in a narrow case: when an unexpected error interrupts the send attempt. The more common failures — a missing or invalid mobile number, an unconfigured assistant number, or an empty message — fail without writing anything. On success it writes nothing to the `sms` namespace; the only success signal is the boolean `result` output you route on. Nothing is written to any other namespace.

| Variable                    | Type   | Written                                           | Example                                |
| --------------------------- | ------ | ------------------------------------------------- | -------------------------------------- |
| `{{sms.send_error_spoken}}` | string | Only when an unexpected error interrupts the send | `SMS sending error: request timed out` |

`{{sms.send_error_spoken}}` holds a raw diagnostic describing what went wrong, prefixed with `SMS sending error:`. Despite the name, the value is not a caller-ready sentence — do not speak it back verbatim. Treat it as a signal for logging or branching and speak your own fallback line to the caller. Because it is set only on an unexpected send error, and not on the everyday validation failures (missing or invalid number, empty message), it will be empty on those paths — so guard against both an empty value and a stale value left by an earlier step before you rely on it.

For the full list of namespaces and fields you can read and write, see [Variables](/flows/variables).

***

## Example Usage

```text theme={null}
Tool Step: Send booking confirmation
   Input: "Your appointment is confirmed for {{calendar.booking_time_written}}. See you then!"

   Condition: true (success)
   -> Next: confirmation_step
   -> Script: "I've sent you a text with the details."

   Condition: Otherwise (failure)
   -> Next: fallback_step
   -> Script: "I wasn't able to send the text."
```

***

## Best Practices

1. **Include key details** — Confirmation numbers, times, links
2. **Handle failures gracefully** — Always have a verbal fallback
3. **Use variables** — Personalise with `{{contact.first_name}}` and booking details
4. **Validate phone first** — Use a [Code Step](/tools/code-step/overview) to check the number can receive SMS before sending

***

## Next Steps

* [SMS - Read from Contact](/tools/sms/read) — Read the recent SMS exchange with the contact
* [Tool Steps](/flows/steps-tool) — Learn how to configure tool steps
* [Variables](/flows/variables) — See all available variables
