Skip to main content

Perform Price Adjustments

Price adjustments allow you to dynamically modify the price of items in a product selection, such as when you want to implement a discount in your pricing model. Price Rules supports absolute, relative, and percentage price adjustments:

Price adjustmentDescriptionExample use case
AbsoluteSets the price of items in a selection to a specific amount.Discount selected items to $4.00.
RelativeRaises or lowers prices by a specified amount.Take $1.00 off the price of selected items.
PercentageRaises or lowers prices by a specified percentage.Take 10% off the price of selected items.

Creating a price adjustment

Important: To make adjustments that result in a price increase on the Shopify platform, you must install the Bold Cashier app. This is due to a limitation of the DraftOrder operation in the Shopify Admin API.

To create a price adjustment with Price Rules, add a rule to your ruleset that includes a price adjustment action.

All price adjustment actions require these properties:

NameTypeDescription
typestring enumerationThe type of price adjustment to apply.
valueintegerThe amount of the price adjustment.

The following discount rule uses the PRICE_ADJUST_ABSOLUTE action type to set the price of items to $4.00:

"rules": [
{
"type": "DISCOUNT",
"actions": [
{
"type": "PRICE_ADJUST_ABSOLUTE",
"value": 400
}
]
}
]
note

Price Rules ignores actions that reduce the price below $0.00.

Unlimited price adjustments

Basic price adjustment actions, such as in the example above, are unlimited — they impose no restriction on the quantity or kind of items they affect.

Price Rules supports these basic price adjustment types and values:

Action typeValueExample
PRICE_ADJUST_ABSOLUTEA non-negative integer that represents the new price.A value of 400 sets the price to $4.00.
PRICE_ADJUST_RELATIVEAn integer that represents the amount to add or subtract from the price.A value of -100 reduces the price by $1.00.
PRICE_ADJUST_PERCENTAGEAn integer that represents the percent by which to raise or lower the base price.A value of -10 lowers the base price by 10%.

To limit the quantity or kind of items affected by a price adjustment, use a limited price adjustment.

Limited price adjustments

note

Price Rules does not support limited percentage price adjustments.

Limited price adjustments work like their unlimited counterparts except that they limit the quantity and scope of items that can benefit from the adjustment. For example, use a limited price adjustment to offer a discount on all variants of a product, with a limit of 4 discounted items per cart.

Limited price adjustment actions require these properties:

NameTypeDescription
typestring enumerationThe type of price adjustment to apply. Available options are PRICE_ADJUST_ABSOLUTE_WITH_LIMIT and PRICE_ADJUST_RELATIVE_WITH_LIMIT.
valueintegerThe amount of the price adjustment.
limitintegerThe maximum number of items that can benefit from the adjustment.
limit_scopestring enumerationThe class of items that can benefit from the adjustment. Available options are product, variant, and lineitem.

This example rule uses the PRICE_ADJUST_RELATIVE_WITH_LIMIT action type to lower the price by $5.00 on a maximum of 4 products:

"rules": [
{
"type": "DISCOUNT",
"actions": [
{
"type": "PRICE_ADJUST_RELATIVE_WITH_LIMIT",
"value": -500,
"limit": 4,
"limit_scope": "product"
}
]
}
]

Creating targeted pricing rules

Combine price adjustment actions with conditions to create targeted pricing rules.

To create a targeted pricing rule, follow this pattern:

  1. Add a new rule to your ruleset and set the rule type to one of the discount layersDISCOUNT or STACKABLE_DISCOUNT. (For more on working with rule types, see Priority and stacking.)
  2. Add a condition to the rule that qualifies purchases based on the customer or the quantity of items they are purchasing. (For a guide to working with these conditions, see Customer-targeted pricing)
  3. Add an action to the rule that applies the desired price adjustment to qualified purchases.

The following example ruleset takes $1.00 off the price of selected SKUs for customers who are members of the first-time-buyer group:

{
"ruleset": {
"external_id": "Relative_Price_Adjustment_First_Time_Buyer",
"internal_name": "Relative price adjustment for first time buyer",
"product_selection": {
"type": "PRODUCT_SEARCH",
"sku_ids": ["PO-TS-34-BK", "PO-TS-34-BL"]
},
"rules": [
{
"type": "DISCOUNT",
"conditions": [
{
"type": "CUSTOMER_GROUP",
"value": "first-time-buyer"
}
],
"actions": [
{
"type": "PRICE_ADJUST_RELATIVE",
"value": -100
}
]
}
]
}
}

To publish your discount, use the Price Rules API to create a ruleset.