> For the complete documentation index, see [llms.txt](https://deco-product-labels-and-badges-1.gitbook.io/deco-guidelines/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deco-product-labels-and-badges-1.gitbook.io/deco-guidelines/our-special-features/priority.md).

# Priority

{% hint style="info" %}
Setting a priority is available on the **Unlimited** plan. The "Hide if products has higher priority badges" checkbox is available from the **Growth** plan.
{% endhint %}

## ✨ How "Priority" Can Help Control Badge Visibility?

### ✔️ Understanding Badge Priority & Visibility

* The Priority setting gives you precise *<mark style="color:$primary;">**control over which badges appear**</mark>* on a product *<mark style="color:$primary;">**when multiple display conditions are met**</mark>* simultaneously.

⇒ This prevents your product images from becoming cluttered and *<mark style="color:$primary;">**ensures your most important marketing messages**</mark>* stand out!

### ✔️ The Priority Scale

The system uses a numerical ranking to determine importance:

* *<mark style="color:$primary;">**0**</mark>* is the *<mark style="color:$primary;">**Highest Priority**</mark>* (appears first/takes precedence).
* Larger numbers (*<mark style="color:$primary;">**1, 2, 3**</mark>*...) represent *<mark style="color:$primary;">**Lower Priority**</mark>*, up to *<mark style="color:$primary;">**100**</mark>* (the lowest).

{% hint style="info" %}
Badges inside the product image and badges outside the product image are ranked separately. An inside badge never hides an outside badge, and vice versa.
{% endhint %}

### ✔️ Key Feature: "Hide if products has higher priority badges"

* The checkbox "Hide if products has higher priority badges." appears only when the badge's priority is greater than 0.
* The first time you change a badge's priority from 0 to a higher number, the checkbox is ticked for you automatically. If you untick it, you'll see a warning: *"Leaving it unchecked means priority order won't apply to this badge."*

⇒ This setting *<mark style="color:$primary;">**determines if a badge should disappear**</mark>* when it "competes" with a more important one.

## ✨ How Priority Logic Works

For each product, DECO checks your badges from the highest priority (0) to the lowest. The first badge that matches the product always displays. Every later badge that also matches is then checked:

* If its *<mark style="color:$primary;">**"Hide..." box is checked**</mark>* **and** its priority number is *<mark style="color:$primary;">**different**</mark>* from the first displayed badge → it is hidden.
* Otherwise → it displays too.

### 1. Badge With Different Priorities

⇒ If *<mark style="color:$primary;">**two badges have different priority numbers**</mark>*, only the *<mark style="color:$primary;">**"Hide..." checkbox**</mark>* of the lower-priority badge matters. The checkbox of the higher-priority badge has no effect here.

* <mark style="color:$primary;">**Lower-priority badge checked**</mark>: The lower-priority badge will be hidden.
* <mark style="color:$primary;">**Lower-priority badge unchecked**</mark>: Both badges will be displayed.

> Example:
>
> * Badge A: "Free Shipping" | Priority: 0 | "Hide..." box: Unchecked.
> * Badge B: "Personalize It" | Priority: 1 | "Hide..." box: Checked.
> * Result: Only "Free Shipping" is displayed because Badge B is set to hide whenever a higher priority (0) is present.

<figure><img src="https://2681927162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2MNif3OucL2KXUvJtdd3%2Fuploads%2Fgit-blob-e7db69396c76210d45f8ed320c4c4b77e80ebe6b%2Fpriority-01.png?alt=media" alt=""><figcaption></figcaption></figure>

### 2. Badges with the Same Priority

| <mark style="color:$primary;">**Scenario**</mark> | <mark style="color:$primary;">**Behavior**</mark>      | <mark style="color:$primary;">**Result**</mark> |
| ------------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------- |
| Both have "Hide" checked                          | The "Hide" rule only triggers for *higher* priorities. | Both badges are displayed.                      |
| Neither has "Hide" checked                        | No hiding rules are triggered.                         | Both badges are displayed.                      |
| Only one has "Hide" checked                       | The "Hide" rule only triggers for *higher* priorities. | Both badges are displayed.                      |

Example: *<mark style="color:$primary;">**Both have "Hide..." checked**</mark>*

* Badge A: "New Arrival". Priority: 1. "Hide" Checked.
* Badge B: "Pre-order". Priority: 1. "Hide" Checked.

⇒ **Result:** Both badges display, because they share the same priority. To show only one of them, give it a smaller priority number.

Example: *<mark style="color:$primary;">**Neither has "Hide..." checked**</mark>*

**⇒ Result:** Both badges display

<figure><img src="https://2681927162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2MNif3OucL2KXUvJtdd3%2Fuploads%2Fgit-blob-29cc887bdf6c6a9db0e31904b576f02ee3304a03%2Fpriority-02.png?alt=media" alt=""><figcaption></figcaption></figure>

Exampl&#x65;**:&#x20;***<mark style="color:$primary;">**Only one has "Hide..." checked**</mark>*

**⇒** **Result:** Both badges display

* The "Hide..." setting only works when comparing badges with *different* priorities

<figure><img src="https://2681927162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2MNif3OucL2KXUvJtdd3%2Fuploads%2Fgit-blob-fed26a1006b7e8f539031e972b679cfd1533204f%2Fpriority-03.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 3. Summary Table

| **Priority Level**                          | **Hide Box Status**  | **Outcome**                                  |
| ------------------------------------------- | -------------------- | -------------------------------------------- |
| First matching badge (smallest number)      | N/A                  | Always displays.                             |
| Higher number than the first matching badge | Checked              | Hidden.                                      |
| Higher number than the first matching badge | Unchecked            | Displays alongside the first matching badge. |
| Same number as the first matching badge     | Checked or unchecked | Displays alongside the first matching badge. |

> Example with 3 badges on the same product:
>
> * Badge A | Priority: 0 | matches the product → displays.
> * Badge B | Priority: 2 | "Hide..." Checked → hidden (A has a higher priority).
> * Badge C | Priority: 2 | "Hide..." Unchecked → displays.
>
> If Badge A's conditions don't match a product, Badge B becomes the first matching badge on that product and displays; Badge C (same priority 2) displays too.

{% hint style="info" %}
Priority only compares badges that actually match the product. A priority 0 badge still needs to meet its own conditions before it can hide other badges.
{% endhint %}
