다음을 통해 공유


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.

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

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace