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

# Rule builder

> Set up automated moderation rules in the console that block, flag, hide, or delete content and mute or ban users, without reviewing every item by hand

Rule builder lets you turn your community guidelines into rules that run on their own, around the clock. Each rule reads as a sentence: **when** a post, comment, message, or user matches these conditions, **then** take this action. You can limit a rule to certain members, such as accounts less than 7 days old, members with a specific role, or members who were reported recently. You can also try a rule in test mode to see what it would catch, and switch it on once you trust it. Your team then spends its time on the moderation feed instead of on clear-cut cases.

> [!NOTE]
>
> Conditions that use AI (harm categories, personal information, and topic detection) need the AI Moderation add-on. Contact social.plus support to enable it.

## Before you start

Open **Moderation → Rule builder** in the console sidebar. What you can do depends on your admin role:

| Your role includes | You can |
| - | - |
| **Can view moderation feed** | See the rule list, open a rule's details, and read its activity. |
| **Can manage moderation settings** | Also create, edit, duplicate, switch on or off, and delete rules. |

If you can't see **Create rule**, ask an admin to add **Can manage moderation settings** to your role. See [Admin access control](https://learn.social.plus/analytics-and-moderation/console/management/admin-access-control.md).

## The parts of a rule

| Part | What you choose |
| - | - |
| **Target** | What the rule watches: **Posts and comments**, **Messages**, or **Users**. You can't change it after the rule is created. |
| **Conditions** | What has to match, and optionally who posted it. |
| **Action** | What happens on a match, such as **Flag for review** or **Delete**. |
| **Status** | **Active**, **Test mode**, or **Inactive**. |

### Status

| Status | What happens |
| - | - |
| **Active** | The rule takes its action on every match. |
| **Test mode** | The rule records what it would have done but takes no action. Members notice nothing. Every new rule starts here. |
| **Inactive** | The rule is off. It doesn't act or record anything. |

A status change takes effect right away. When you switch a rule from test mode to Active, it acts on new matches only.

> [!TIP]
>
> Leave a new rule in test mode for a day or two. Check its **Activity** tab, and switch it to **Active** only when the matches are what you expected.

## Example rules

| Goal | Target | Conditions | Action |
| - | - | - | - |
| Stop new accounts from posting banned words | Posts and comments | Contain text from the blocklist **AND** Author account age is less than 7 days | Block creation |
| Pull hateful posts out of feeds until someone reviews them | Posts and comments | Contains text that matches an AI harm category (Hate) | Flag then hide post from feed |
| Slow down spammers | Users | Create posts or comments 10 or more times within 5 minutes | Mute user globally for 1 hour |
| Don't let reported posts sit in feeds for days | Posts and comments | Remain flagged and unreviewed beyond 48 hours | Flag then hide post from feed |
| Remove members who keep getting reported | Users | Receives flags or reports on their contents 5 or more times within 24 hours | Ban user globally |

## Conditions

There are two kinds of conditions:

* **What was posted**: for example, words from your block list, an AI harm category, or a topic. Every rule needs at least one.
* **Who posted it**: account age, role, or recent reports. These narrow a rule to certain members. They can't start a rule on their own. You add them with **Add author condition** (**Add sender condition** for messages, **Add user condition** for users).

