---
title: "DiscountLine - Liquid Object Reference"
source: https://support.storeconnect.com/articles/discount-line-liquid-object-reference
type: article
format: markdown
site: StoreConnect Support — product and developer documentation for StoreConnect
site_index: https://storeconnect.com/llms.txt
docs_index: https://support.storeconnect.com/llms.txt
note: Append .md to any page or article URL on this site to get its Markdown form.
---
# DiscountLine - Liquid Object Reference

## Description

The DiscountLine object holds the total discount one promotion applied to a cart or order. Read a list of them from `discount_breakdown_lines` on the [Cart](cart-liquid-object-reference) or [Order](order-liquid-object-reference) object to show each promotion as a separate row in a summary, instead of one combined discount total.

Each line totals the discount for one promotion across every item it applied to, including a shipping discount. Sale prices are not included, because they are not promotions.

In POS templates, such as a [POS receipt template](pos-receipt-template), `discount_breakdown_lines` is available on the Cart and Order objects with three differences:

- A line has `name`, `amount`, and `points`, but no `id`.
- A promotion that has since been deleted shows the name `Promotion` instead of an empty name.
- A line whose total is zero or negative is left out, so the negative refund values described under [Signs and refunds](#signs-and-refunds) do not appear at POS.

## Attributes

| Attribute | Type | Description |
|-----------|------|-------------|
| `amount` | Number | Returns the currency discount this promotion applied. `0` when the promotion discounted points only |
| `id` | String | Returns the Salesforce ID of the promotion (`s_c__Promotion2__c`). Use it as a stable key, for example in a `data-` attribute, because the name can change |
| `name` | String | Returns the display name of the promotion. Empty when the promotion has since been deleted |
| `points` | Number | Returns the points discount this promotion applied. `0` when the promotion discounted currency only |

## Signs and refunds

On a sale, `amount` and `points` are positive numbers. On a refund order they are negative, because the line adds value back to what was returned. Multiply by `-1` for display, so a sale shows as money off and a refund as money back.

## Cart and order differences

- **Cart** — returns lines only when the store uses [Promotions v2](advanced-promotions). On a store that still uses the original promotions, `current_cart.discount_breakdown_lines` is always empty.
- **Order** — always returns lines for the promotions applied when the order was placed, whichever promotions version the store uses now.

## Example

Itemize promotions in a cart summary, showing a currency amount, a points amount, or both:


```liquid

{% for discount_line in current_cart.discount_breakdown_lines %}
  <div class="summary-row" data-promotion-id="{{ discount_line.id }}">
    <span>{{ discount_line.name | default: "Discount" }}</span>
    <span>
      {% if discount_line.amount != 0 %}{{ discount_line.amount | times: -1 | money }}{% endif %}
      {% if discount_line.amount != 0 and discount_line.points != 0 %} and {% endif %}
      {% if discount_line.points != 0 %}{{ discount_line.points | times: -1 | points }}{% endif %}
    </span>
  </div>
{% endfor %}
```


For a cart where a promotion named "10% off shirts" took 15.00 off, the summary shows a "10% off shirts" row with the amount as a negative value in the store's currency, such as `-$15.00`. The same loop works on an order confirmation page with `current_order.discount_breakdown_lines`.

## Available on

- [Cart - Liquid Object Reference](cart-liquid-object-reference) — `discount_breakdown_lines`
- [Order - Liquid Object Reference](order-liquid-object-reference) — `discount_breakdown_lines`

---

## Follow StoreConnect

- [Email Newsletter](https://storeconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://storeconnect.com/partners)
- [Become a Partner](https://storeconnect.com/become-a-partner)
- [News](https://storeconnect.com/articles/news)
- [Events](https://storeconnect.com/articles/events)
- [Feature Comparison](https://storeconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://storeconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

## Machine-readable

- [Site index for agents](https://storeconnect.com/llms.txt): curated map of the StoreConnect site in llms.txt format
- [Documentation index for agents](https://support.storeconnect.com/llms.txt): full technical and product documentation map

Every page and article on this site has a Markdown rendering: append `.md` to its URL.

Continue in Markdown: [Help documentation](https://support.storeconnect.com/help-documentation.md) · [Developer reference](https://support.storeconnect.com/developer-reference.md) · [Videos & tutorials](https://support.storeconnect.com/videos-tutorials.md) · [Release notes](https://support.storeconnect.com/release-notes.md)

---

StoreConnect Support — https://support.storeconnect.com/articles/discount-line-liquid-object-reference