Skip to main content

<a id=“SuperOffice_WebApi_Data_SaleEntity”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity__ctor”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_Amount”></a> Amount

Total sale amount

Property Value

double

<a id=“SuperOffice_WebApi_Data_SaleEntity_Appointment”></a> Appointment

Property Value

Appointment

<a id=“SuperOffice_WebApi_Data_SaleEntity_Associate”></a> Associate

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

Property Value

Associate

<a id=“SuperOffice_WebApi_Data_SaleEntity_Competitor”></a> Competitor

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

Property Value

Competitor

<a id=“SuperOffice_WebApi_Data_SaleEntity_Completed”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_Completed_String”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_Contact”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_CreatedBy”></a> CreatedBy

Who created to sale

Property Value

Associate

<a id=“SuperOffice_WebApi_Data_SaleEntity_CreatedDate”></a> CreatedDate

Registered date

Property Value

DateTime

<a id=“SuperOffice_WebApi_Data_SaleEntity_Credited”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_Currency”></a> Currency

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

Property Value

Currency

<a id=“SuperOffice_WebApi_Data_SaleEntity_CustomFields”></a> 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>

<a id=“SuperOffice_WebApi_Data_SaleEntity_Earning”></a> Earning

Earning on sale

Property Value

double

<a id=“SuperOffice_WebApi_Data_SaleEntity_EarningPercent”></a> EarningPercent

Earning as percent of total

Property Value

double

<a id=“SuperOffice_WebApi_Data_SaleEntity_ExtraFields”></a> 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>

<a id=“SuperOffice_WebApi_Data_SaleEntity_Heading”></a> Heading

Sale heading (short description?)

Property Value

string

<a id=“SuperOffice_WebApi_Data_SaleEntity_IsPublished”></a> IsPublished

Publication is published

Property Value

bool List of all elements linked to the sale.

Property Value

Link[]

<a id=“SuperOffice_WebApi_Data_SaleEntity_NextDueDate”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_Number”></a> Number

Alphanumeric user field

Property Value

string

<a id=“SuperOffice_WebApi_Data_SaleEntity_Person”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_Postit”></a> Postit

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

Property Value

string

<a id=“SuperOffice_WebApi_Data_SaleEntity_Probability”></a> Probability

Actual probability, may differ from the one in the list

Property Value

short

<a id=“SuperOffice_WebApi_Data_SaleEntity_Project”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_PublishEventDate”></a> PublishEventDate

Publish event date

Property Value

DateTime

<a id=“SuperOffice_WebApi_Data_SaleEntity_PublishFrom”></a> PublishFrom

Publication valid from (inclusive)

Property Value

DateTime

<a id=“SuperOffice_WebApi_Data_SaleEntity_PublishTo”></a> PublishTo

Publication valid to (inclusive)

Property Value

DateTime

<a id=“SuperOffice_WebApi_Data_SaleEntity_Rating”></a> Rating

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

Property Value

Rating

<a id=“SuperOffice_WebApi_Data_SaleEntity_Reason”></a> Reason

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

Property Value

Reason

<a id=“SuperOffice_WebApi_Data_SaleEntity_ReasonSold”></a> ReasonSold

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

Property Value

ReasonSold

<a id=“SuperOffice_WebApi_Data_SaleEntity_ReasonStalled”></a> ReasonStalled

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

Property Value

ReasonStalled

<a id=“SuperOffice_WebApi_Data_SaleEntity_ReopenDate”></a> ReopenDate

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

Property Value

DateTime

<a id=“SuperOffice_WebApi_Data_SaleEntity_SaleId”></a> SaleId

Primary key

Property Value

int

<a id=“SuperOffice_WebApi_Data_SaleEntity_SaleStakeholders”></a> SaleStakeholders

Property Value

SaleStakeholder[]

<a id=“SuperOffice_WebApi_Data_SaleEntity_SaleText”></a> SaleText

Text describing the sale

Property Value

string

<a id=“SuperOffice_WebApi_Data_SaleEntity_SaleType”></a> SaleType

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

Property Value

SaleType

<a id=“SuperOffice_WebApi_Data_SaleEntity_Saledate”></a> Saledate

(expected / lost / won) sales date

Property Value

DateTime

<a id=“SuperOffice_WebApi_Data_SaleEntity_Source”></a> Source

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

Property Value

Source

<a id=“SuperOffice_WebApi_Data_SaleEntity_Status”></a> Status

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

Property Value

SaleStatus?

See Also

SaleEntity.Status_String

<a id=“SuperOffice_WebApi_Data_SaleEntity_Status_String”></a> Status_String

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

Property Value

string

See Also

SaleEntity.Status

<a id=“SuperOffice_WebApi_Data_SaleEntity_UpdatedBy”></a> UpdatedBy

Who updated the sale

Property Value

Associate

<a id=“SuperOffice_WebApi_Data_SaleEntity_UpdatedDate”></a> UpdatedDate

Last updated

Property Value

DateTime

<a id=“SuperOffice_WebApi_Data_SaleEntity_UserDefinedFields”></a> 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

<a id=“SuperOffice_WebApi_Data_SaleEntity_VisibleFor”></a> VisibleFor

The set of users or groups the record is visible for

Property Value

VisibleFor[]

See Also

SaleAgent, ArchiveAgent,