# Processing Rules

### Processing Rules and Widget Display

Purposes displayed in your widgets may be pre-selected based on **processing rules** configured in the Configuration Tree. Processing rules allow you to set default consent states for purposes before users make their first explicit choice.

#### Opt-out rule

When a purpose has the `opt-out` processing rule enabled:

* The purpose appears **pre-selected** (enabled) when a user first visits the widget
* Users can still change the selection before submitting
* The pre-selection applies to all widget types
* Once a user submits their preferences, their explicit choices always take precedence over processing rules

**Input Type Behavior**

The visual appearance of pre-selected purposes depends on the input type:

* **Checkbox**: Appears checked by default but remains clickable
* **Radio buttons**: The "Yes" option is pre-selected
* **Click-to-change sentence:** Displays the sentence corresponding to the enabled state

**Implementation Notes**

When implementing widgets with processing rules:

* Widget SDK methods like `getCurrentUserStatus()` and `isConsentPurposeEnabled()` will reflect the pre-selected state from processing rules
* `setCurrentUserStatus()` can be used to override processing rules programmatically
* Processing rules only affect users who have not previously submitted preferences for a specific purpose

For comprehensive information about processing rules configuration and setting them up via our console or API, see [Processing Rules in Configuration Tree.](/api-and-platform/data-manager/configuration-tree.md#processing-rules)


---

# 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://developers.didomi.io/api-and-platform/widgets/privacy-widgets/launch-from-a-mobile-app.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.
