Class SaleAgent
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Inherited Members
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class SaleAgent : ISaleAgent, IAgent
Constructors
SaleAgent(ISaleImplementation, ISaleEntityImplementation, ISaleListImplementation, ISaleStakeholderImplementation, ISaleStakeholderListImplementation, ISaleSummaryImplementation, ISoRequestItemsAccessor)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public SaleAgent(ISaleImplementation saleImplementation, ISaleEntityImplementation saleEntityImplementation, ISaleListImplementation saleListImplementation, ISaleStakeholderImplementation saleStakeholderImplementation, ISaleStakeholderListImplementation saleStakeholderListImplementation, ISaleSummaryImplementation saleSummaryImplementation, ISoRequestItemsAccessor accessor)
Parameters
| Type | Name | Description |
|---|---|---|
| ISaleImplementation | saleImplementation | |
| ISaleEntityImplementation | saleEntityImplementation | |
| ISaleListImplementation | saleListImplementation | |
| ISaleStakeholderImplementation | saleStakeholderImplementation | |
| ISaleStakeholderListImplementation | saleStakeholderListImplementation | |
| ISaleSummaryImplementation | saleSummaryImplementation | |
| ISoRequestItemsAccessor | accessor |
SaleAgent(ISaleImplementation, ISaleEntityImplementation, ISaleListImplementation, ISaleStakeholderImplementation, ISaleStakeholderListImplementation, ISaleSummaryImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository, IScriptingConfiguration, IOnlineConfiguration)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public SaleAgent(ISaleImplementation saleImplementation, ISaleEntityImplementation saleEntityImplementation, ISaleListImplementation saleListImplementation, ISaleStakeholderImplementation saleStakeholderImplementation, ISaleStakeholderListImplementation saleStakeholderListImplementation, ISaleSummaryImplementation saleSummaryImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository, ConfigFile.IScriptingConfiguration scriptingConfiguration, ConfigFile.IOnlineConfiguration onlineConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| ISaleImplementation | saleImplementation | |
| ISaleEntityImplementation | saleEntityImplementation | |
| ISaleListImplementation | saleListImplementation | |
| ISaleStakeholderImplementation | saleStakeholderImplementation | |
| ISaleStakeholderListImplementation | saleStakeholderListImplementation | |
| ISaleSummaryImplementation | saleSummaryImplementation | |
| ISoRequestItemsAccessor | accessor | |
| IDebugUser | debugUser | |
| IServiceCallsRepository | serviceCallsRepository | |
| IScriptingConfiguration | scriptingConfiguration | |
| IOnlineConfiguration | onlineConfiguration |
Methods
AddSaleStakeholdersAsync(int, SaleStakeholder[], CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task AddSaleStakeholdersAsync(int saleId, SaleStakeholder[] saleStakeholders, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | |
| SaleStakeholder[] | saleStakeholders | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
BatchUpdateNextDueDateAsync(CancellationToken)
Re-calculate all the next due dates
Declaration
public Task BatchUpdateNextDueDateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
CreateDefaultSaleEntityAsync(CancellationToken)
Loading default values into a new SaleEntity.
Declaration
public Task<SaleEntity> CreateDefaultSaleEntityAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleEntity> | New SaleEntity with default values |
CreateDefaultSaleStakeholderAsync(CancellationToken)
Loading default values into a new SaleStakeholder.
Declaration
public Task<SaleStakeholder> CreateDefaultSaleStakeholderAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleStakeholder> | New SaleStakeholder with default values |
CreateDefaultSaleSummaryAsync(CancellationToken)
Loading default values into a new SaleSummary.
Declaration
public Task<SaleSummary> CreateDefaultSaleSummaryAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleSummary> | New SaleSummary with default values |
DeleteSaleEntityAsync(int, CancellationToken)
Deletes the SaleEntity
Declaration
public Task DeleteSaleEntityAsync(int saleEntityId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleEntityId | The identity of the SaleEntity |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
DeleteSaleStakeholderAsync(int, CancellationToken)
Deletes the SaleStakeholder
Declaration
public Task DeleteSaleStakeholderAsync(int saleStakeholderId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleStakeholderId | The identity of the SaleStakeholder |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
DeleteSaleStakeholdersAsync(int[], CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task DeleteSaleStakeholdersAsync(int[] saleStakeholderIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | saleStakeholderIds | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
GetMyOpportunitiesAsync(int, CancellationToken)
Returning the opportunities (open sales) belonging to the user currently logged on
Declaration
public Task<Sale[]> GetMyOpportunitiesAsync(int count, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | count | The number of sales that is returned. -1 returns all. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale[]> | Array of open sales (opportunities). |
GetNextDueDateAsync(int, CancellationToken)
Gets the next due date for a sale. The next due date is the next future appointment that is not completed.
Declaration
public Task<DateTime> GetNextDueDateAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | Sale id |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<DateTime> | Next due date for the given sale. |
GetNextSaleStageAsync(int, bool, CancellationToken)
Gets the next (not deleted) sale stage id if the current stage is deleted. If the current stage is not deleted, the CurrentStageId is returned
Declaration
public Task<int> GetNextSaleStageAsync(int saleId, bool includeCurrentStage, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | |
| bool | includeCurrentStage | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<int> |
GetOpenSalesForContactAsync(int, CancellationToken)
Returns all open sales for the contact provided.
Declaration
public Task<Sale[]> GetOpenSalesForContactAsync(int contactId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | The ID of the contact whose sales we want. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale[]> | Aray of sales. |
GetProbabilityFromStageAsync(int, CancellationToken)
Get the probability percentage for a given sale stage
Declaration
public Task<int> GetProbabilityFromStageAsync(int stageId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | stageId | Probability list id |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<int> | Probability percentage |
GetRecentSalesAsync(int, int, CancellationToken)
Returns the latest sales (that are sold) limited by their amount. The result is sorted descending with the latest first. If the amount is -1, the amount restriction is omitted.
Declaration
public Task<Sale[]> GetRecentSalesAsync(int amountLimit, int count, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | amountLimit | The amount limit in the local currency. |
| int | count | The maximum number of items to return. If -1 all are returned. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale[]> | Array of all recent sales. |
GetSaleAsync(int, CancellationToken)
Gets a Sale object.
Declaration
public Task<Sale> GetSaleAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | The identifier of the Sale object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale> | A single Sale |
GetSaleEntityAsync(int, CancellationToken)
Gets a SaleEntity object.
Declaration
public Task<SaleEntity> GetSaleEntityAsync(int saleEntityId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleEntityId | The identifier of the SaleEntity object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleEntity> | A single SaleEntity |
GetSaleListAsync(int[], CancellationToken)
Gets an array of Sale objects.
Declaration
public Task<Sale[]> GetSaleListAsync(int[] saleIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | saleIds | The identifiers of the Sale object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale[]> | Array of Sale |
GetSaleStakeholderAsync(int, CancellationToken)
Gets a SaleStakeholder object.
Declaration
public Task<SaleStakeholder> GetSaleStakeholderAsync(int saleStakeholderId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleStakeholderId | The identifier of the SaleStakeholder object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleStakeholder> | A single SaleStakeholder |
GetSaleStakeholderByIdAsync(int[], CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<SaleStakeholder[]> GetSaleStakeholderByIdAsync(int[] saleStakeholderIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | saleStakeholderIds | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleStakeholder[]> |
GetSaleStakeholderListAsync(int[], CancellationToken)
Gets an array of SaleStakeholder objects.
Declaration
public Task<SaleStakeholder[]> GetSaleStakeholderListAsync(int[] saleStakeholderIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | saleStakeholderIds | The identifiers of the SaleStakeholder object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleStakeholder[]> | Array of SaleStakeholder |
GetSaleStakeholdersAsync(int, CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<SaleStakeholder[]> GetSaleStakeholdersAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleStakeholder[]> |
GetSalesByDateAsync(DateTime, DateTime, int, SaleStatus, CancellationToken)
Returns all sales within a time period. The sales array can be limited by amount and status.
Declaration
public Task<Sale[]> GetSalesByDateAsync(DateTime fromDate, DateTime toDate, int amountLimit, SaleStatus status, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | fromDate | The beginning of the time interval. |
| DateTime | toDate | The end of the time interval. |
| int | amountLimit | The amount limit in the local currency. -1 means no amount limit |
| SaleStatus | status | The sale status (Lost, Open, Sold, Unknown). SaleStatus.Unknown means no status filtering. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale[]> | Array of sales. |
GetSalesFromContactAsync(int, bool, CancellationToken)
Returns all sales for the contact provided.
Declaration
public Task<Sale[]> GetSalesFromContactAsync(int contactId, bool onlyOpenSales, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | The ID of the contact whose sales we want. |
| bool | onlyOpenSales | If true, only get open sales. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale[]> | List of sales matching query |
GetSalesFromPersonAsync(int, bool, CancellationToken)
Returns all sales for the person provided.
Declaration
public Task<Sale[]> GetSalesFromPersonAsync(int personId, bool onlyOpenSales, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The ID of the person whose sales we want. |
| bool | onlyOpenSales | If true, only get open sales. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale[]> | List of sales matching query |
GetSummaryByAssociateAsync(int, DateTime, DateTime, CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<SaleSummary> GetSummaryByAssociateAsync(int associateId, DateTime fromDate, DateTime toDate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| DateTime | fromDate | |
| DateTime | toDate | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleSummary> |
GetSummaryByContactAsync(int, DateTime, DateTime, CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<SaleSummary> GetSummaryByContactAsync(int contactId, DateTime fromDate, DateTime toDate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | |
| DateTime | fromDate | |
| DateTime | toDate | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleSummary> |
GetSummaryByGroupAsync(int, DateTime, DateTime, CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<SaleSummary> GetSummaryByGroupAsync(int groupId, DateTime fromDate, DateTime toDate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | groupId | |
| DateTime | fromDate | |
| DateTime | toDate | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleSummary> |
GetUpcomingSalesAsync(int, int, CancellationToken)
Returns all open sales, sorted descending with the latest first. If the weigthed amount is -1, the amount restriction is omitted.
Declaration
public Task<Sale[]> GetUpcomingSalesAsync(int weightedAmountLimit, int count, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | weightedAmountLimit | The amount weighted by the probability that the sale is closed (amount * probability). |
| int | count | The maximum number of items to return. If -1 all are returned. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Sale[]> | Array of upcoming sales. |
HasGuideActivitiesAsync(int, CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<bool> HasGuideActivitiesAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> |
HasGuideAsync(int, CancellationToken)
Does this sale have a sale guide associated with its sale type?
Declaration
public Task<bool> HasGuideAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | Sale id |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the sale has a guide |
HasStakeholderSettingAsync(int, CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<bool> HasStakeholderSettingAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> |
IsNumberValidAsync(int, string, CancellationToken)
Checks if the number is unique or required. The setting is configured from admin under system options.
Declaration
public Task<bool> IsNumberValidAsync(int contactId, string number, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | SaleId |
| string | number | Number value to check for uniqueness/required |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the number is valid |
OfferAutoNextStageOnApppointmentCompletedAsync(int, CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<bool> OfferAutoNextStageOnApppointmentCompletedAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | appointmentId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> |
SaleHasQuoteAsync(int, CancellationToken)
Returns true is the sale has a quote
Declaration
public Task<bool> SaleHasQuoteAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | The id of the sale |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the sale has a quote |
SaveSaleEntityAsync(SaleEntity, CancellationToken)
Updates the existing SaleEntity or creates a new SaleEntity if the id parameter is 0.
Declaration
public Task<SaleEntity> SaveSaleEntityAsync(SaleEntity saleEntity, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleEntity | saleEntity | The SaleEntity that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleEntity> | New or updated SaleEntity |
SaveSaleStakeholderAsync(SaleStakeholder, CancellationToken)
Updates the existing SaleStakeholder or creates a new SaleStakeholder if the id parameter is 0.
Declaration
public Task<SaleStakeholder> SaveSaleStakeholderAsync(SaleStakeholder saleStakeholder, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleStakeholder | saleStakeholder | The SaleStakeholder that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleStakeholder> | New or updated SaleStakeholder |
SetAsLostAsync(int[], CancellationToken)
Change the status of one or more sales to Lost. Note that this does not affect the Completed state of the sale.
Declaration
public Task SetAsLostAsync(int[] saleIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | saleIds | Array of sale ids to be marked as lost. All normal write access rules apply. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SetAsLostWithReasonAsync(int[], int, CancellationToken)
Change the status of one or more sales to Lost. Note that this does not affect the Completed state of the sale.
Declaration
public Task SetAsLostWithReasonAsync(int[] saleIds, int reasonId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | saleIds | Array of sale ids to be marked as lost. All normal write access rules apply. |
| int | reasonId | The ID of the lost reason. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SetAsSoldAsync(int[], CancellationToken)
Change the status of one or more Sales to Sold. Note that this does not mark them as Completed.
Declaration
public Task SetAsSoldAsync(int[] saleIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | saleIds | Array of sale ids to be marked as lost. All the normal write access rules apply. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SetAsSoldWithReasonAsync(int[], int, CancellationToken)
Change the status of one or more Sales to Sold. Note that this does not mark them as Completed.
Declaration
public Task SetAsSoldWithReasonAsync(int[] saleIds, int reasonId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | saleIds | Array of sale ids to be marked as lost. All the normal write access rules apply. |
| int | reasonId | The ID of the sold reason. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
UpdateSaleStakeholdersAsync(SaleStakeholder[], CancellationToken)
Proxy class for the Sale Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<SaleStakeholder[]> UpdateSaleStakeholdersAsync(SaleStakeholder[] stakeholders, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleStakeholder[] | stakeholders | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaleStakeholder[]> |
ValidateSaleEntityAsync(SaleEntity, CancellationToken)
Check that entity is ready for saving, return error messages by field.
Declaration
public Task<StringDictionary> ValidateSaleEntityAsync(SaleEntity saleEntity, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleEntity | saleEntity | Entity to be checked for errors. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StringDictionary> | Error messages tagged by field. |