> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/badges-and-labels/create-dynamic-text-label.md).

# Create Dynamic text Label

#### **Steps to manage**&#x20;

Currently, the app is having the available variables for the text badges or labels:

```html
{product_vendor}
{product_type}
{product_sku}
{inventory}
{sale}
{sale_amount}
{countdown}
{product_variant_count}
{customer_order_total}
{customer_spent_total}
```

These variables are used to create a dynamic badge/label which auto shows correct value of the product stock/sale price in the label/badge.&#x20;

Step to manage

1. From the app admin page, click **Badges and Labels.**
2. Click on the **Create badge** button > Select badge type: **Text**

<figure><img src="/files/3k8Pksl0PnwWTmDdEa7L" alt=""><figcaption></figcaption></figure>

3. In the **Design** tab, navigate the **Content** section > Click on the **Insert Dynamic Text** button.&#x20;

<figure><img src="/files/SpKHs2otUxIDlSjnmVPC" alt=""><figcaption></figcaption></figure>

> Example: Create a Label showing sale percentage value of your products&#x20;

There is a list of variables shows up as below.&#x20;

Since we need to create a sale label, we will use the variable: **{sale}** or **{sale\_amount}**&#x20;

{% hint style="info" %}
{sale} = sale percentage off

{sale\_amount} = sale amount off
{% endhint %}

Click **Copy** to copy the variable and paste it to the **Badge content field**:

<figure><img src="/files/v1hwBYa5flozxgvqsJrL" alt=""><figcaption></figcaption></figure>

4. Freely add more texts to make the badge content meaningful:&#x20;

<figure><img src="/files/5OOWWjp8tbx2gU5T7E26" alt=""><figcaption></figcaption></figure>

5. Finish the design for the label and assign it to products.&#x20;

<figure><img src="/files/nZjQJMxYQGaqbukjg5sY" alt=""><figcaption></figcaption></figure>

6. Click **Save** to complete the label and check the result in the front store.&#x20;

{% hint style="info" %}
If you set the condition to All products, but not all products have the sale price, enable this setting to auto-hide the label from non-sale products:

{% endhint %}

<figure><img src="/files/nSCdjSUFutzL9Gj9jDtK" alt=""><figcaption></figcaption></figure>

> ### **Need support?**
>
> If you do encounter any difficulty while proceeding these steps, don’t show any hesitation to contact us promptly via the email address [support@samita.io](https://help.samita.io/support@samita.io)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.samita.io/badges-and-labels/create-dynamic-text-label.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.
