> For the complete documentation index, see [llms.txt](https://help.accentuate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.accentuate.io/use-case-guides/food-and-beverage/allergens-metafield.md).

# Allergens Metafield

### Prerequisites

Before you begin, make sure you have:

* An active Shopify store
* Accentuate Custom Fields installed from the Shopify App Store
* Staff permissions to access Apps in your Shopify admin
* (Recommended) An Online Store 2.0 theme, which allows metafield values to be displayed via the theme editor without touching code

***

### Key Concepts to Know First

Scope — The Shopify object the metafield attaches to. For Allergens, this will be Products.

Namespace & Key — The unique identifier for your field. The namespace groups related fields (e.g. custom) and the key is the specific field name (e.g. allergens). Together they form custom.allergens, which is the address used in your theme to pull the value.

Field Data Type — Controls what kind of data the field holds. For Allergens, a Multi Select is strongly recommended. A single food or beverage product can contain multiple allergens simultaneously — for example, a cookie might contain milk, eggs, wheat, and tree nuts all at once. Multi Select allows all present allergens to be tagged clearly and prominently, which is critical for customer safety and regulatory compliance.

***

### Step-by-Step Guide

Step 1 — Open ACF from your Shopify Admin Go to your Shopify Admin, click Apps in the left sidebar, and open Accentuate Custom Fields. You'll land on the ACF dashboard, which shows the Metafields and metaobjects section with cards for Products, Shops, Metaobjects, and Customers.

Step 2 — Open Product Metafields In the Products card, click the Metafields button. This takes you into the Product Custom Fields screen where you can see all existing fields listed with their types and manage your definitions.

Step 3 — Add a New Section Click the + Add section button in the top-right area of the Product Custom Fields screen. An Add Section modal will open across two pages.

Page 1 — Basic Details:

* Title: Allergens — displayed in bold as a visual header when editing product values (1–50 characters, no HTML)
* Name: allergens — must be unique within your Product fields (3–64 characters, letters, digits, underscores or dashes only)
* Description: Optionally add a note like All allergens present in this product, including major allergens and may-contain warnings — supports Markdown
* Color: Choose a contrasting, attention-grabbing colour (e.g. red or orange) to visually alert your team that this is safety-critical information — do not leave as default
* All fields in this section apply to: Leave as All types unless you want to restrict this to specific product types
* Make visible to the Storefront API: Leave checked (default) — this makes allergen values accessible in themes where they must be prominently displayed for safety

Click Next to continue.

Page 2 — Advanced Settings:

* Repeatable section: Leave unchecked — allergens are a single set of values per product, not a repeating block.
* Include value of first text field: Leave unchecked — not needed for a select-type field.
* Show as collapsed when editing: Leave unchecked — NEVER collapse this section. Keep Allergens expanded by default so your team always sees allergen information when editing a product.
* Hide section: Leave unchecked — NEVER hide this section. Allergen information is critical for customer safety.
* Show section even if empty: Check this — allergens should always be visible on every product edit page, even if none have been assigned yet. This reminds your team that every product should be evaluated for allergen content.
* Exclude from layout: Leave unchecked — allergen information must always be accessible in the editor.

Click Done to save the section.

Step 4 — Add the Allergens Field Once the section is saved, click + Add field to add the actual field inside it. Fill in the details:

* Label: Allergens
* Namespace: accentuate (ACF's default, or use your own e.g. food)
* Key: allergens
* Field Data Type: Select Multi Select — this allows multiple allergens present in the product to be tagged simultaneously

Step 5 — Add Your Allergen Options Once Multi Select is chosen, add each allowed value one by one:

Major Allergens (Top 14):

* Milk / Dairy
* Eggs
* Fish
* Crustaceans / Shellfish
* Tree Nuts
* Peanuts
* Sesame / Tahini
* Soy
* Wheat / Gluten
* Celery / Celeriac
* Mustard
* Sulphites / Sulfites
* Lupin
* Molluscs

Other Common Allergens:

* Corn
* Seeds (Sunflower, Pumpkin, etc.)
* Coconut
* Buckwheat
* Legumes
* Casein
* Whey
* Yeast
* Alcohol
* Caffeine

May Contain / Cross-Contamination Warnings:

* May Contain: Milk
* May Contain: Eggs
* May Contain: Fish
* May Contain: Shellfish
* May Contain: Tree Nuts
* May Contain: Peanuts
* May Contain: Sesame
* May Contain: Soy
* May Contain: Wheat
* Processed in Facility with Milk
* Processed in Facility with Nuts
* Processed in Facility with Gluten
* Processed on Shared Equipment

Add, remove, or rename options at any time — existing product values are preserved when you edit the list.

Step 6 — Save Click Save. Your Allergens field will now appear inside its section on every product edit page in your Shopify admin, prominently displayed to remind your team that allergen safety is critical.

***

### Populating Allergen Values on Products

One by one: Open any product in Shopify Admin, scroll to the Allergens section added by ACF, select all allergens present in the product from the multi-select dropdown, and save. This is the most critical method — every product must be individually reviewed for allergen content by someone with access to accurate product information.

CSV import: Use the Export button to download a CSV template, fill in the allergens column for each product row (separate multiple values with the delimiter shown in the template), then re-import via the Import button. Only use this method when importing data from verified supplier information or official product documentation.

***

### Displaying Allergens on Your Storefront

Theme Editor (no code, OS 2.0 themes): Go to Online Store → Themes → Customize. Open a product template, click Add Block, select an ACF or Metafield block, choose the Allergens field, position it PROMINENTLY on the page — ideally above the fold and clearly visible — and save. Allergens should always display by default and never be hidden in collapsed sections without a clear "Allergen Warning" label.

Liquid Code (all themes): Add this to your product template file, positioned PROMINENTLY (ideally in the product header or early product details section):

`{% if product.metafields.custom.allergens %}`

&#x20; `<div class="allergens" style="background-color: #ffe6e6; border: 3px solid #cc0000; padding: 15px; margin: 20px 0; border-radius: 4px;">`

&#x20;   `<strong style="color: #cc0000; font-size: 1.1em;">⚠️ ALLERGEN WARNING:</strong>`

&#x20;   `<p style="color: #cc0000; margin: 10px 0 0 0; font-weight: bold;">`

&#x20;   `{% for allergen in product.metafields.custom.allergens.value %}`

&#x20;     `{{ allergen }}{% unless forloop.last %} | {% endunless %}`

&#x20;   `{% endfor %}`

&#x20;   `</p>`

&#x20; `</div>`

`{% endif %}`

If you used a custom namespace (e.g. food), replace custom with your namespace name.

***

### Tips & Best Practices

* This is a safety-critical field — treat it as such — allergen information directly impacts customer health and safety. Every product must be verified for allergen content by someone with access to accurate product information (ingredient label, supplier documentation, or manufacturer data).
* Never skip allergen verification — before a product goes live on your store, it must have allergen information documented. Never assume a product is allergen-free; always verify against the product label.
* Copy from the product label — always source allergen information from the official product label or manufacturer's documentation. Never guess or estimate.
* Include both "Contains" and "May Contain" — tag both allergens that are definitely present in the product AND allergens that may be present due to cross-contamination or shared equipment. Both are critical for customer safety.
* Display allergens prominently and visually — use a distinct, high-contrast color (red or orange background) and bold text to make allergens impossible to miss. Allergens should NEVER blend into regular product information.
* Make allergens filterable — connect allergens as a filter in Online Store → Navigation → Filter menus. Customers with severe allergies should be able to filter OUT products containing their allergen with a single click.
* Keep allergen tags consistent — decide on standard naming (e.g., "Milk / Dairy" vs. "Dairy", "Tree Nuts" vs. "Nuts") and apply it uniformly. Consistency is critical for filtering to work correctly.
* Distinguish between different allergen types — as shown in Step 5, separate major allergens from "may contain" warnings so customers understand the difference between definite presence and cross-contamination risk.
* Include allergen information in product titles or descriptions — if a product contains a major allergen, consider including that in the product title or first line of the description so customers see it immediately, even before scrolling.
* Update immediately when formulations change — if a supplier changes the ingredients or manufacturing location of a product, update the allergen tags immediately. Product changes can happen without notice, so monitor supplier communications closely.
* Train your team on allergen safety — ensure everyone on your team who edits products understands the critical importance of accurate allergen tagging. Mistakes can have serious health consequences.
* Keep a master allergen log — maintain an internal document listing all allergen information for each product, sourced from official labels or supplier sheets. Update this regularly and use it as your source of truth.
* Review for completeness regularly — periodically review all your products to ensure every single one has allergen tags documented. Missing allergen information is worse than any other gap in your product data.
* Avoid the shopify namespace — it is reserved by Shopify and can cause conflicts. Use custom or a brand-specific name like food.
* Multi-language stores — ACF supports translatable metafields. Mark Allergens as translatable if you serve international markets where allergen naming conventions differ by region.
* Comply with local regulations — allergen labeling is heavily regulated. Ensure your allergen tags comply with local requirements (FDA in the US, EFSA in Europe, CFIA in Canada, etc.).

***

### Quick Reference

| Setting          | Value                                                                                                                                                         |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Scope            | Products                                                                                                                                                      |
| Section Title    | Allergens                                                                                                                                                     |
| Section Name     | allergens                                                                                                                                                     |
| Field Label      | Allergens                                                                                                                                                     |
| Namespace        | custom                                                                                                                                                        |
| Key              | allergens                                                                                                                                                     |
| Full Identifier  | custom.allergens                                                                                                                                              |
| Field Data Type  | Multi Select                                                                                                                                                  |
| Options          | Milk, Eggs, Fish, Shellfish, Tree Nuts, Peanuts, Sesame, Soy, Wheat, Celery, Mustard, Sulphites, Lupin, Molluscs, May Contain variants, and more (see Step 5) |
| Storefront API   | Enabled (checked by default)                                                                                                                                  |
| Liquid Reference | {{ product.metafields.custom.allergens.value }}                                                                                                               |
| CRITICAL         | Never leave empty without verification; every product must be evaluated                                                                                       |
| CRITICAL         | Keep section expanded and visible; never hide allergen information                                                                                            |
| Display          | Use red/orange background and bold text; make allergens impossible to miss                                                                                    |
| Safety           | Always copy from product label; never guess or assume                                                                                                         |

***

For further details, visit the official ACF documentation at help.accentuate.io

<br>


---

# 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://help.accentuate.io/use-case-guides/food-and-beverage/allergens-metafield.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.
