Need to create rules based on bundles?
Learn more
LogoLogo
APIsChangelog
  • Getting started
  • Rules
  • Conditions
    • Scope
    • Aggregations
    • Nested
    • Dynamic values
  • Actions
    • Types
      • Percentage
      • Fixed amount
      • Fixed price
      • Buy X pay Y
      • Every X discount Y
    • Bundle
      • Balanced
      • Every
    • Aggregation
    • Limit
  • Matchers
  • Operators
  • Check and validation
  • Core API integration
    • Order rules
    • Price rules
    • Virtual relationships
  • Resources
    • Promotions
    • Price lists
  • Use cases
    • Promotions
      • Discount line items based on item's price
      • Get a discount when paying by credit card
      • Discount an order based on promo item and total number of items
      • Offer a specific shipping method for free in a specific country
      • Discount items with large stock availability
      • Discount all the SKU in an order based on the shipping country
      • Discount all the SKU in an order based on the customer email domain
    • Price lists
      • Discount all prices greater than or equal to a specific value
      • Discount specific SKUs for new clients
      • Change strike-through price based on customer email domain
On this page
  • Example
  • Value
  • Restrictions
  • Resources
  1. Actions
  2. Types

Fixed price

How the fixed price action works, what are the required and optional parameters to set it up, and the resources for which it's enabled

PreviousFixed amountNextBuy X pay Y

Last updated 2 months ago

Actions of type fixed_price enable you to overwrite the unit amount of a specific field with a desired value.

When setting up a fixed price action, in addition to the action type, you need to specify at least the attribute or resource on which to apply the action as the selector key value and fill the value key with the corresponding to the new price in cents that you want to set (for more information on the parameters listed in the table below and how they work please refer to the main ):

Key
Type
Required
Notes

type

String

Must be "fixed_price".

selector

String

identifier

String

Can be set only if the selector key value is an attribute.

groups

Array

bundle

Object

aggregation

Object

apply_on

String

limit

Object

value

Integer

Example

The following action set to 2000 cents the unit amount of all the line items associated with an SKU among the ones grouped as discountable-items within the related condition matchers:

"actions": [
  {
    "type": "fixed_price",
    "selector": "order.line_items.sku",
    "groups": [ "discountable-items" ],
    "value": 2000,  
  }
]

Value

The new amount that you want to set is defined by the value key which must be provided in cents (e.g. 1500 applied to a order with currency code EUR corresponds to 15€).

Restrictions

Resources

Required when using .

Cannot be set when using .

Fixed price actions support , provided that one or more groups among the ones defined when grouping the matches of the related conditions are specified.

You can set a on fixed price actions only if you're not using bundles.

As regards the Rule Engine , the fixed price action type is available both for () and ().

bundles
limit
actions page
integer number
bundles
bundles
promotions
order rules
price lists
price rules
integration with Commerce Layer Core API