> For the complete documentation index, see [llms.txt](https://mpithemes.gitbook.io/triumph/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mpithemes.gitbook.io/triumph/customizable-features/custom-badges.md).

# Custom badges

Custom badges appear for product cards and on Product pages.

Follow the listed steps to customize badges in your store:

> 1\. Go to *Shopify admin -> Settings -> Metafields and metaobjects -> Metaobject definitions* and press the '*Add definition*'.

<figure><img src="https://4126621502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpREZeVZogNLjx09og4O%2Fuploads%2FkVAhc5IYVIN5RhZsBTVL%2Fadmin_metaobjects.png?alt=media&amp;token=3923d934-6c32-4d67-bf97-d552173f7302" alt="" width="563"><figcaption></figcaption></figure>

> 2\. Create a new metaobject with the parameters:
>
> Name: **Badge**
>
> In the '*Fields*' block, press '*Add field*' and create 3 fields:
>
> * 1st fied - **Title** - **One value** - **Singel line text**
> * 2nd field - **Background** - **One value** - **Color**
> * 3d field - **Text** - **One value** - **Color**

<figure><img src="https://4126621502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpREZeVZogNLjx09og4O%2Fuploads%2FxdctikNJOr9PWsRBUAne%2Fmetaobject_badge.png?alt=media&amp;token=0a41a174-1c1a-40a8-b6e7-879e6ee9db15" alt="" width="563"><figcaption></figcaption></figure>

> 3\. In the '*Metafield definitions*' block, press '*Products*'.

<figure><img src="https://4126621502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpREZeVZogNLjx09og4O%2Fuploads%2FeCQNhUvSs9Gl8TPen4kV%2Fadmin_metafields.png?alt=media&amp;token=fcc9c4e2-bd43-47a6-9c31-93afbc5dddb6" alt="" width="563"><figcaption></figcaption></figure>

> 4\. Then, hit the '*Add definition*' at the top right and create a new metafield definition with the following parameters:
>
> * Name: **custom.product\_badges**
> * Value: **List**
> * Select type: **Metaobject** -> **Badge**

<figure><img src="https://4126621502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpREZeVZogNLjx09og4O%2Fuploads%2FkIGEdcThR28x4RzXrzr1%2Fmetafield_badge.png?alt=media&amp;token=30e4d965-f89d-4d07-8fd7-b01610bf62db" alt="" width="563"><figcaption></figcaption></figure>

> 5\.  In *Content -> Metaobjects*, select the created definition.

<figure><img src="https://4126621502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpREZeVZogNLjx09og4O%2Fuploads%2FeZNcullf5ULen2cVblnL%2Fadmin_definition.png?alt=media&amp;token=551a0fc6-d695-427a-9d99-32da16082e01" alt="" width="563"><figcaption></figcaption></figure>

> 6\. In the top righ corner, press the '*Add entry*' and create a new entry per a badge.

<figure><img src="https://4126621502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpREZeVZogNLjx09og4O%2Fuploads%2FjrngAe2SMyipXnHFNNbR%2Fadmin_badge%20entry.png?alt=media&amp;token=076beee1-928c-4e0a-bf29-ce1a4af53bf1" alt="" width="563"><figcaption></figcaption></figure>

> 7\. Go to 'Products' -> select a product and assign a metafield to a product.\
> *Note: Link a badge to each desired product.*

<figure><img src="https://4126621502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpREZeVZogNLjx09og4O%2Fuploads%2FPK3hW9O5Ue1OEO4V1ix3%2Fadmin_product%20badge.png?alt=media&amp;token=cda23149-c300-483c-a77e-6b2b3be95a44" alt="" width="563"><figcaption></figcaption></figure>

**Example:** Badges in product cards

<figure><img src="https://4126621502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpREZeVZogNLjx09og4O%2Fuploads%2FqzpUayODIwqN58cia6PB%2Fcustom%20badges_product%20cards.png?alt=media&amp;token=3fb8ee15-f138-47da-9d9e-7c03a27d2060" alt=""><figcaption></figcaption></figure>


---

# 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, and the optional `goal` query parameter:

```
GET https://mpithemes.gitbook.io/triumph/customizable-features/custom-badges.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
