Run the workflow
batchCommissionRulesWorkflow applies creates, updates, and deletes to a single
rate’s rules in parallel. Pass the target commission_rate_id and any of the
create, update, and delete arrays.
src/api/custom/rules/route.ts
{ created, updated, deleted }.
Every rule’s
reference must be one of the five dimensions: product,
product_type, product_collection, product_category, or seller. The
reference_id is the id of the specific record in that dimension.How scoping changes matching
Adding rules narrows a rate. Rules on the same dimension OR together. Rules across dimensions AND together. The twocreate rules above make the rate match
only lines that are both from seller sel_123 and in category pcat_shoes,
raising the rate’s specificity to 2.