Click or drag to resize

BonusProgram Class

Bonus programs allow automatic adding of new line with bonus product or automatic application of discount in a sales document. Entity: Crm_Bonus_Programs
Inheritance Hierarchy

Namespace:  Aloe.EnterpriseOne.Model.Crm.Marketing
Assembly:  Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntax
public class BonusProgram : EnterpriseOneEntityObject

The BonusProgram type exposes the following members.

Constructors
  NameDescription
Public methodBonusProgram
Initializes a new instance of the BonusProgram class with specific ObjectTransaction
Top
Properties
  NameDescription
Public propertyActive
General condition if the bonus is active. The other conditions are verified only for active bonus programs. [Default(true)] [Filter(eq)]
Public propertyBonusAction
Bonus action: P-Add product to the order, A-Add amount, D-Give discount. [Required] [Default("D")] [Filter(multi eq)]
Public propertyBonusDocumentAmountPercent
The percent of the document amount that is rewarded. Should be null if and only if the bonus document amount is null.
Public propertyBonusDocumentAmountType
When not null specifies that a document amount should be added to the order when the bonus conditions are met. null means that the bonus reward is not a document amount. [Filter(multi eq)]
Public propertyBonusLineDiscountPercent
The percent discount to be applied to bonus lines. Used only for bonus programs with Action = D (Discount). [Required] [Default(0)]
Public propertyBonusProduct
The product that is rewarded if the bonus conditions are met. null means that the bonus reward is not product. [Filter(multi eq)]
Public propertyBonusProductQuantity
The quantity rewarded of the bonus product. Should be not null if and only when the bonus product is not null. [Unit: BonusProductQuantityUnit]
Public propertyBonusProductQuantityMultiplierForEachLotSize
When not null, specifies that the bonus quantity should be multiplied for each of the specified lot size. Can be non-null only when condition product is specified. [Unit: ConditionProduct.BaseMeasurementCategory.BaseUnit]
Public propertyBonusProductQuantityUnit
The measurement unit of the quantity rewarded of the bonus product. Should be not null if and only when the bonus product is not null. [Filter(multi eq)]
Public propertyChangingAttributes
Gets the attributes that are currently changing. Can be used in attribute change event handler to prevent stack overflow.
(Inherited from EditableDomainObject.)
Public propertyCompanyLocation
When set, specifies that the sales document must be of the specified enterprise company location. [Filter(multi eq)]
Public propertyConditionCustomer
When not null, specifies that the bonus should be applied only to the specified customer. [Filter(multi eq)]
Public propertyConditionCustomerFilterXML
When not null, specifies that the bonus should be applied only to customers who meet the specified criteria. The criteria could include custom properties.
Public propertyConditionDistributionChannel
When not null, specifies that the bonus should be applied only when the specified channel is used. [Filter(multi eq)]
Public propertyConditionDistributionChannelFilterXML
When not null, specifies that the bonus should be applied only when the distribution channel of the sales order has the specified characteristics.
Public propertyConditionDocumentCurrency
Condition for the document amount. Should be not null if any of the amount conditions are not null. [Filter(multi eq)]
Public propertyConditionFromDate
Starting date of the bonus. null means that there is no starting date restriction. [Filter(eq;ge;le)]
Public propertyConditionMaxAmount
If not null specifies the maximal amount for which the bonus is valid. null means that there is no maximal amount condition for the bonus. [Currency: ConditionDocumentCurrency] [Filter(eq;ge;le)]
Public propertyConditionMaxQuantity
When not null, specifies condition for the bonus - maximal quantity of the condition product. If the condition product is null, this cannot be specified. [Unit: ConditionProduct.BaseMeasurementCategory.BaseUnit] [Filter(eq;ge;le)]
Public propertyConditionMinAmount
If not null specifies the minimal amount for which the bonus is valid. null means that there is no minimal amount condition for the bonus. [Currency: ConditionDocumentCurrency] [Filter(eq;ge;le)]
Public propertyConditionMinQuantity
When not null, specifies condition for the bonus - minimal quantity of the condition product. If the condition product is null, this cannot be specified. [Unit: ConditionProduct.BaseMeasurementCategory.BaseUnit] [Filter(eq;ge;le)]
Public propertyConditionPriceList
When not null, specifies that the bonus should be applied only when the sales order is based on the speicfied price list. [Filter(multi eq)]
Public propertyConditionProduct
When not null, specifies a conditional product, which is required to exist in the sales document in order for the bonus program to be applied. If a condition with multiple products is required, additional products can be added to Bonus Program Products. If null the other conditions should be evaluated against the whole order. [Filter(multi eq)]
Public propertyConditionProductGroup
When not null, specifies that the bonus should be applied only to products from the specified product group or its subgroups. [Filter(multi eq)]
Public propertyConditionShipToCustomer
When not null, specifies that the bonus should be applied only when shipping to the specified customer. [Filter(multi eq)]
Public propertyConditionShipToCustomerFilterXML
When not null, specifies that the bonus should be applied only when shipping to customer with the specified characteristics.
Public propertyConditionTargetGroup
When not null, specifies that the bonus should be applied only to the specified target customer group. [Filter(multi eq)]
Public propertyConditionToDate
Ending date (inclusive) of the bonus. null means that there is no ending date restriction. [Filter(eq;ge;le)]
Public propertyCustomProperties
Gets the custom properties of the object.
(Inherited from EnterpriseOneEntityObject.)
Public propertyEnterpriseCompany
When set, specifies that the sales document must be of the specified enterprise company. [Filter(multi eq)]
Public propertyExtendedProperties
Extended properties contain temporary (not persisted) values in the object instance.
(Inherited from EntityObject.)
Public propertyHasProductCondition
Gets a value indicating whether this instance has product condition.
Public propertyId
The unique Id of the entity object
(Inherited from EntityObject.)
Public propertyIsGhost
Returns true when the object is a ghost object
(Inherited from EntityObject.)
Public propertyIsLoaded
Gets a value indicating whether the associated data for this domain object is loaded.
(Overrides EntityObjectIsLoaded.)
Public propertyItemString
Gets or sets the value of a data attribute
(Inherited from DomainObject.)
Public propertyItemIDataAttribute
Gets or sets the value of a data attribute
(Inherited from DomainObject.)
Public propertyName
The name of the bonus program. [Required] [Filter(eq;like)]
Public propertyNoEvents
Turns on "No events" mode and returns a class, that will turn it off when Disposed. See remarks for more info.
(Inherited from DomainObject.)
Public propertyObjectState
Gets the state of the domain object.
(Overrides EditableDomainObjectObjectState.)
Public propertyPriority
Priority (1-5) of the bonus program comparative to the other bonus programs. 1 is the lowest priority. [Required] [Default(2)] [Filter(multi eq)]
Public propertyProducts
List of BonusProgramProduct child objects, based on the Crm.Marketing.BonusProgramProduct.BonusProgram back reference
Public propertyRepository
Provides access to BonusProgramsRepository repository methods
Public propertyTransaction
The EnterpriseOne transaction to which this object is attached.
(Inherited from EnterpriseOneEntityObject.)
Top
Methods
  NameDescription
