# Formulation Management

## Overview

Formulation Management in Labii helps teams design, standardize, and control formulations for chemicals, reagents, feed, food, pharmaceutical, and cosmetic products.

The application centralizes ingredient definitions, component composition, formulation constraints, product targets, and production-scale batch execution. This gives R\&D, QA, and production teams a shared source of truth for decision-making and audit readiness.

Use [Labii Formulation Management](https://www.labii.com/products/formulation-management) to move from trial-and-error spreadsheet workflows to structured, traceable, and repeatable formulation processes.

<figure><img src="https://www.labii.com/media/labii-formulation.webp" alt="Formulation Management overview in Labii"><figcaption><p>Design, optimize, and standardize formulations in one platform.</p></figcaption></figure>

## Use Cases

### Feed and Food Formulation

* Balance nutrient targets and ingredient limits for consistent product quality.
* Compare candidate formulations by cost, composition, and feasibility.
* Scale validated recipes into production batches with fewer calculation errors.

### Pharmaceutical and Chemical Product Development

* Track formulation versions from early R\&D to controlled manufacturing.
* Enforce concentration and compatibility constraints before release.
* Preserve complete history for regulatory review and internal quality systems.

### Multi-Team Collaboration

* Allow R\&D to propose formulas while QA validates specifications.
* Enable production teams to execute approved batches using the same dataset.
* Reduce data duplication between ingredient, inventory, and consumption records.

## Getting Started

{% stepper %}
{% step %}
Install the **Formulation Management** application from [Add from a template](https://docs.labii.com/admin-guide/applications#add-from-a-template).
{% endstep %}

{% step %}
Confirm the following core tables are available:

* `fn_vendor`
* `fm_ingredient`
* `fm_component`
* `fm_ingredient_component`
* `fm_formulation`
* `fm_formulation_constraint`
* `fm_formulation_product`
* `core_batch`
* `core_storage`
* `core_consumption`
* `core_container`
  {% endstep %}

{% step %}
Review table permissions and assign the appropriate team roles for R\&D, QA, procurement, and production users.
{% endstep %}

{% step %}
Prepare baseline data for vendors, ingredients, and components before creating your first formulation.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
For best results, standardize units (for example %, mg/kg, or g/L) across components and constraints before optimization.
{% endhint %}

## Workflow: Build Ingredient and Component Data

Create a reliable ingredient dataset before defining formulas.

{% stepper %}
{% step %}
Add vendors in the **Vendors** table (`fn_vendor`) with supplier details and sourcing notes.
{% endstep %}

{% step %}
Add ingredients in **Ingredients** (`fm_ingredient`) with cost, availability, and relevant metadata.
{% endstep %}

{% step %}
Define measurable components in **Components** (`fm_component`) such as nutrients, active compounds, or quality indicators.
{% endstep %}

{% step %}
Map each ingredient to its component profile in **Ingredient Components** (`fm_ingredient_component`) so formulation calculations use normalized composition values.
{% endstep %}
{% endstepper %}

## Workflow: Create and Optimize a Formulation

Define formulation intent and apply technical or regulatory constraints.

{% stepper %}
{% step %}
Create a new record in **Formulations** (`fm_formulation`) and define the target purpose (for example starter mix, pilot lot, or production recipe).
{% endstep %}

{% step %}
Add rule boundaries in **Formulation Constraints** (`fm_formulation_constraint`), including minimums, maximums, and quality or safety limits.
{% endstep %}

{% step %}
Add candidate products or outcomes in **Formulation Products** (`fm_formulation_product`) to evaluate multiple optimization strategies.
{% endstep %}

{% step %}
Run optimization and review feasibility, composition balance, and cost impact before selecting a formulation for execution.
{% endstep %}
{% endstepper %}

<figure><img src="https://www.labii.com/media/labii-formulation-optimization.webp" alt="Optimization workflow"><figcaption><p>Apply constraints and optimization rules to reach feasible target formulations.</p></figcaption></figure>

## Workflow: Scale to Batch and Track Consumption

Convert approved formulations into executable production records.

{% stepper %}
{% step %}
Create batch records in **Batches** (`core_batch`) from approved formulations.
{% endstep %}

{% step %}
Allocate storage and containers through **Storage** (`core_storage`) and **Containers** (`core_container`).
{% endstep %}

{% step %}
Record material usage in **Consumption** (`core_consumption`) to preserve lot-level traceability and inventory impact.
{% endstep %}

{% step %}
Review final batch output and update formulation records for continuous improvement and future optimization runs.
{% endstep %}
{% endstepper %}

<figure><img src="https://www.labii.com/media/labii-formulation-production.webp" alt="Batch scaling and production integration"><figcaption><p>Scale formulations from R&#x26;D to manufacturing with full traceability.</p></figcaption></figure>

## Advanced Features

### Constraint-Driven Compliance

Use constraints to encode nutritional, functional, and regulatory limits directly into formulation logic.

{% hint style="warning" %}
If constraints conflict (for example impossible minimum and maximum targets), optimization may fail. Review units and boundary definitions first.
{% endhint %}

### Cost and Scenario Analysis

Compare alternative formulations using ingredient cost, composition targets, and quality tradeoffs to support data-driven decisions.

### Versioned Collaboration

Use Labii record history and role-based access to support cross-functional approvals between development, quality, and production teams.

{% hint style="success" %}
Create a formal approval checkpoint before batch creation to ensure only validated formulations move into production.
{% endhint %}

## Troubleshooting

### Issue: Optimization returns no feasible formulation

**Symptoms**: No valid result appears after running formulation calculations.

**Solution**:

{% stepper %}
{% step %}
Review all constraint ranges for overlaps or contradictions.
{% endstep %}

{% step %}
Verify ingredient-component mappings and confirm units are consistent.
{% endstep %}

{% step %}
Relax non-critical constraints and rerun optimization to identify the limiting condition.
{% endstep %}
{% endstepper %}

### Issue: Batch totals do not match expected output

**Symptoms**: Production batch values differ from planned formulation values.

**Solution**:

{% stepper %}
{% step %}
Check batch scale factor and base formulation quantity.
{% endstep %}

{% step %}
Review container, storage, and consumption records for manual overrides.
{% endstep %}

{% step %}
Confirm the correct formulation version was used for batch generation.
{% endstep %}
{% endstepper %}

### Issue: Team members cannot edit formulation records

**Symptoms**: Users can view but cannot update ingredients, constraints, or products.

**Solution**:

{% stepper %}
{% step %}
Verify role permissions for relevant tables in application settings.
{% endstep %}

{% step %}
Check project/team membership and record-level access controls.
{% endstep %}

{% step %}
If signatures or approvals are required, complete the pending approval workflow before editing.
{% endstep %}
{% endstepper %}
