Line groups: how a rule selects products

Updated · SMART Functions Creator (E-TRADE PARTNER)

A Line group is a named filter over cart lines. Conditions use Line groups to ask questions ("at least 2 units in this group") and actions use them as targets ("discount this group"). The same Line group model is available across Discounts, Payment customizations, Delivery customizations, and Cart and checkout validations.

5.0 · SMART Functions Creator builds this as a Shopify Function, free on live stores, no code.

Install free
On this page
  1. Ways to match a cart line
  2. Using Line groups

Ways to match a cart line

  • Specific products or specific variants
  • Collections (note: a collection whose source is variants may not match; select the variants directly)
  • Product tags, vendor, product type
  • SKU with string operators (equals, contains, starts with, ends with, regex)
  • Variant name with string operators, so every variant whose title matches joins the group without picking IDs
  • Product or variant metafield values
  • Line item property with a predefined key and value. Arbitrary matching on unknown property keys is not supported; the key must be configured in the rule
  • Selling plan present or absent, applied discount present, compare-at price present

Using Line groups

  • To scope a discount to a collection, target the action at the collection's Line group. It does not become storewide by itself.
  • To compare groups, use Line group quantity, Line group total, or Compare line groups conditions. Comparisons are direct (greater than, equal, and so on); the builder does not multiply, add, or round.
  • A validation that caps quantity per product needs one Line group per product; a single collection or tag group sums every matching item.
  • Very large product lists count toward the 10 KB configuration limit. Prefer collections or tags for big ranges.

Related articles