Yield Rules
A YieldRule adjusts an offering's price according to how busy the site
is, on top of the offering's existing price rules and within its yield
price guardrails.
The YieldRule object
Attributes
The kind of offering a rule applies to. Limited to offerings booked against a service date, which is what demand is measured over.
Possible values:appointmentarea_bookingsessionpackageThe offering this rule adjusts the price of.
Shared by every rule created in the same request. The rules remain independent of one another — editing one does not affect the others — so this only records that they were created together.
The days of the week this rule applies on.
Start of the daily window this rule applies within, in the site's local time. 24-hour
HH:MM. Each selected weekday is the day its window starts on. Null alongside a nulltime_tomeans the rule applies all day.End of the daily window this rule applies within, in the site's local time. 24-hour
HH:MM. A value earlier thantime_frommeans the window runs past midnight into the following day. Null alongside a nulltime_frommeans the rule applies all day.triggersrequiredThe demand conditions under which a rule fires.
Which demand a rule can respond to depends on what its offering is made of, so the shape varies by
offering_type. An appointment needs a practitioner and a room, an area booking needs the area itself, and a session has neither — its demand is how much of the session's own capacity is taken.Only the triggers listed for the rule's offering type are accepted. Sending one belonging to another type is rejected rather than stored, because the engine has no way to measure it for this offering.
At least one band must be set. Where an offering type has more than one and both are set, the rule fires if either is satisfied, so setting both widens a rule rather than narrowing it.
The change a rule makes to the price it applies to. Signed, so a rule can discount to shift demand as well as add a premium at peak.
Rounds the adjusted price to the nearest whole unit of currency.
nullleaves the adjusted price unrounded.Possible values:onefivetenGroups yielded sales in reporting. Descriptive only — it never affects the adjustment a rule makes. Sales made when no rule applied report as an implicit standard tier, which is why it is absent here. The yielded sales report lists and totals sales by this tier.
Possible values:lowhighpeakWhen several rules could apply to the same slot, the most recently updated one wins. Saving a rule without changing it leaves this as it was.