Order rules
How the Rules Engine integration with Commerce Layer Core API promotions resource works behind the scenes
Example
{
"rules": [
{
"name": "Get 10% off item cost plus free shipping for company customers",
"conditions": [
{
"field": "order.customer_email",
"matcher": "matches",
"value": ".*@mybrand.com"
}
],
"actions": [
{
"type": "percentage",
"selector": "order.line_items.sku",
"value": "0.1"
},
{
"type": "percentage",
"selector": "order.line_items.shipment",
"value": "1"
}
]
}
]
}Last updated