PrioritizeDiscount Method
Sets or updates the priority of a discount.
Namespace: Microsoft.CommerceServer.Marketing.WebService
Assembly: Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)
Syntax
'Declaration
<WebMethodAttribute> _
Public Overridable Sub PrioritizeDiscount ( _
campaignItemId As Integer, _
newPriority As Integer, _
prioritizeOption As PrioritizeOption _
)
'Usage
Dim instance As MarketingWebService
Dim campaignItemId As Integer
Dim newPriority As Integer
Dim prioritizeOption As PrioritizeOption
instance.PrioritizeDiscount(campaignItemId, _
newPriority, prioritizeOption)
[WebMethodAttribute]
public virtual void PrioritizeDiscount(
int campaignItemId,
int newPriority,
PrioritizeOption prioritizeOption
)
[WebMethodAttribute]
public:
virtual void PrioritizeDiscount(
int campaignItemId,
int newPriority,
PrioritizeOption prioritizeOption
)
public function PrioritizeDiscount(
campaignItemId : int,
newPriority : int,
prioritizeOption : PrioritizeOption
)
Parameters
- campaignItemId
Type: System..::.Int32
The campaign item identifier of the discount to prioritize.
- newPriority
Type: System..::.Int32
The new priority of the discount.
- prioritizeOption
Type: Microsoft.CommerceServer.Marketing..::.PrioritizeOption
A prioritize setting to determine how to adjust other discounts.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | campaignItemId is less than zero. |
ArgumentNullException | The newPriority value is invalid. |
NotAuthorizedException | The user is not authorized to perform the requested operation. |
EntityDoesNotExistException | The campaignItemId does not exist. |
EntityStateException | The campaignItemId is deleted, or active. |
DiscountPrioritizationException | The newPriority priority cannot be assigned. |
DatabaseIntegrityException | A serious integrity issue with the database exists. |
Remarks
Used to prioritize a single discount.
The discount priority determines when the discount should be applied to a product relative to other discounts that apply to a product.
The PrioritizeOption enumeration shall be:
GroupWithSamePriority - The existing discount priorities should remain unchanged,
InsertRelative - The existing discount priorities should be shifted up (increasing their priority level).
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.