Skip to main content

Class SaleEntity

Namespace: SuperOffice.WebApi.Data
Assembly: SuperOffice.WebApi.dll
Carrier object for SaleEntity. The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Inheritance

objectCarrierSaleEntity

Inherited Members

Carrier.TableRight, Carrier.FieldProperties, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Examples

Get SaleEntity 123 using the WebApi client: <pre><code class=“lang-csharp”>var configuration = new WebApiConfiguration(url); var agent = new SaleAgent(configuration); var saleEntity = agent.GetSaleEntity( 123 );</code></pre>

Remarks

Use <xref href=“SuperOffice.CRM.Services.ArchiveAgent?text=Archive+agent” data-throw-if-not-resolved=“false”></xref>: All SaleEntity: <pre><code class=“lang-csharp”>“FindSale”</code></pre> History: <pre><code class=“lang-csharp”>“SaleHistory”</code></pre> with restriction <pre><code class=“lang-csharp”>“saleId eq ” + id</code></pre>. Activities: <pre><code class=“lang-csharp”>“SaleActivity”</code></pre> with restriction <pre><code class=“lang-csharp”>“saleId eq ” + id</code></pre>. Guide: <pre><code class=“lang-csharp”>“SaleGuide”</code></pre> with restriction <pre><code class=“lang-csharp”>“saleId eq ” + id</code></pre>. Stakeholders: <pre><code class=“lang-csharp”>“SaleStakeholder”</code></pre> with restriction <pre><code class=“lang-csharp”>“saleId eq ” + id</code></pre>. Links: <pre><code class=“lang-csharp”>“Links”</code></pre> with restriction <pre><code class=“lang-csharp”>“sourceSaleRestrictionId eq ” + id</code></pre>.

Constructors

SaleEntity()

Default constructor - defaults any enum props to 0.

Properties

The number of active erp links

Property Value

int Number of active links to sale, document, appointment.

Property Value

int

Amount

Total sale amount

Property Value

double

Appointment

Property Value

Appointment

Associate

The sale owner <p>Use MDO List name “associate” to get list items.</p>

Property Value

Associate

Competitor

List of all possible competitors. <p>Use MDO List name “comptr” to get list items.</p>

Property Value

Competitor

Completed

The Sale completed state. The completed state is either Started or Completed. NotStarted is treated as Started. The value maps to the Done database field. NULL if unknown enum value.

Property Value

ActivityStatus?

See Also

SaleEntity.Completed_String

Completed_String

The Sale completed state. The completed state is either Started or Completed. NotStarted is treated as Started. The value maps to the Done database field. Raw string enum value.

Property Value

string

See Also

SaleEntity.Completed

Contact

The contact associated with the sale. It may also be 0 if no contact is associated with the sale. <p>Use MDO List name “contact” to get list items.</p>

Property Value

Contact

CreatedBy

Who created to sale

Property Value

Associate

CreatedDate

Registered date

Property Value

DateTime

Credited

List of who is to be credited for the sale. <p>Use MDO List name “credited” to get list items.</p>

Property Value

Credited

Currency

The currency the sale object was sold in <p>Use MDO List name “currency” to get list items.</p>

Property Value

Currency

CustomFields

Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin. Custom fields combines user defined fields and extra fields into one bucket. The individual <xref href=“SuperOffice.WebApi.Data.SaleEntity.ExtraFields” data-throw-if-not-resolved=“false”></xref> and <xref href=“SuperOffice.WebApi.Data.SaleEntity.UserDefinedFields?text=UserDefinedFields” data-throw-if-not-resolved=“false”></xref> properties are deprecated in favor of this combined collection. The value string is the encoded value: “[I:123]” or “[DT:2019-09-11]”.

Property Value

StringDictionary

Remarks

The naming convention of the key string is as follows: <table><tbody><tr><td class=“term”>Extra field data</td><td class=“description”> [Extra field name]<p></p> Example: <pre><code class=“lang-csharp”>‘x_gorp’ = ‘[I:123]’</code></pre> </td></tr><tr><td class=“term”>User defined field data</td><td class=“description”> [Prog-id name]<p></p> Example: <pre><code class=“lang-csharp”>‘SuperOffice:1’ = ‘[I:123]’</code></pre><p></p> </td></tr></tbody></table>

Earning

Earning on sale

Property Value

double

EarningPercent

Earning as percent of total

Property Value

double

