API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · opportunities

Opportunity Schema

Schema-ID
opportunity
Collection
opportunities
Permissions
  • Lesenopportunity_view
  • Anlegenopportunity_create
  • Ändernopportunity_edit
  • Löschenopportunity_delete

Felder

Opportunity Schema

opportunities4 Permissions

Schema for validating sales opportunity entities

titlestringerforderlich

Opportunity title

1–300 Zeichen
descriptionstringoptional

Detailed description (plain text)

max 5000 Zeichennullable
descriptionHtmlstringoptional

Rich text HTML version of the opportunity description

nullable
statusstringerforderlich

Pipeline status (tenant-configurable)

prioritystringoptional

Opportunity priority level

LOWNORMALHIGHCRITICAL
Default: "NORMAL"
pipelineIduuidoptional

Sales pipeline UUID (references sales_pipelines collection)

nullable
partyIduuidoptional

Customer party UUID

nullable
partyAddressIduuidoptional

Specific site/address of the associated party

Default: nullnullable
contactPartyIduuidoptional

Contact person UUID

nullable
assignedToIduuidoptional

Assigned sales rep user UUID

nullable
orgUnitIduuidoptional

Organization unit UUID

nullable
valuestringoptional

Deal value / CLV (Decimal128 as string, synced with customerLifetimeValue)

Patternnullable
onetimeRevenuestringoptional

One-time revenue (hardware, projects, migrations)

Patternnullable
monthlyRecurringstringoptional

Monthly recurring revenue (MRR)

Patternnullable
contractDurationMonthsnumberoptional

Minimum contract duration in months

1 – 120nullable
estimatedLifetimeMonthsnumberoptional

Estimated customer lifetime in months (manual override; auto-calculated from party churn data or tenant default if null)

1 – 600nullable
annualRecurringRevenuestringoptional

ARR = MRR × 12

Patternnullable
totalContractValuestringoptional

TCV = onetime + (MRR × contractDurationMonths)

Patternnullable
customerLifetimeValuestringoptional

CLV = onetime + (MRR × estimatedLifetimeMonths)

Patternnullable
weightedValuestringoptional

Weighted value = CLV × (probability / 100)

Patternnullable
currencyCodestringoptional

ISO 4217 currency code

max 3 ZeichenDefault: "EUR"
probabilitynumberoptional

Win probability in percent

0 – 100nullable
expectedCloseDatedateoptional

Expected close date (YYYY-MM-DD)

nullable
dueDatedateoptional

Due date — act on the opportunity by this day (YYYY-MM-DD)

nullable
sourcestringoptional

Lead source (references opportunity_sources name)

max 100 Zeichennullable
contractIduuidoptional

Linked contract UUID

nullable
projectIduuidoptional

Linked project UUID

nullable
lostReasonstringoptional

Reason for losing the opportunity

max 2000 Zeichennullable
mergedIntoOpportunityIduuidoptional

If set, this opportunity was merged into the referenced opportunity

nullable
mergedIntoOpportunityNumberstringoptional

Opportunity number of the opportunity this was merged into (denormalized for display)

nullable
tagsstring[]optional

Tags

Default: []nullable
attachmentsobject[]optional
Default: []nullable
s3Keystringerforderlich
fileNamestringerforderlich
mimeTypestringerforderlich
sizeBytesnumbererforderlich
uploadedAtdatetimeerforderlich
uploadedByuuiderforderlich
isInternalbooleanerforderlich
linkedEntitiesobject[]optional
Default: []nullable
entityTypestringerforderlich
partyassetticketprojectuseropportunityproposalarticletask
entityIduuiderforderlich
rolestringerforderlich
convertedToobjectoptional

Set when this opportunity was converted to another entity (ticket). The opportunity is kept — not deleted — so linked records stay reachable. Written only by the conversion routes.

read-onlynullable
entityTypestringerforderlich
ticketopportunitycomplaint
entityIduuiderforderlich
convertedAtdatetimeoptional
nullable
convertedBystringoptional
nullable
convertedFromobjectoptional

Set when this opportunity was created by converting another entity (ticket). Written only by the conversion routes.

read-onlynullable
entityTypestringerforderlich
ticketopportunitycomplaint
entityIduuiderforderlich
convertedAtdatetimeoptional
nullable
convertedBystringoptional
nullable
lineItemsobject[]optional
Default: []nullable
iduuiderforderlich
articleIduuidoptional

Article UUID (null = free-text manual position)

nullable
articleNamestringoptional

Denormalized article name at request time

nullable
articleNumberstringoptional

Denormalized article number at request time

nullable
quantitystringerforderlich

Requested quantity

Pattern
unitstringoptional

Unit label snapshot from the article (e.g. "Stk", "h")

