Skip to main content
Grouped order detection checks an inbound email for one or more transport orders before shipment extraction runs. If the email contains one order, Vectrix keeps it as one order. If the email contains multiple orders, Vectrix creates one order context per detected order and extracts shipments inside that order context.

Project default

Open Project configuration and set Grouped Order Detection to one of:
  • Use single-order detection: keep the original pipeline unless a contact override enables grouped order detection.
  • Detect grouped orders: run order-boundary detection by default, after customer routing.
The project setting is a default. A contact can still override it. If customer search is disabled for a reprocess or API extraction request, the project default still applies. In that case Detect grouped orders runs without customer context.

Contact overrides

Contacts support three policies:
  • Use project default: follow the project-level setting.
  • Always detect for this contact: always run grouped order detection for messages from this contact.
  • Never detect for this contact: keep this contact on the single-order path.
Additional detection instructions are optional for Use project default and Always detect for this contact. Use them only for contact-specific rules, such as known order-reference patterns or separators. A contact must have an active email address when it has routing or grouped-order configuration. This includes multi-customer routing instructions, an Always split policy, or additional order-splitting instructions. A plain contact without those settings can still be created without an email address.

Customer assignment

For contacts linked to multiple companies, Vectrix requires a default company and customer-selection instructions. During grouped order detection, the model may assign each detected order to one of the linked company candidates. Invalid or missing suggestions fall back to the configured default when available. For contacts linked to one company, every detected order inherits that company. If no contact matches, Vectrix first runs the normal customer search. A successful match becomes the customer for every detected order; if no customer is found, extraction continues without customer-specific instructions.

Failure behavior

If the order_count_detection prompt is missing or order detection fails for a project where grouped order detection is enabled, extraction fails clearly instead of silently using the single-order path. If order detection returns no usable orders, Vectrix creates one fallback order with the resolved customer context when available and continues with a warning. Shipment counting runs inside each detected order. If one order’s shipment count fails, that order receives no shipment children and Vectrix records a warning. If shipment counting fails for every detected order, extraction aborts to preserve the detected order boundaries for retry or review.