Skip to content

Configure purchase-order constraints

Elevate plan

This guide shows the shortest practical setup for dynamic constraints. The key idea is: store product- or variant-specific numbers as attributes, assign semantic roles once, then use one reusable rule in Constraint Studio.

  • Your shop is on the Elevate plan.
  • The PO constraint engine is enabled in Settings -> Purchase Orders -> Constraints.
  • Products and supplier-variant links already exist for the supplier you want to test.
  • For optimizer runs, the PO is in Draft or Sent status.

Example 1: Product MOQ with minimal modeling

Section titled “Example 1: Product MOQ with minimal modeling”

Use this when a product has one MOQ shared by all of its variants. Example: a product has Red/S/M and Red/L variants, and the supplier requires at least 100 total units across the product.

Open Settings -> Products -> Attribute Definitions and add:

  • Attribute name: Product MOQ
  • Type: Number
  • Level: Product
  • Constraint role: Product MOQ
  • Shopify Metafield Link: leave empty unless you already maintain this value in Shopify
Product MOQ attribute definition form
Product MOQ is a product-level Number attribute with the Product MOQ role.

Open the product or Product Settings value table and fill the Product MOQ number for each product that should be checked. Products without a value will produce a missing-data reason instead of silently passing.

Open Settings -> Purchase Orders -> Constraints. The Product MOQ readiness chip should be mapped. If it is not mapped, the Product MOQ attribute either has no role, uses the wrong type, or has not been saved.

Constraint Studio readiness chips with Product MOQ mapped
Readiness chips keep the setup small: one mapped role can feed many rules.

Click Add rule and choose Product MOQ.

Bind the fields like this:

Rule fieldRecommended binding
Product identity fieldProduct ID / line_item.productId
Ordered units fieldOrdered quantity / line_item.quantityOrdered
Product MOQ fieldProduct MOQ

Keep the scope as Supplier if the rule should apply only to selected suppliers. Use General only when every supplier should follow the same product-MOQ logic.

Product MOQ preset configured in Constraint Studio
The rule groups PO lines by product, sums ordered units, and compares each product to its Product MOQ field.

Preview the rule against a real PO. Logistified groups PO lines by product, sums the ordered units across all variants of that product, then compares that sum to the product’s MOQ value. For example, two variants ordered as 10 + 5 units fail when the product MOQ is 20.

Save the settings, then open the PO detail page. The line-item constraint badges and purchase-order hints should reflect the rule. Running the optimizer in Fill gaps can increase existing lines or add eligible supplier variants until the product-level gap is closed.

Purchase order with failing Product MOQ badges on two variants of the same product
Both variant rows are marked because the Product MOQ rule checks the product total, not each line separately.

Use this when a supplier or container should not exceed a total volume.

Open Settings -> Products -> Attribute Definitions and add:

  • Attribute name: Unit CBM
  • Type: Number
  • Level: Variant or Product, depending on how you store volume
  • Constraint role: Unit CBM

Enter a CBM value for each relevant product or variant.

Open Settings -> Purchase Orders -> Constraints, click Add rule, and choose PO max CBM.

Configure:

Rule fieldRecommended value
Unit CBM fieldUnit CBM
Maximum CBMYour cap, for example 65
ScopeSupplier if only one supplier/container flow needs the cap
Optimizer targetOn if the cap should constrain optimizer suggestions
PO max CBM preset configured with Unit CBM and a maximum threshold
CBM rules multiply ordered quantity by the Unit CBM field and compare the PO total to the threshold.

If a PO is over the cap, badges and hints show the violation. In Fill gaps mode the optimizer cannot reduce quantities, so it will avoid additive plans that make hard target caps worse, but it will not remove existing lines. Reduce/remove planning remains locked until Rebalance is available.

Using Data Modeling instead of Product Settings

Section titled “Using Data Modeling instead of Product Settings”

Use Data Modeling when the field belongs to a custom table or when you need a linked row, such as a packaging profile or buying family. In Data Modeling:

  1. Create the table and fields.
  2. Add rows and values.
  3. Assign the relevant constraint role to the field.
  4. Save the data model.
  5. Return to Constraint Studio and bind the mapped role.

Data Modeling can also create managed Linked table row attributes in Product Settings. Those managed attributes are visible there, but they are edited from Data Modeling.

Open a Draft or Sent PO and click Optimize. Choose Fill gaps, review the status, reasons, and actions, then click Apply Plan and confirm.

Constraint optimizer plan with increase actions and status reasons
The optimizer explains what it can fix, what remains open, and why each action was selected.

After apply, Logistified refreshes the PO and reevaluates constraints. Sync to Shopify remains a separate lifecycle/sync action.

SymptomLikely causeFix
Product MOQ is not suggested in the ruleThe attribute is not Product level, not Number type, or has no Product MOQ role.Edit the attribute definition and save it.
Readiness role is still missingA Data Model mapping or attribute role was not saved, or another field already owns the role.Save/reload the settings page and check duplicate roles.
Preview says required data is missingSome PO lines do not have the required attribute value.Fill values on the product/variant or use a rule that tolerates missing data.
Optimizer returns no actionsThe PO already satisfies targeted rules, candidates are missing, or Fill gaps cannot solve the violation.Check status reasons and remaining rule reasons.
Apply fails as staleThe PO changed after the plan was created.Reload the PO, run the optimizer again, and apply the fresh plan.