API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · order_intake_profiles

Order Intake Profile Schema

ID du schéma
order_intake_profile
Collection
order_intake_profiles
Autorisations
  • Lireorder_intake_profile_view
  • Créerorder_intake_profile_create
  • Modifierorder_intake_profile_edit
  • Supprimerorder_intake_profile_delete

Champs

Order Intake Profile Schema

order_intake_profiles4 autorisations

ADR 0285 — tenant-configurable rule set that turns a confirmed weclapp sales order into a native project + positions + tasks + checklists.

namestringobligatoire

Profile name.

1–200 caractères
isDefaultbooleanfacultatif

Exactly one active profile per tenant is the default (used when no party override matches).

Par défaut : false
enabledbooleanfacultatif

Disabled profiles never run (rollout kill-switch).

Par défaut : true
partyIdstringfacultatif

Optional customer party this profile is pinned to; null = tenant-wide.

MotifPar défaut : nullnullable
triggerGateobjectfacultatif

Explicit confirmation flag that must hold before the automation runs, evaluated against sales_order.weclappCustomAttributes. null = status pre-filter only.

Par défaut : nullnullable
minOrderDatedatefacultatif

Optional cutoff (YYYY-MM-DD): the automation (webhook + backstop sweep) creates no NEW project for an order whose orderDate lies before this date — old orders whose positions were billed elsewhere (e.g. via TANSS) stay out. Orders that already have a project keep being updated. The manual "run intake" button (ADR 0373) and the import wizard ignore it. An order without orderDate passes. null = no cutoff; deliberately never pre-filled — set it when switching the automation on.

Par défaut : nullnullable
projectDefaultsobjectfacultatif

Defaults applied to the created project.

Par défaut : {}
titleTemplatestringfacultatif

Handlebars-subset template for the project title.

max. 300 caractèresPar défaut : "{{orderNumber}} – {{Infotext}}"
descriptionTemplatestringfacultatif

Handlebars-subset template for the project (and, by default, task) description.

max. 20000 caractèresnullable
deadlineKeystringfacultatif

weclappCustomAttributes key whose (date) value maps to project.endDate / task.dueDate (date-only, ADR 0285 G3).

max. 200 caractèresPar défaut : nullnullable
contactKeystringfacultatif

weclappCustomAttributes key holding the customer contact as a weclapp PARTY ID (ITF: "Verantwortlicher_AuftragKunde"). Resolved to the local party so templates can render `{{party.contactName}}`; the raw attribute value is an opaque id and unusable in text. Unset / unresolvable → `{{party.contactName}}` renders empty.

max. 200 caractèresPar défaut : nullnullable
orgUnitIdstringfacultatif

Dispo org unit the created project lands in (ADR 0285, Decision 7). Also the fallback when `orgUnitSource: WECLAPP_ATTRIBUTE` finds no mapping for the order.

MotifPar défaut : nullnullable
orgUnitSourcestringfacultatif

Where project/task `orgUnitId` comes from. FIXED = always the `orgUnitId` above. WECLAPP_ATTRIBUTE = read the team from the weclapp custom attribute `orgUnitKey` and translate it via `orgUnitMapping`; an unmapped / missing value falls back to `orgUnitId`, so the automation never lands a project nowhere.

FIXEDWECLAPP_ATTRIBUTE
Par défaut : "FIXED"
orgUnitKeystringfacultatif

weclappCustomAttributes key carrying the team on the order (e.g. "Team"). Only read when orgUnitSource = WECLAPP_ATTRIBUTE.

max. 200 caractèresPar défaut : nullnullable
orgUnitMappingobject[]facultatif

weclapp team value → Codemeta org unit. Matching is case-insensitive on the trimmed value; the first matching entry wins. A mapping table rather than an org-unit name comparison on purpose: a renamed org unit would silently stop matching.

Par défaut : []
valuestringobligatoire

Value as it appears in the weclapp attribute (e.g. "Team2").

1–200 caractères
orgUnitIduuidobligatoire

Codemeta org unit this value maps to.

descriptionOnTasksbooleanfacultatif

Whether to also copy the full description onto every task (matches the ITF n8n default).

