Skip to content

Operating purchase-order constraint rules

With write access, a connected assistant can read and author the rules behind Constraint Studio and the purchase-order optimizer — the same rules you configure at Settings -> Purchase Orders -> Constraint Studio.

  • What the assistant can do
  • Building a rule
  • Applying optimizer suggestions
  • Plan requirements
  • Guardrails
  • See also
  • Read the current rule set — every rule, its scope, and its status — and the master on/off switch and optimizer configuration.
  • List the ready-made rule presets (the same ones in the app’s preset picker), and the catalogue of fields a rule can check.
  • Try a rule before saving it — run a dry preview against sample data, or against a real purchase order, without storing anything.
  • Create a rule — from a preset (name the preset, the fields it should check, and its thresholds) or from a fully custom rule built node by node, the same way the canvas works.
  • Update or delete an existing rule.
  • Pull in live Shopify-linked field values — the same “sync from Shopify” action available on the settings card, refreshed on demand rather than stored.
  • Apply the optimizer’s suggestions to a purchase order directly — increasing existing lines or adding new ones to close a gap the optimizer found, the same action as the app’s “Apply” button on the optimizer dialog.

The assistant has two ways to build a rule, matching the two ways you can in the app:

  • From a preset — pick one of the built-in templates, bind the fields it needs (for example, which attribute holds a product’s MOQ), and set its thresholds. This is the simpler, guided path and is checked against the same rules the preset picker enforces, so a misconfigured preset is refused with a clear reason before anything is saved.
  • From a custom graph — build the rule node by node, the same building blocks as the canvas (read a field, filter or group rows, do math, compare, raise a finding). This is the flexible path for anything a preset doesn’t cover.

Once the optimizer has suggested changes to close a purchasing gap, the assistant can apply some or all of them to the purchase order in one step — increasing quantities on existing lines or adding new lines as needed — the same effect as clicking Apply in the optimizer dialog. It can also do a dry run first, to see exactly what would change without committing it.

Constraint Studio is an Elevate-only feature for the assistant end to end — reading the rule set, presets, and field catalogue all require Elevate, not just writing to them.

CapabilityPlan required
Read rules, presets, field catalogue, previewElevate
Create, update, delete rules; sync live fields; apply optimizer suggestionsElevate
  • Deleting a rule needs its name confirmed back. To delete a rule, the assistant must repeat the rule’s exact name — a safeguard against deleting the wrong one.
  • A rule that names a deleted supplier blocks every save, not just that rule’s — the same behaviour as the app. The assistant can ask Logistified to automatically drop the dead supplier reference instead of failing (a supplier-scoped rule left with none of its suppliers is switched off rather than left applying to everything).
  • Someone else’s unsaved changes are protected. If the rule set changed in the app while the assistant was working, its save is rejected once and retried automatically against the latest version.
  • Rule findings stay advisory. A rule can flag a purchase order as failing a check, but — same as in the app — that never blocks confirming or sending the order on its own; it’s information, not an enforced lock.
  • Applying suggestions isn’t all-or-nothing. If part of a batch fails partway through, whatever already applied stays applied — the assistant is told exactly what went through and what didn’t, so nothing is silently rolled back or double-applied.