1.3 KiB
1.3 KiB
Create Order Task Contract
Shared fields
Every ready create task uses schemaVersion: "erp-task-v1", operation: "create_order", a supported route, fields, attachments, and originalText.
Route field maps
| Route | Required normalized fields | Runtime rule |
|---|---|---|
| team_single | customer, exact product, one date, pax, rooms, prices, OP, salesperson | explicit customer field write, submit, ERP re-query |
| team_batch | one product, departureDates, defaults, date-specific adjustments, OP, salesperson | verified team_single fallback per date; native DoInfoJHs deferred |
| split_parent | product, dates/range, cycle, planned pax, groups/date, salesperson | date-aware parent mapping and post-save identifier recovery |
| split_child | parent group or unique product/date lookup, date, channel customer, pax/prices | no guessed parent; child identifier must be re-queried |
Mapping policy
Use only unique product/customer mappings. If a lookup returns zero or multiple candidates, use needs_clarification. Do not let a fuzzy keyword silently select a product or parent group.
Confirmation policy
Creation produces ERP order identifiers and audit records. Confirmation source exports are deferred by default and use a separate export_confirmation task with neverResave=true.