API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · order_intake_profiles

Order Intake Profile Schema

ID del esquema
order_intake_profile
Colección
order_intake_profiles
Permisos
  • Leerorder_intake_profile_view
  • Crearorder_intake_profile_create
  • Modificarorder_intake_profile_edit
  • Eliminarorder_intake_profile_delete

Campos

Order Intake Profile Schema

order_intake_profiles4 permisos

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

namestringobligatorio

Profile name.

1–200 caracteres
isDefaultbooleanopcional

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

Valor por defecto: false
enabledbooleanopcional

Disabled profiles never run (rollout kill-switch).

Valor por defecto: true
partyIdstringopcional

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

PatrónValor por defecto: nulladmite null
triggerGateobjectopcional

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

Valor por defecto: nulladmite null
minOrderDatedateopcional

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.

Valor por defecto: nulladmite null
projectDefaultsobjectopcional

Defaults applied to the created project.

Valor por defecto: {}
titleTemplatestringopcional

Handlebars-subset template for the project title.

máx. 300 caracteresValor por defecto: "{{orderNumber}} – {{Infotext}}"
descriptionTemplatestringopcional

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

máx. 20000 caracteresadmite null
deadlineKeystringopcional

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

máx. 200 caracteresValor por defecto: nulladmite null
contactKeystringopcional

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.

máx. 200 caracteresValor por defecto: nulladmite null
orgUnitIdstringopcional

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.

PatrónValor por defecto: nulladmite null
orgUnitSourcestringopcional

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
Valor por defecto: "FIXED"
orgUnitKeystringopcional

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

máx. 200 caracteresValor por defecto: nulladmite null
orgUnitMappingobject[]opcional

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.

Valor por defecto: []
valuestringobligatorio

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

1–200 caracteres
orgUnitIduuidobligatorio

Codemeta org unit this value maps to.

descriptionOnTasksbooleanopcional

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

Valor por defecto: true
teamCanManagebooleanopcional

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.

Valor por defecto: false
writeBackobjectopcional

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

Valor por defecto: nulladmite null
rulesobject[]opcional

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

Valor por defecto: []
matchobjectopcional

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

Valor por defecto: nulladmite null
positionobjectopcional

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

Valor por defecto: {}
billingModelstringopcional

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
Valor por defecto: nulladmite null
weclappBillingstringopcional

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
Valor por defecto: "position"
limitModestringopcional

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
Valor por defecto: "derive"
taskobjectopcional

Task outcome for a matched order item.

Valor por defecto: {}
titleTemplatestringopcional

Handlebars-subset template for the task title.

máx. 300 caracteresValor por defecto: "{{orderNumber}} – {{Infotext}}"
checklistTemplateIdstringopcional

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

PatrónValor por defecto: nulladmite null
assignobjectopcional

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

Valor por defecto: {}
modestringopcional

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

OPENFIXEDDISPATCH_RULE
Valor por defecto: "OPEN"
userIdstringopcional
PatrónValor por defecto: nulladmite null
orgUnitIdstringopcional
PatrónValor por defecto: nulladmite null
dispatchRuleIdstringopcional
PatrónValor por defecto: nulladmite null
fallbackRuleobjectopcional

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

Valor por defecto: nulladmite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/order_intake_profiles — Lista, paginada y filtrable
  • GET /api/v1/order_intake_profiles/<id> — Una entidad
  • POST /api/v1/order_intake_profiles — Crear
  • PATCH /api/v1/order_intake_profiles/<id> — Actualización parcial
  • DELETE /api/v1/order_intake_profiles/<id> — Eliminación lógica
  • GET /api/v1/order_intake_profiles/<id>/timeline — Auditoría y actividades

Búsqueda