Show / Hide Table of Contents

Class SaleGuideUtility

Inheritance
object
SaleGuideUtility
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM
Assembly: SoDataBase.dll
Syntax
public static class SaleGuideUtility

Methods

BatchUpdateNextDueDateAsync(ProgressEstimateCallback, ProgressStepCallback, CancellationToken)

Updates the next due date for all sales.

Declaration
public static Task BatchUpdateNextDueDateAsync(ProgressEstimateCallback estimateCB, ProgressStepCallback stepCB, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ProgressEstimateCallback estimateCB
ProgressStepCallback stepCB
CancellationToken cancellationToken
Returns
Type Description
Task

CalculateNextDueDateAsync(int, CancellationToken)

Calculates the next due date for a given sale. This method takes into account the status of the sale.

Declaration
public static Task<NextDateInfo> CalculateNextDueDateAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int saleId

Identifies the sale for which you want to calculate the next due date

CancellationToken cancellationToken
Returns
Type Description
Task<NextDateInfo>

The DateTime representing the next due date for the supplied sale identifier

Remarks

If a sale is stalled, the next due date will be the re-open date. If the sale is done, the next due date will be the sale date. The same is the case when no valid appointments can be found for a given sale.

GetNextDueAppointmentDateAsync(int, CancellationToken)

Gets the active date from the first appointment associated with the specified sale. This method does not take into account the status of the sale.

Declaration
public static Task<NextDateInfo> GetNextDueAppointmentDateAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int saleId

Identifies the sale for which you want to calculate the next due date

CancellationToken cancellationToken
Returns
Type Description
Task<NextDateInfo>

The DateTime representing the next due date for the supplied sale identifier. Returns DateTime.MinValue if no appointment is found

Remarks

We loop through all the appointments for a sale and find the first one that has not been completed and is not a child appointment.

GetNextSaleStageAsync(int, bool, CancellationToken)

Declaration
public static Task<int> GetNextSaleStageAsync(int saleId, bool includeCurrentStage, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int saleId
bool includeCurrentStage
CancellationToken cancellationToken
Returns
Type Description
Task<int>

LastActivityOfStageDoneAsync(int, int, int, CancellationToken)

Determine if (all instances of) the last activity of the given stage/sale are Complete, AND that the given suggestedappointment is in fact the last one of the stage

Declaration
public static Task<bool> LastActivityOfStageDoneAsync(int saleId, int stageId, int suggestedAppointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int saleId
int stageId
int suggestedAppointmentId
CancellationToken cancellationToken
Returns
Type Description
Task<bool>

OfferAutoNextStageOnApppointmentCompletedAsync(int, CancellationToken)

Determine if we should offer the user auto-advance to next stage, based on a just-completed appointment

Declaration
public static Task<bool> OfferAutoNextStageOnApppointmentCompletedAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId
CancellationToken cancellationToken
Returns
Type Description
Task<bool>
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top