max 100 Zeichennullable
unitPricestringoptional

Quoted unit price (null = price on request)

Patternnullable
billingIntervalstringoptional

Billing interval — drives MRR/onetime auto-calculation. Null is treated as ONE_TIME.

nullONE_TIMEMONTHLYYEARLY
nullable
currencyCodestringoptional

ISO 4217 currency code

max 3 Zeichennullable
sourcestringoptional

Origin of the line item

nullportalmanualproposalsales_order
nullable
requestedAtdatetimeoptional

When the article was added to the opportunity

nullable
notestringoptional

Per-item note (e.g. customer remark)

max 1000 Zeichennullable
alternativesobject[]optional

Alternative positions offered alongside this line (e.g. cheaper / premium variant). Not aggregated into MRR/onetime.

Default: []nullable
iduuiderforderlich
articleIduuidoptional
nullable
articleNamestringoptional
nullable
articleNumberstringoptional
nullable
quantitystringoptional
Patternnullable
unitstringoptional
max 100 Zeichennullable
unitPricestringoptional
Patternnullable
billingIntervalstringoptional
nullONE_TIMEMONTHLYYEARLY
nullable
currencyCodestringoptional
max 3 Zeichennullable
notestringoptional
max 1000 Zeichennullable
statusChangedAtdatetimeoptional

Timestamp of the last status change (drives time_in_status / time_to_status targets, ADR 0117a)

nullable
inboundReplyAckedAtdatetimeoptional

Timestamp at which the latest inbound prospect email was acknowledged as "handled, no reply needed". Clears the awaiting-reply badge when >= the last inbound email time; a newer inbound email re-arms the badge. Mirrors ticket.inboundReplyAckedAt.

nullable
inboundReplyAckedBystringoptional

User who acknowledged the latest inbound prospect email (see inboundReplyAckedAt).

nullable
snoozedUntildatetimeoptional

Opportunity is snoozed until this timestamp; hidden from active pipeline views

nullable
snoozedByuuidoptional

User who snoozed the opportunity

nullable
snoozedAtdatetimeoptional

When the opportunity was snoozed

nullable
snoozeReasonstringoptional

Reason provided when snoozing

max 500 Zeichennullable
snoozeFollowUpTaskIduuidoptional

ID of the follow-up task created at snooze time (due at snoozedUntil). Cleared on unsnooze.

nullable
snoozeWokenAtdatetimeoptional

Set by the snooze-wakeup worker when snoozedUntil passed. snoozedUntil/snoozeReason stay in place so the board can flag the opportunity as "Wiedervorlage fällig" (red) until a user acts on it; it also makes the wakeup fire exactly once. Cleared on snooze/unsnooze. Absent on documents predating the field = never woken (no backfill needed).

nullable
targetsobject[]optional

Denormalized active service targets (ADR 0117a)

nullable
stageIdstringerforderlich
stageKindstringerforderlich
time_to_first_responsetime_in_statustime_to_statustime_to_close
stageStatusstringoptional
nullable
stageLabelstringoptional
nullable
bindingnessstringerforderlich
contractualinternal
deadlinedatetimeerforderlich
breachedAtdatetimeoptional
nullable
completedAtdatetimeoptional
nullable
profileIduuiderforderlich
sourceRefobjectoptional

Provenance marker for the source system a weclapp-born opportunity was imported from (ADR 0220). The weclapp sync anchor lives in externalReferences[system="weclapp"], NOT here.

Default: nullnullable
systemstringerforderlich

Source system identifier (e.g. weclapp)

idstringerforderlich

Entity ID in the source system

externalReferencesobject[]optional

Cross-system linking refs (e.g. weclapp). The weclapp entry is the identity anchor for the bidirectional opportunity sync (ADR 0220). Read/written by the inbound + outbound sync workers and indexed for duplicate prevention.

Default: []nullable
systemstringerforderlich
max 100 Zeichen
externalIdstringerforderlich
max 200 Zeichen
externalVersionstringoptional
nullable
externalNumberstringoptional
max 200 Zeichennullable
syncedAtdatetimeoptional
nullable
lastSyncCorrelationIdstringoptional
nullable
lastInboundHashstringoptional
max 64 Zeichennullable
lastOutboundHashstringoptional
max 64 Zeichennullable

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/opportunities — Liste, paginiert + filterbar
  • GET /api/v1/opportunities/<id> — Einzelne Entity
  • POST /api/v1/opportunities — Anlegen
  • PATCH /api/v1/opportunities/<id> — Teil-Update
  • DELETE /api/v1/opportunities/<id> — Soft-Delete
  • GET /api/v1/opportunities/<id>/timeline — Audit + Aktivitäten

Suche