Sales Opportunities
Sales opportunities represent potential deals in the sales pipeline. They track the progression of a lead through various phases, from initial contact to closing. Each opportunity can have a probability percentage, estimated and weighted amounts, an expected order date, and a link to the pipeline it belongs to.
Use the Activity_SalesOpportunity endpoint to manage your sales pipeline. Opportunities inherit all fields from Activity (subject, amount, financial totals) and add sales-specific fields like Probability, WeightedAmount, EstimatedAmount, and ExpectedOrderDate.
Endpoints
List Sales Opportunities
Retrieve a paginated list of sales opportunities.
/v1/odata/Activity_SalesOpportunitySingle Sales Opportunity
Retrieve a single sales opportunity by its ID.
/v1/odata/Activity_SalesOpportunity({id})With expanded relations:
/v1/odata/Activity_SalesOpportunity({id})?$expand=Relationship,Contact,ProductLines,Phase,PipelineCreate Sales Opportunity
Create a new sales opportunity.
/v1/odata/Activity_SalesOpportunityUpdate Sales Opportunity
Update an existing sales opportunity. Provide only the fields to update.
/v1/odata/Activity_SalesOpportunity({id})Delete Sales Opportunity
Delete a sales opportunity by ID.
/v1/odata/Activity_SalesOpportunity({id})Fields
Standard Fields (all entities)
| Field | Type | Description |
|---|---|---|
ID | Guid | Primary key (UUID) |
_Type | String | Entity type discriminator (e.g., Activity.SalesOpportunity) |
_Name | String | Computed display name |
SortIndex | Double | Sorting order |
CreationDate | DateTimeOffset | Date the record was created |
LastMutationDate | DateTimeOffset | Date of the last modification |
IsActive | Boolean | Whether the record is active |
IsClosed | Boolean | Whether the record is closed |
Sales Opportunity Fields
| Field | Type | Description |
|---|---|---|
Probability | Double | Win probability percentage (0–100) |
WeightedAmount | Double | Amount weighted by probability |
EstimatedAmount | Double | Estimated deal amount |
ExpectedOrderDate | Date | Expected order / close date |
Inherited Fields (from Activity)
| Field | Type | Description |
|---|---|---|
Subject | String | Activity subject / title |
Number | String | Auto-generated activity number (e.g., 2026-00001) |
Amount | Double | Activity amount |
Currency | String | Currency code (e.g., EUR) |
IsVatIncluded | Boolean | Whether prices include VAT |
DiscountPercentage | Double | Discount percentage |
RelationDescription | String | Description of the linked relation |
NumberOfProductLines | Double | Number of product lines |
NumberOfOpenTasks | Double | Number of open tasks linked to this activity |
NumberOfPlannedActions | Double | Number of planned actions |
BillingAmount | Double | Amount to be invoiced |
BillingAmountInCurrency | Double | Amount to be invoiced (in currency) |
AmountInCurrency | Double | Amount (in currency) |
TotalSalesExcludingVAT | Double | Subtotal excluding VAT |
TotalSalesIncludingVAT | Double | Total including VAT |
VatAmount | Double | VAT amount |
TotalDiscountExcludingVAT | Double | Total discount amount |
TotalMargin | Double | Total profit margin |
TotalPurchaseAmount | Double | Total purchase/cost amount |
Relationships
| Relationship | Target Entity | Cardinality | Description |
|---|---|---|---|
| Relationship | Relationship | N:1 | Linked relation (customer/contact) |
| Contact | Relation.Person.Contact | N:1 | Contact person |
| ProductLines | ProductLine | 1:N | Product lines / line items |
| Involved | Involved | 1:N | Involved parties |
| Phase | Datastore.Phase.ActivitySalesOpportunity | N:1 | Sales phase / stage |
| Pipeline | Pipeline | N:1 | Sales pipeline |
| Source | Datastore.Source | N:1 | Lead source |
| SalesRepresentative | Relation.Person.Contact.Employee | N:1 | Assigned sales rep |
| LostReason | Datastore.LostReason | N:1 | Reason for losing the deal |
| LostToCompetitor | Relationship.Organization.Competitor | N:1 | Competitor the deal was lost to |
| PriceList | PriceList | N:1 | Price list |
| LinkedActivities | Activity | 1:N | Linked activities |
| Activity | Activity | N:1 | Parent activity |
| TimeRegistrations | TimeRegistration | 1:N | Time registrations |
Expanding Relationships
/v1/odata/Activity_SalesOpportunity({id})?$expand=Phase/v1/odata/Activity_SalesOpportunity({id})?$expand=Relationship,Contact,ProductLines,Phase,PipelineNavigating Relationships
/v1/odata/Activity_SalesOpportunity({id})/ProductLines/v1/odata/Activity_SalesOpportunity({id})/Involved/v1/odata/Activity_SalesOpportunity({id})/Pipeline/$refFiltering Examples
/v1/odata/Activity_SalesOpportunity?$filter=contains(Subject, '{Subject}')&$top={top}/v1/odata/Activity_SalesOpportunity?$filter=Probability gt {Probability}&$top={top}/v1/odata/Activity_SalesOpportunity?$filter=WeightedAmount gt {WeightedAmount}&$top={top}/v1/odata/Activity_SalesOpportunity?$filter=EstimatedAmount gt {EstimatedAmount}&$top={top}/v1/odata/Activity_SalesOpportunity?$filter=ExpectedOrderDate lt {ExpectedOrderDate}&$top={top}/v1/odata/Activity_SalesOpportunity?$filter=Amount gt {Amount}&$top={top}/v1/odata/Activity_SalesOpportunity?$filter=IsClosed eq {IsClosed}&$top={top}/v1/odata/Activity_SalesOpportunity?$filter=CreationDate gt {CreationDate}&$top={top}