Skip to content
Log in

Discount - Liquid Object Reference

On this page

Description

The Discount object contains information about a discount that may be applied to one or more products.

:::note This object supports custom data via the data attribute. :::

Backed by

This drop renders the s_c__Discount__c Salesforce object. A theme writes it as discount.

Liquid attribute Salesforce field
apply_discount_to s_c__Apply_Discount_To__c
behaviour_when_applied s_c__Behaviour_When_Applied__c
calculation_type s_c__Calculation_Type__c
discounted_points s_c__Discounted_Points__c
discounted_price s_c__Discounted_Price__c
percent_discount s_c__Percent_Discount__c
rebate_amount s_c__Rebate_Amount__c
value_discount s_c__Value_Discount__c
value_discount_points s_c__Value_Discount_Points__c

Every other attribute on this drop is derived by StoreConnect rather than read straight from one field. The Attributes section lists them all.

Fields you add yourself are not listed above. Expose one with a Custom Data Mapping record, then read it from discount.data. See custom data fields in Liquid.

Attributes

Attribute Type Description
account Account Returns the Account that this Discount is applied to
active? Boolean Returns true if the Discount is active
apply_discount_to String Returns the type of object that the Discount is applied to: cart, product, or shipping
behaviour_when_applied String Returns the behavior when the Discount is applied: stack, replace, or set_price
brand Brand Returns the Brand that this Discount is applied to
calculation_type String Returns the calculation type for this Discount: percent, value, or discounted_price
discounted_points Number Returns the discounted points price for this Discount
discounted_price Number Returns the discounted price for this Discount
expires_at Timestamp Returns the date and time that this Discount expires
id String Returns the unique id for this Discount
membership Membership Returns the Membership that this Discount is applied to
name String Returns the name of this Discount
percent_discount String Returns the the discount as a percent for this Discount
pricebook Pricebook Returns the Pricebook that this Discount is applied to
product Product Returns the Product that this Discount is applied to
product_category ProductCategory Returns the Product Category that this Discount is applied to
rebate_amount Number Returns the rebate amount for this Discount
starts_at Timestamp Returns the start date for this Discount
value_discount Number Returns the value of the discount for this Discount
value_discount_points Number Returns the points value of the discount for this Discount

Was this article helpful?

Was this article helpful?