Public methodDelete
Deletes the domain object.
(Overrides EntityObjectDelete.)
Public methodDuplicateObject
Creates a copy of the object.
(Inherited from EntityObject.)
Public methodEquals(Object)
Determines whether the specified Object, is equal to this instance.
(Inherited from EntityObject.)
Public methodEquals(EntityObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from EntityObject.)
Public methodExecuteBusinessRules
Executes all business rules for the object for the specified BusinessEvent. The validation fails are saved in the event.
(Inherited from EditableDomainObject.)
Public methodGetAggregateParent
Gets the aggregate parent of this entity object. If this is the aggregate root the return value is null.
(Inherited from EntityObject.)
Public methodGetAggregateRoot
Gets the aggregate root entity object. If the entity does not have aggregate parent reference aggregate root is this entity object.
(Inherited from EntityObject.)
Public methodGetConditionProducts
Gets the condition products.
Public methodGetHashCode
Returns a hash code for this instance.
(Inherited from EntityObject.)
Public methodGetRelatedObjectsForValidation
Gets the related objects which would need validation upon validation of this object.
(Inherited from EntityObject.)
Public methodInvalidateCachedConditionProducts
Invalidates the cached condition products.
Public methodIsApplicableToProduct
Determines whether this bonus program is applicable to the specified product.
Public methodIssueWarning(String)
Issues a warning with the specified message.
(Inherited from EditableDomainObject.)
Public methodIssueWarning(ExpressionFuncString, Object)
Issues a warning with the specified message. The message can contain standard string placeholders.
(Inherited from EditableDomainObject.)
Public methodMatchesFilter(DataAccessFilter)
Returns true if this entity object matches the specified filter.
(Inherited from EnterpriseOneEntityObject.)
Public methodMatchesFilter(DataAccessFilter, IBufferRow)
Matches the filter against the specified row and returns the result of the match.
(Inherited from EnterpriseOneEntityObject.)
Public methodRefresh
Refreshes this instance with data from data source. Only objects with ObjectState equal to Unchanged are refreshed.
(Inherited from EntityObject.)
Public methodToString
Returns a String that represents this instance.
(Inherited from EntityObject.)
Public methodToString(String)
Returns a String that represents this instance.
(Inherited from EntityObject.)
Public methodTryGet
Tries to get the specified attribute and returns it or null, when it is not found.
(Inherited from DomainObject.)
Top
Extension Methods
  NameDescription
Public Extension MethodFillAggregateMissingDefaults
Recalculates the default values for all objects in the aggregate.
(Defined by EntityObjectExtensions.)
Public Extension MethodFillMissingDefaults
Executes the late default expression defined in each attribute (if any) if the current value is null or equal to a constant default.
(Defined by EntityObjectExtensions.)
Public Extension MethodFormatString
Converts the object to string based on the format specified.
(Defined by FormatStringExtensions.)
Public Extension MethodGetExtensibleDataObject
Gets the extensible data object related to the entity object. Can return null if such ExtensibleDataObject doesn't exist.
(Defined by ExtensibleDataObjectExtensions.)
Public Extension MethodGetOrCreateExtensibleDataObject
Returns an ExtensibleDataObject related to the entity object. If such object doesn't exist the object is created in the same transaction.
(Defined by ExtensibleDataObjectExtensions.)
Public Extension MethodRecalculateMasterAttributes
Recalculates the values of a master attributes in a master-detail relationship.
(Defined by EntityObjectExtensions.)
Public Extension MethodRecalculateMissingValues
Recalculates the missing values using the first reactive expression of the attributes.
(Defined by EntityObjectExtensions.)
Top
See Also