> [tab] Posts and comments
>
> **What was posted**
>
> | Condition | You set |
> | - | - |
> | Contain text from the blocklist | Nothing. Uses the words on **Moderation → Block list**. |
> | Contain a link not on the allowlist | Nothing. Uses the links on **Moderation → Allow list**. |
> | Contain personally identifiable information (PII) | Nothing. AI looks for personal information in the content. |
> | Contain text that matches a topic detection | Topics and a likelihood. See [Topic detection](https://learn.social.plus/analytics-and-moderation/console/moderation/topic-detection.md). |
> | Contains a video that matches a topic detection | Topics and a likelihood |
> | Contains text that matches an AI harm category | Categories and how strict to be. See [AI harm categories](#ai-harm-categories). |
> | Contains image that matches an AI harm category | Categories and how strict to be |
> | Contains video that matches an AI harm category | Categories and how strict to be |
> | Remain flagged and unreviewed beyond a set time | 6, 12, 24, or 48 hours. This must be the only condition in the rule. |
>
> **Who posted it (Author)**
>
> | Condition | You set |
> | - | - |
> | Account age | At least, or less than, 1, 3, 7, 14, or 30 days |
> | Role | Is, or is not, one or more of your roles |
> | Receives flags or reports on their content within a time window | A number from 1 to 1000, within 24 hours, 7 days, or 30 days |

> [tab] Messages
>
> **What was sent**
>
> The same conditions as posts and comments, except **Contains a video that matches a topic detection**, which isn't available for messages.
>
> **Who sent it (Sender)**
>
> Account age, Role, and recent flags or reports, set the same way as for posts and comments.

> [tab] Users
>
> **What the user did**
>
> | Condition | You set |
> | - | - |
> | Display name or bio contains a word from the profile blocklist | Nothing. Checked when someone signs up or edits their profile. |
> | Display name or bio matches an AI harm category | Categories and how strict to be |
> | Profile photo matches an AI harm category | Categories and how strict to be |
> | Create posts or comments N or more times within a fixed window | A number from 1 to 1000, within 5, 15, 30, or 60 minutes |
> | Send messages N or more times within a fixed window | A number from 1 to 1000, within 5, 15, 30, or 60 minutes |
> | Receives flags or reports on their contents within a time window | A number from 1 to 1000 across their posts, comments, and messages, within 24 hours, 7 days, or 30 days |
>
> You can't combine the posting or messaging limit with the reports condition in one rule. Create two rules instead.
>
> **Who the user is (User)**
>
> Account age and Role.

### Combining conditions

* With two or more conditions, choose **AND** to require all of them or **OR** to match any one.
* You can add up to five conditions, and each one only once per rule.
* "Who posted it" conditions always combine with AND.

### AI harm categories

AI harm conditions check text, images, video, display names, bios, and profile photos for harmful content. Text categories are Hate, Sexual, Violence, Self harm, Harassment, Illicit, Scam, and Profanity. The image categories you see depend on the AI moderation set up for your network.

For each category you choose how strict to be. Depending on your network, the editor shows one of these:

| You see | How to read it |
| - | - |
| **Minimum severity** (Minimal, Low, Moderate, High) | The rule matches content at the level you pick or higher. Pick a lower level to catch more. |
| **Severity thresholds** from 0 to 7 (text) | The rule matches content scored at your number or higher. The default is 4. Lower numbers catch more. |
| **Confidence thresholds** from 0 to 100 (images and video) | The rule matches content scored at your number or higher. The default is 60. Lower numbers catch more. You can start from a preset such as **Violence or Threatening Content**. |

> [!NOTE]
>
> Your rules decide which AI harm categories and thresholds flag, hide, or delete published content.

## Actions

| Action | Available for | What happens |
| - | - | - |
| **Block creation** (**Block from send** for messages) | All targets | The post, comment, message, or profile change is never published. The member sees that it wasn't posted. |
| **Flag for review** | Posts and comments, Messages | The item goes to the [moderation feed](https://learn.social.plus/analytics-and-moderation/console/user-and-content-management/mod-feed.md) and stays visible until you act. |
| **Flag then hide post from feed** | Posts and comments | The post goes to the moderation feed and disappears from every feed. Its author can still see it on their profile. Works on posts only; comments aren't affected. |
| **Delete** | Posts and comments, Messages | Members no longer see the item. You can still find it in the console, but you can't restore it. |
| **Flag user for review** | Users | The user goes to the moderation feed's **Users** tab. |
| **Mute user globally** | Users | For 1 hour, 24 hours, 7 days, 30 days, or until you unmute them, the user can't post, comment, react, or send messages. They can still read, join, vote, and report. |
| **Ban user globally** | Users | The user is signed out and can't use your community until you lift the ban. |

The editor only offers actions that fit your conditions. If an action is greyed out, one of your conditions doesn't support it:

* **Block** works only with block list, allow list, profile block list, and posting or messaging limits. See [When rules act](#when-rules-act).
* **Remain flagged and unreviewed beyond a set time** can hide or delete posts and comments, or delete messages.
* AI checks on display names, bios, and profile photos can only flag the user.
* Posting and messaging limits can block, flag the user, or mute them.
* **Receives flags or reports on their contents** (Users) can mute or ban.

When you flag, you can add a **Flag description**. Other actions take an optional **Reason**. Both are up to 300 characters and show next to the item in the moderation feed, so write something your team will understand later.

## Create a rule

**1. Start a new rule**

Go to **Moderation → Rule builder** and select **Create rule**.

**2. Pick the target**

Choose **Posts and comments**, **Messages**, or **Users**. Changing the target clears the conditions and action you entered.

**3. Name the rule**

Give the rule a name your team will recognize (up to 150 characters) and, if useful, a description (up to 500 characters).

**4. Add conditions**

Choose a condition and fill in its settings. Select **Add condition** for more, and choose **AND** or **OR**. Add "who posted it" conditions if the rule should apply only to some members.

**5. Choose the action**

Pick what should happen on a match.

**6. Choose the status and save**

Choose **Test mode**, **Active**, or **Inactive**, then select **Create rule**.

If you save an Active rule that deletes, mutes, or bans, the console asks you to confirm, because it starts acting right away.

### If the rule won't save

| Message | What to do |
| - | - |
| A rule with this name already exists. | Choose another name. Names are compared without regard to capital letters. |
| An identical rule already exists | Another rule already does exactly this. Select **View existing rule** to open it. |
| Conflicting rule | Another rule has the same conditions with a different action. Change the action or the conditions, or edit the other rule. |

## Manage your rules

The rule list shows each rule's name, target, conditions, action, **Triggered** count, and status. **Triggered** is how many times the rule acted, or for a test-mode rule, how many times it would have. Search by the start of a rule name, filter by target or status, and sort by **Triggered** to find your busiest rules.

From a rule's **⋯** menu you can:

* **View rule details**: read the rule as a sentence and see its **Activity**.
* **Edit rule**: change anything except the target.
* **Duplicate rule**: start a new rule from a copy. The copy opens in test mode with ` - 1` added to the name. Change its conditions or action before saving.
* **Set rule as**: switch between Active, Test mode, and Inactive.
* **Split image and video rules**: shown for older rules that check images and videos together. Creates one rule for images and one for videos with the same settings.
* **Delete rule**: stop the rule. Anything it already did stays done, and its records are kept.

### Activity

The **Activity** tab shows the last 100 times the rule matched: who, what, and what happened (for example **Flagged**, **Deleted**, **Blocked**, or **Matched, no action taken** in test mode). Select **View post**, **View comment**, **View conversation**, or **View user history** to open the item.

## When rules act

* **Before publishing**: block list, allow list, profile block list, and posting or messaging limits are checked as a member posts. This is the only point where a rule can block an item.
* **Just after publishing**: AI harm, personal information, and topic checks usually finish within seconds for text and images. Video takes longer. These rules can flag, hide, or delete, but not block.
* **Later**: **Remain flagged and unreviewed** acts when the time is up. The Users condition **Receives flags or reports on their contents** acts when the count is reached.

When several rules match the same item, the strictest action wins. For example, Delete beats Flag, and a ban beats a mute. A rule flags an item only once. If you clear the flag and the member edits the item so it still matches, the rule flags it again.

> [!NOTE]
>
> A new post can disappear from feeds the moment it's published, before the rule's action shows in the console. This happens when an Active rule that hides or deletes matches on block list, allow list, or "who posted it" conditions. The post then gets hidden or deleted as the rule says. Rules with AI or topic conditions don't do this.

## Review what rules did

Items a rule acted on appear in the [moderation feed](https://learn.social.plus/analytics-and-moderation/console/user-and-content-management/mod-feed.md) as **Flagged by moderation rule**, with the reason, such as **Text matched an AI harm category** or **Text matched a topic detection**. Select **View trigger details** to see the rule as it was when it acted.

To undo a rule's action, use the usual moderation tools: **Unhide post**, clear the flag, lift the mute or ban, or reset the user's profile.

## Block list and allow list

* The block list and allow list apply to posts, comments, and messages only through rules. The **Block list** and **Allow list** pages show a banner naming the condition to use.
* Stories and image alt text still use the block list and allow list directly.

## When AI moderation is off

If the AI Moderation add-on is off, AI conditions are locked in the editor, and affected rules show a notice under their name:

| Notice | What it means |
| - | - |
| Not running: AI moderation is off for this network. | The rule needs AI to match, so it does nothing. |
| Running without its AI conditions: AI moderation is off for this network. | The rule uses OR, so its other conditions still work. |
| Not running: a feature its conditions need is off for this network. | The rule uses personal information or topic detection, which isn't enabled. |

## Related

> [card] [Topic detection](https://learn.social.plus/analytics-and-moderation/console/moderation/topic-detection.md)
>
> Create the topics your rules look for

> [card] [Moderation feed](https://learn.social.plus/analytics-and-moderation/console/user-and-content-management/mod-feed.md)
>
> Review what your rules flag

> [card] [AI content moderation](https://learn.social.plus/analytics-and-moderation/console/ai-content-moderation.md)
>
> How AI checks text, images, and video

> [card] [Global mute](https://learn.social.plus/analytics-and-moderation/console/user-and-content-management/global-mute.md)
>
> See and lift global mutes


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.