# SMS Opt-Out

## Overview

Welkin does not have a built-in SMS opt-out toggle. Instead, you build an SMS opt-out workflow in Designer using Automations, a custom CDT field, and conditional logic added to outbound SMS automations.

## What You'll Need Before Building

Prepare the following in Designer before creating the workflow:

* **Opt-out keyword** — the keyword patients will text to opt out (e.g., "STOP")
* **SMS confirmation template** — a message template to confirm the opt-out to the patient
* **CDT field** — a list or boolean field to store opt-out status (e.g., values: "SMS – Yes" / "SMS – No")
* **Data View** — a view for the CDT field with permissions and layout placement configured
* **Task template** — a task for the care team to process the opt-out

## Building the Opt-Out Automation

1. Navigate to **Automations** in Designer and click **+New**
2. Name the automation and set:
   * **Trigger Type:** Event
   * **Event:** SMS Received
3. Add a **Condition**: Event Type = Message, Contains = your opt-out keyword (e.g., "STOP")
4. Add an **Action**: Task — assigned to the care team member who will process opt-outs, using the task template you created
5. Optionally add a second action to auto-send a confirmation SMS to the patient when the opt-out is received or processed

## Preventing SMS to Opted-Out Patients

In every automation that sends an outbound SMS, add a **Condition** that checks the opt-out CDT field:

* Condition: \[your CDT field] **Not equal** to your opt-out value (e.g., "SMS – No")

This ensures Welkin checks the opt-out status before sending any SMS. If the patient has opted out, the SMS will not be sent.

## Notes

* This same pattern can be used for other keywords like "HELP" — trigger a task or alert the care team when received
* As an alternative, the care team can remove the SMS capability from the patient's phone number directly, which blocks all SMS including manual sends
* For A2P registration requirements, see [Twilio A2P](https://github.com/welkincloud-io/welkin-docs/blob/master/kb/integrations/twilio-a2p.md)

## More Questions?

Contact your Implementation or Customer Success Manager at <csm@welkinhealth.com>.


---

# Agent Instructions: 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:

```
GET https://docs.welkinhealth.com/designer/notifications-and-communications/sms-opt-out.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
