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

# SMS Flow

> How inbound texts are matched to sessions — delivery path, session continuity by phone number, and outbound plain-text format.

Use **[Connect SMS](/sms/connect-sms)** first if you have not enabled SMS on a number yet. For diagnosing issues, see **[Troubleshooting](/sms/troubleshooting)**. For US registration requirements, see **[US Number Compliance](/sms/compliance)**.

<Tip>
  **SMS Flow** covers how **OpenCX** processes texts after go-live. Setup steps stay on [Connect SMS](/sms/connect-sms).
</Tip>

## Path Of A Message

```mermaid theme={"dark"}
flowchart LR
  A([Customer]) --> B[Carrier]
  B --> C[Received]
  C --> D[Match number]
  D --> E[Session]
  E --> F[AI reply]
  F --> G([Customer])

  style A fill:#1a5c20,color:#fff,stroke:#267a2e
  style G fill:#1a5c20,color:#fff,stroke:#267a2e
```

<Steps>
  <Step title="Customer Texts Your Number">
    The customer sends an SMS to the number you registered in your [OpenCX dashboard](https://platform.open.cx/channels/sms).
  </Step>

  <Step title="Message Delivered To OpenCX">
    The message is delivered to **OpenCX** and validated.
  </Step>

  <Step title="Match Number To Org">
    **OpenCX** matches the receiving number to your org.
  </Step>

  <Step title="Find Or Create Session">
    The sender's phone number is matched against existing contacts. If a contact has an **open SMS session**, the message continues it. If the contact exists but has no open session, a new session is created. If no contact record exists, a new session and contact are created automatically.
  </Step>

  <Step title="AI Generates Reply">
    If <Tooltip tip="Controls which conversations the AI auto-replies to. Configure per channel under Settings." cta="Autopilot and topics" href="https://platform.open.cx/settings/autopilot">**Autopilot**</Tooltip> is enabled for SMS, the AI generates a reply using your configured knowledge and tools. The reply is sent as plain text. When Autopilot is off or the session is handed off, no AI reply is generated — human agents reply from the [inbox](https://platform.open.cx/inbox) instead.
  </Step>
</Steps>

<Note>
  The thread in your [OpenCX dashboard](https://platform.open.cx) is the authoritative record. SMS has no subject-line tokens or threading headers — continuity is by **phone number** and **open session status**.
</Note>

## Outbound Format

All outbound SMS replies are **plain text**. Before sending, **OpenCX** strips HTML tags and code blocks. The cleaned message is sent through the SMS provider.

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Troubleshooting" icon="wrench" href="/sms/troubleshooting">
    Missing replies, delivery failures, and common fixes.
  </Card>

  <Card title="US Number Compliance" icon="flag" href="/sms/compliance">
    10DLC and toll-free registration for US numbers.
  </Card>

  <Card title="AI Actions" icon="bolt" href="/actions/introduction">
    Run tools and workflows from SMS conversations.
  </Card>

  <Card title="Autopilot And Topics" icon="sliders" href="/handoff/topics">
    Channel-level Autopilot and topic rules.
  </Card>
</CardGroup>
