---
title: >-
  lineItem.discountedTotalSet can optionally include code based discounts -
  Shopify developer changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/lineitem-discountedtotalset-can-optionally-include-code-based-discounts
  md: >-
    https://shopify.dev/changelog/lineitem-discountedtotalset-can-optionally-include-code-based-discounts.md
metadata:
  effectiveApiVersion: 2024-04
  affectedApi:
    - displayName: Admin GraphQL API
      handle: admin-graphql
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: Update
    handle: update
  indicatesActionRequired: false
  createdAt: '2024-02-21T16:08:56-05:00'
  postedAt: '2024-02-23T15:58:00-05:00'
  updatedAt: '2024-02-22T09:37:50-05:00'
  effectiveAt: '2024-02-23T15:58:00-05:00'
---

February 23, 2024

Tags:

* Admin GraphQL API
* 2024-04

# `lineItem.discountedTotalSet` can optionally include code based discounts

As of the 2024-04 version of the GraphQL Admin API, you can use the new argument `withCodeDiscounts` on the `order.lineItem.discountedTotalSet` field to include or exclude line item discounts originating from a discount code. The current behaviour of `discountedTotalSet` is to exclude code based discounts and as such, the default value for this option is `false` so there will be no change required for clients who want to continue to have them excluded.

See the documentation for `discountedTotalSet` on [Shopify.dev](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LineItem#field-lineitem-discountedtotalset). The argument is already available on the `unstable` Admin API.
