> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-unity-sdk-initialization-split.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fuzzy Opt-out

> Learn how MoEngage Fuzzy Opt-Out identifies misspelled or alternative opt-out keywords to help you stay compliant with US FCC regulations for SMS.

<Note>
  This is an Early Access feature. To enable it for your account, please contact your MoEngage Customer Success Manager (CSM) or the Support team.
</Note>

# Overview

The Fuzzy Opt-Out feature in MoEngage helps you comply with the latest U.S. Federal Communications Commission (FCC) regulations for managing SMS subscriptions. This feature improves the accuracy of identifying and processing opt-out requests, even when users enter incorrect, misspelled, or alternative versions of opt-out keywords. It helps prevent sending SMS marketing messages to users who intend to unsubscribe, which protects the user experience and reduces compliance risks. The feature effectively handles common opt-out phrases and certain offensive terms to ensure your campaigns remain user-friendly and compliant.

# Key Highlights

Some of the key highlights of this feature are as follows:

* **New attribute**: A boolean attribute, *Is Fuzzy Match*, has been added to the *SMS Keyword Received* event.
  * When *Is Fuzzy Match* is *True*:
    * The keyword type is stored as *OPTOUT*.
    * The user's subscription status is updated to *OPTOUT*.
* **Advanced keyword detection**: The algorithm handles scenarios involving:
  * Variations in letter casing.
  * Leading or trailing spaces.
  * Common typos, abbreviations, or alternative spellings of opt-out keywords (using fuzzy matching).
* **Offensive language handling**: Messages containing offensive or vulgar language are treated as opt-out requests to avoid offending users with unwanted communication.
* **Error management**:
  * **Missed opt-outs**: Although the algorithm handles many cases, some user inputs intended as opt-outs might not be detected correctly.
  * **Incorrect classifications**: Some messages might be mistakenly classified as opt-out requests because of ambiguous user input.

# How Fuzzy Opt-Out Works

When a user replies to your SMS campaigns, the Fuzzy Opt-Out algorithm processes the message as follows:

* **Direct matching**: The user's message is compared against a predefined list of opt-out keywords. This includes exact matches (for example, STOP or unsubscribe) and variations with different casing or extra spaces (for example, stop or UNSUBSCRIBE).
* **Fuzzy matching for misspelled or varied keywords**: Fuzzy search logic identifies messages with typos or variations. For example, messages like Stahp, Cansel, Unsubcribe, or opt-out are detected as opt-out requests. Messages unrelated to opt-out intent are not detected.
* **Offensive language identification**: Messages with offensive language that users generally do not wish to receive are marked as opt-out requests.
* **Subscription update**: If an opt-out intent is confirmed (through direct or fuzzy matching), the user’s subscription status is updated to *OPTOUT*.

# Behavior Without Fuzzy Opt-Out Enabled

If the Fuzzy Opt-Out feature is disabled, MoEngage only recognizes:

* Exact keyword matches.
* Minor variations, like differences in letter casing or leading and trailing spaces.

Typos, abbreviations, or alternative spellings are not recognized.

## Example Scenarios

The following table shows how different user responses are handled:

| User Response                   | Action Taken | Reasoning                                      |
| ------------------------------- | ------------ | ---------------------------------------------- |
| STOP                            | Opted Out    | Exact match to a predefined opt-out keyword.   |
| stop                            | Opted Out    | Matched keyword; case differences handled.     |
| Stahp                           | Opted Out    | Fuzzy match detected for a typo of Stop.       |
| stopppppppp                     | Opted Out    | Fuzzy match detected for a typo of Stop.       |
| atop                            | Opted Out    | Fuzzy match detected for a typo of Stop.       |
| *Messages containing profanity* | Opted Out    | Explicit offensive term identified as opt-out. |
| Cancel my subscription          | Opted Out    | Contains the opt-out keyword *Cancel*.         |
| "Hey, just opt me out!"         | Opted Out    | Fuzzy matching detected *opt-out*.             |
| HELP                            | No Action    | Non-opt-out keyword detected.                  |
| Hello 😊                        | No Action    | Neutral intent detected (not opt-out).         |

# Compliance Benefits

Some of the compliance benefits are as follows:

* **Enhanced user experience**: Ensures users are removed from campaigns when they express an intent to opt out, even with misspellings or extra spaces.
* **FCC compliance**: Helps meet U.S. regulations requiring businesses to honor opt-out requests promptly and accurately.
* **Risk mitigation**: Reduces the chance of fines and complaints from incorrectly processed or missed opt-out requests.

# Limitations and Considerations

Some of the limitations and considerations are as follows:

* **False negatives**: Some opt-out attempts might be missed if the user's input is ambiguous or uses highly unique phrasing that the algorithm cannot detect.
* **False positives**: Some messages, particularly those with borderline or casual language, might be incorrectly classified as opt-out requests.
* **Custom keyword handling**: Businesses should define additional specific opt-out keywords during setup for unique scenarios.

# Conclusion

The Fuzzy Opt-Out feature is a valuable tool for keeping SMS campaigns compliant, building user trust, and minimizing risks. However, it may not cover every possible case. We recommend periodically monitoring opt-out behavior to identify areas for refinement. Use this feature to keep customers satisfied while staying compliant with regulations.
