Promotion - Liquid Object Reference
On this page
Description
The Promotion object contains information about a promotion that can be applied to an Order
:::note
This object supports custom data via the data attribute.
:::
Backed by
This drop renders the s_c__Promotion__c Salesforce object. A theme writes it as promotion.
| Liquid attribute | Salesforce field |
|---|---|
code |
s_c__Promotion_Code__c |
usage_limit |
s_c__Usage_Limit__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 promotion.data. See custom data fields in Liquid.
Attributes
| Attribute | Type | Description |
|---|---|---|
actions |
List[PromotionAction] | Returns a list of PromotionAction objects associated with this Promotion |
campaign |
Campaign | Returns the Campaign object associated with this Promotion |
code |
String | Returns the code that can be used to apply this Promotion |
expires_at |
Timestamp | Returns the timestamp when this Promotion ends |
id |
String | Returns the unique id for this Promotion |
name |
String | Returns the name of this Promotion |
scopes |
List[PromotionScope] | Returns a list of PromotionScope objects associated with this Promotion |
starts_at |
Timestamp | Returns the timestamp when this Promotion starts |
usage_count |
Number | Returns the number of times this Promotion has been used |
usage_limit |
Number | Returns the maximum number of times this Promotion can be used |
valid? |
Boolean | Returns whether this Promotion is active (within the start and expiry dates and not over the usage limit) |
Available on
- Cart - Liquid Object Reference —
promotions - PromotionAction - Liquid Object Reference —
promotion - PromotionScope - Liquid Object Reference —
promotion
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.