Opportunity Schema
Felder
Opportunity Schema
Schema for validating sales opportunity entities
title
Opportunity title
description
Detailed description (plain text)
descriptionHtml
Rich text HTML version of the opportunity description
status
Pipeline status (tenant-configurable)
priority
Opportunity priority level
LOWNORMALHIGHCRITICALpipelineId
Sales pipeline UUID (references sales_pipelines collection)
partyId
Customer party UUID
partyAddressId
Specific site/address of the associated party
contactPartyId
Contact person UUID
assignedToId
Assigned sales rep user UUID
orgUnitId
Organization unit UUID
value
Deal value / CLV (Decimal128 as string, synced with customerLifetimeValue)
onetimeRevenue
One-time revenue (hardware, projects, migrations)
monthlyRecurring
Monthly recurring revenue (MRR)
contractDurationMonths
Minimum contract duration in months
estimatedLifetimeMonths
Estimated customer lifetime in months (manual override; auto-calculated from party churn data or tenant default if null)
annualRecurringRevenue
ARR = MRR × 12
totalContractValue
TCV = onetime + (MRR × contractDurationMonths)
customerLifetimeValue
CLV = onetime + (MRR × estimatedLifetimeMonths)
weightedValue
Weighted value = CLV × (probability / 100)
currencyCode
ISO 4217 currency code
probability
Win probability in percent
expectedCloseDate
Expected close date (YYYY-MM-DD)
dueDate
Due date — act on the opportunity by this day (YYYY-MM-DD)
source
Lead source (references opportunity_sources name)
contractId
Linked contract UUID
projectId
Linked project UUID
lostReason
Reason for losing the opportunity
mergedIntoOpportunityId
If set, this opportunity was merged into the referenced opportunity
mergedIntoOpportunityNumber
Opportunity number of the opportunity this was merged into (denormalized for display)
tags
Tags
attachments
linkedEntities
convertedTo
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.
convertedFrom
Set when this opportunity was created by converting another entity (ticket). Written only by the conversion routes.
lineItems
articleId
Article UUID (null = free-text manual position)
articleName
Denormalized article name at request time
articleNumber
Denormalized article number at request time
quantity
Requested quantity
unit
Unit label snapshot from the article (e.g. "Stk", "h")
unitPrice
Quoted unit price (null = price on request)
billingInterval
Billing interval — drives MRR/onetime auto-calculation. Null is treated as ONE_TIME.
nullONE_TIMEMONTHLYYEARLYcurrencyCode
ISO 4217 currency code
source
Origin of the line item
nullportalmanualproposalsales_orderrequestedAt
When the article was added to the opportunity
note
Per-item note (e.g. customer remark)
alternatives
Alternative positions offered alongside this line (e.g. cheaper / premium variant). Not aggregated into MRR/onetime.
articleId
articleName
articleNumber
quantity
unit
unitPrice
billingInterval
nullONE_TIMEMONTHLYYEARLYcurrencyCode
note
statusChangedAt
Timestamp of the last status change (drives time_in_status / time_to_status targets, ADR 0117a)
inboundReplyAckedAt
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.
inboundReplyAckedBy
User who acknowledged the latest inbound prospect email (see inboundReplyAckedAt).
snoozedUntil
Opportunity is snoozed until this timestamp; hidden from active pipeline views
snoozedBy
User who snoozed the opportunity
snoozedAt
When the opportunity was snoozed
snoozeReason
Reason provided when snoozing
snoozeFollowUpTaskId
ID of the follow-up task created at snooze time (due at snoozedUntil). Cleared on unsnooze.
snoozeWokenAt
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).
targets
Denormalized active service targets (ADR 0117a)
stageKind
time_to_first_responsetime_in_statustime_to_statustime_to_closestageStatus
stageLabel
bindingness
contractualinternalbreachedAt
completedAt
externalReferences
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.
system
externalId
externalVersion
externalNumber
syncedAt
lastSyncCorrelationId
lastInboundHash
lastOutboundHash
Keine Felder passen zum Filter.
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 + filterbarGET /api/v1/opportunities/<id>— Einzelne EntityPOST /api/v1/opportunities— AnlegenPATCH /api/v1/opportunities/<id>— Teil-UpdateDELETE /api/v1/opportunities/<id>— Soft-DeleteGET /api/v1/opportunities/<id>/timeline— Audit + Aktivitäten