ExtraFields

Deprecated: Use <xref href=“SuperOffice.WebApi.Data.SaleEntity.CustomFields” data-throw-if-not-resolved=“false”></xref> instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc. The value string is the encoded value: “[I:123]” or “[DT:2019-09-11]”.

Property Value

StringDictionary

Remarks

The naming convention of the key string is as follows: <table><tbody><tr><td class=“term”>Plug-in data</td><td class=“description”> [Plug-in name].[Property name] Example: DocumentPlugin.DocumentType </td></tr><tr><td class=“term”>Foreign key data</td><td class=“description”> The device identity is appended directly to the device name if it exists. This is not commonly used, but the database opens for this as a possibility to have several devices with the same name, and hence we would ensure an unique key if this field is used. Example: Audience.SecretService.DefaultCountry </td></tr><tr><td class=“term”>User defined table data</td><td class=“description”> [Table name].[Field name] Example: Phunneling.AggregatedSales </td></tr><tr><td class=“term”>Other</td><td class=“description”> Other data sources must ensure an unique name. If the key already exists we do not add the data to the dictionary. We also ensure that SuperOffice data are added first, so that existing data doesnt change when more data sources are added (with duplicate data keys). </td></tr></tbody></table>

Heading

Sale heading (short description?)

Property Value

string

IsPublished

Publication is published

Property Value

bool List of all elements linked to the sale.

Property Value

Link[]

NextDueDate

Next due date, this is a denormalization of ‘closest future activity date, or most recent if no future activities’. Maintained by the system, but very convenient for searching.

Property Value

DateTime

Number

Alphanumeric user field

Property Value

string

Person

A sale may also be connected to a person - this must be a contact person registered on the current contact. This does not mean that a person is required. <p>Use MDO List name “person” to get list items.</p>

Property Value

Person

Postit

The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases

Property Value

string

Probability

Actual probability, may differ from the one in the list

Property Value

short

Project

A sale may also be connected to a project, so you see the sale both on the company card, and on the project card. This does not mean that a project is required. <p>Use MDO List name “project” to get list items.</p>

Property Value

Project

PublishEventDate

Publish event date

Property Value

DateTime

PublishFrom

Publication valid from (inclusive)

Property Value

DateTime

PublishTo

Publication valid to (inclusive)

Property Value

DateTime

Rating

The sale rating <p>Use MDO List name “prob” to get list items.</p>

Property Value

Rating

Reason

The sale reason <p>Use MDO List name “reason” to get list items.</p>

Property Value

Reason

ReasonSold

<p>Use MDO List name “reasonsold” to get list items.</p>

Property Value

ReasonSold

ReasonStalled

<p>Use MDO List name “reasonstalled” to get list items.</p>

Property Value

ReasonStalled

ReopenDate

Date the sale is to be reopened; valid only for status=stalled. Not necessarily the same as the nextDueDate.

Property Value

DateTime

SaleId

Primary key

Property Value

int

SaleStakeholders

Property Value

SaleStakeholder[]

SaleText

Text describing the sale

Property Value

string

SaleType

<p>Use MDO List name “saletype” to get list items.</p>

Property Value

SaleType

Saledate

(expected / lost / won) sales date

Property Value

DateTime

Source

The sale source <p>Use MDO List name “source” to get list items.</p>

Property Value

Source

Status

The state of the Sale: Open / Sold / Lost / Stalled NULL if unknown enum value.

Property Value

SaleStatus?

See Also

SaleEntity.Status_String

Status_String

The state of the Sale: Open / Sold / Lost / Stalled Raw string enum value.

Property Value

string

See Also

SaleEntity.Status

UpdatedBy

Who updated the sale

Property Value

Associate

UpdatedDate

Last updated

Property Value

DateTime

UserDefinedFields

Deprecated: Use <xref href=“SuperOffice.WebApi.Data.SaleEntity.CustomFields” data-throw-if-not-resolved=“false”></xref> instead. Dictionary of user defined field data. The key string is the ProgId of the UdefField, or if the ProgId is empty it is a string of the format “SuperOffice:[UdefFieldIdentity]”, e.g. “SuperOffice:1234” The value string is the encoded value: “[I:123]” or “[DT:2019-09-11]”.

Property Value

StringDictionary

VisibleFor

The set of users or groups the record is visible for

Property Value

VisibleFor[]

See Also

SaleAgent, ArchiveAgent,