promocode

This topic applies to

Applies to

Commerce Web Stores

 

This object contains promotion code information for the order.

Field Name

Field Type

Description

In Get Functions?

In Set Functions?

discountamount

string

Currency amount of the discount applied to the order.

yes

no

errormsg

string

Returns the error message when a promo code is not valid.

yes

no

internalid

string

Internal ID

yes

no

isvalid

string

Indicates whether promocode is valid for the current order.

Value should be T or F.

yes

no

promocode

string

The value of the Coupon Code ID. This corresponds to what the user sets during the checkout process.

yes

yes

promocodeid

string

The value of the Promocode ID. This corresponds to the promocode displayed in the NetSuite UI.

Note

The value of this field is not changed when a coupon code is modified.


yes

yes

purchase_discount_amount

string

Currency amount of the discount applied to the order.

yes

no

purchase_discount_amount_formatted

string

Discount amount formatted with currency symbol.

yes

no

shipping_discount_amount

string

Currency amount of the discount applied to the shipping cost.

yes

no

shipping_discount_amount_formatted

string

Discount shipped amount formatted with currency symbol.

yes

no

promotion_name

string

Name of the promotion associated with the applied coupon.

yes

no

discount_name

string

Name of the discount associated with the applied promotion.

yes

no

discount_type

string

Indicates the type of discount, and its value should be PERCENTAGE or FLAT.

yes

no

discount_rate

string

Rate of the discount in percentage if the type of discount is PERCENTAGE and currency amount of the discount if the type of discount is FLAT.

yes

no

is_auto_applied

boolean

Indicates whether the promocode was automatically or manually applied for the current order.

Value should be true or false.

yes

no

applicability_status

string

Indicates whether the promocode is actually applied to the current order or not.

Value should be one of the following:

  • APPLIED — Indicates that the promocode is applied to the current order and you get a discount if the promocode is valid. It also indicates that the type of promotion is SuitePromotion.

  • NOT_APPLIED — Indicates that the promocode does not give you a discount even though it is added to the current order. It also indicates that the type of promotion is SuitePromotion.

  • NOT_AVAILABLE — Indicates that the applicability status information is not available. You get this value in case of Standard promotions.

yes

no

applicability_reason

string

Specifies the reason for not applying the promocode.

Value should be one of the following:

  • DISCARDED_BEST_OFFER — Indicates that the promocode is not applied as there is another promocode or a combination of promocodes that is giving you a better discount.

  • CRITERIA_NOT_MET — Indicates that the promocode is not applied as it does not meet the criteria. For example, if your order does not meet the minimum order amount requirement.

  • NOT_AVAILABLE — Indicates that the promocode is applied or the promotion is a Standard promotion.

yes

no

promotion_type

string

Indicates the type of promotion.

yes

no