Home > @poq/sdk-sfcc > PriceAdjustment
Document representing a price adjustment within a basket or order. Price adjustments can be assigned at the order, product, or shipping level. They can be created by the promotion engine (if the custom flag is set to false) or can be added by custom logic (if the custom flag is set to true). For custom price adjustments created by a user, the manual flag should be set to true; this is always the case for price adjustments created using OCAPI.
Signature:
export declare class PriceAdjustment extends BaseModel<PriceAdjustment>
Extends: BaseModel<PriceAdjustment
Constructor | Modifiers | Description |
---|---|---|
(constructor)(params) | Constructs a new instance of the PriceAdjustment class |
Property | Modifiers | Type | Description |
---|---|---|---|
appliedDiscount? | Discount | (Optional) | |
couponCode? | string | (Optional) The coupon code that triggered the promotion, provided the price adjustment was created as the result of a promotion being triggered by a coupon. | |
createdBy? | string | (Optional) The user who created the price adjustment. | |
creationDate? | string | (Optional) Returns the value of attribute ‘creationDate’. | |
custom? | boolean | (Optional) A flag indicating whether this price adjustment was created by custom logic. This flag is set to true unless the price adjustment was created by the promotion engine. | |
itemText? | string | (Optional) The text describing the item in more detail. | |
lastModified? | string | (Optional) Returns the value of attribute ‘lastModified’. | |
manual? | boolean | (Optional) A flag indicating whether this price adjustment was created in a manual process. For custom price adjustments created using the shop API, this always returns true. Using the scripting API, however, it is possible to set this to true or false, according to the use case. | |
price? | number | (Optional) The adjustment price. | |
priceAdjustmentId? | string | (Optional) The price adjustment id (uuid). | |
promotionId? | string | (Optional) The id of the related promotion. Custom price adjustments can be assigned any promotion id so long it is not used by a price adjustment belonging to the same item and is not used by promotion defined in the promotion engine. If not specified, a promotion id is generated. | |
promotionLink? | string | (Optional) The URL addressing the related promotion. | |
reasonCode? | PriceAdjustmentReasonCodeEnum | (Optional) The reason why this price adjustment was made. |