Par défaut : true
teamCanManagebooleanfacultatif

ADR 0421 — set task.teamCanManage on materialised tasks so every member of the assigned dispatch team may fully manage (edit/delete) them, not only work them off. Worker-created tasks have no human creator, so without this only the project manager or an admin can touch them.

Par défaut : false
writeBackobjectfacultatif

Optional narrow write-back to the weclapp sales order after materialisation. null = no write-back.

Par défaut : nullnullable
rulesobject[]facultatif

Ordered match → outcome rules. The first matching rule wins per order position.

Par défaut : []
matchobjectfacultatif

Match criteria against the (already-synced) article + order item. All present criteria must hold (AND). Omitted / null on the fallback rule.

Par défaut : nullnullable
positionobjectfacultatif

Project-position outcome (ADR 0310) for a matched order item.

Par défaut : {}
billingModelstringfacultatif

Force the position billing model. null = derive from the order item unit (hour-like → time_and_material, fixed amount → flat_rate).

flat_ratetime_and_materialnull
Par défaut : nullnullable
weclappBillingstringfacultatif

ADR 0634 — wie die weclapp-Auftragsposition am Ende abgerechnet wird. `position` (Default) = heutiges Verhalten: die Position bleibt im Auftrag stehen (DL-Positionen werden in weclapp bebucht, Nicht-DL-Positionen bleiben als verkaufte Position bestehen). `replace` = die Position ist eine Nicht-DL-Platzhalterposition für Aufwand; beim Abrechnungsabschluss wird sie im weclapp-Auftrag durch die gerenderten Buchungspositionen ERSETZT (Auftrag kurz zurück auf „Auftrag wird erfasst"). Der Wert wird beim Materialisieren auf project_position.weclappBillingMode gestempelt und danach dort gepflegt — ein Re-Import überschreibt ihn nicht.

positionreplace
Par défaut : "position"
limitModestringfacultatif

Hard budget cap on the lead task (ADR 0139). `derive` = take the cap from the order position (hour-like unit → minutes, fixed amount → amount); `minutes` / `amount` = force that dimension; `no_cap` = explicitly no cap. `none` is DEPRECATED — it used to mean `derive` while the UI labelled it "no cap", which made an explicit "no cap" inexpressible; it is still accepted (and read as `derive`) so profiles written before the rename keep working until the migration `scripts/migrations/2026-07-30-rename-intake-limit-mode.mjs` has run.

deriveminutesamountno_capnone
Par défaut : "derive"
taskobjectfacultatif

Task outcome for a matched order item.

Par défaut : {}
titleTemplatestringfacultatif

Handlebars-subset template for the task title.

max. 300 caractèresPar défaut : "{{orderNumber}} – {{Infotext}}"
checklistTemplateIdstringfacultatif

checklist_template to attach to the position / lead task (ADR 0217).

MotifPar défaut : nullnullable
assignobjectfacultatif

Assignment outcome (ADR 0285, Decision 7 / ADR 0224).

Par défaut : {}
modestringfacultatif

OPEN = unassigned, dispatcher schedules via "Aufgaben planen". FIXED = pin to userId/orgUnitId. DISPATCH_RULE = set task.dispatchPending + dispatchRuleId.

OPENFIXEDDISPATCH_RULE
Par défaut : "OPEN"
userIdstringfacultatif
MotifPar défaut : nullnullable
orgUnitIdstringfacultatif
MotifPar défaut : nullnullable
dispatchRuleIdstringfacultatif
MotifPar défaut : nullnullable
fallbackRuleobjectfacultatif

Outcome applied to order positions that match no rule (ITF service/consulting default).

Par défaut : nullnullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/order_intake_profiles — Liste, paginée et filtrable
  • GET /api/v1/order_intake_profiles/<id> — Une entité
  • POST /api/v1/order_intake_profiles — Créer
  • PATCH /api/v1/order_intake_profiles/<id> — Mise à jour partielle
  • DELETE /api/v1/order_intake_profiles/<id> — Suppression logique
  • GET /api/v1/order_intake_profiles/<id>/timeline — Audit et activités

Recherche