Feedback Actions
Stubbucks Soft Limit Reached Feedback Action
Explains the soft stubbucks limit feedback action that runs when a stub's lifetime spend crosses the soft threshold. Useful for cost alerting, early warnings to case owners, and spotting runaway stubs before they get expensive.
Overview
When a stub's total lifetime stubbucks spend crosses the soft threshold configured in Stubbucks Limits, the _stubbucks_soft_limit_reached feedback action is triggered on that stub.
The soft limit is the early warning. Nothing is stopped by default, so this action is where you decide who should be told and what should happen. The stricter counterpart is _stubbucks_hard_limit_reached.
The action is only triggered if the soft limit has been enabled in Org Settings. Setting a threshold on its own does nothing.
All the details of the limit that tripped are available in the stubpost.data._stubber_platform.stubbucks_limit data path.
The action is triggered on the crossing, not on every action once the stub is over the limit. To keep being told while a stub stays over the line, set Run again after (seconds) on the limit.
The stubpost message is set to a human readable summary, i.e. stubpost.message:
Like all followup actions, this action runs as the Stubber system contact rather than as a user, so its permissions must include a contact list that the system contact resolves into.
Data Structure
Feedback Action Data
Example data that is passed to the _stubbucks_soft_limit_reached feedback action:
Properties
limit_key string
Which limit tripped, soft or hard. Useful when both limits point at the same action.
reason string
Why the action was triggered.
threshold_stubbucks number
The threshold that was crossed, in stubbucks. This is the value set in Org Settings.
threshold_msb number
The same threshold in msb. 1000 msb = 1 stubbuck.
total_price_stubbucks number
The stub's total lifetime spend, in stubbucks, at the moment the limit tripped.
total_price_msb number
The stub's total lifetime spend in msb.
previous_msb number
The stub's total lifetime spend in msb before the action that tripped the limit. The difference between this and total_price_msb is what the triggering action cost.
Linking Data
The stubpost that triggered the limit is recorded on the feedback action's metadata, at stubpost.metadata.linking_data.send_action_details.sent_from:
This is how you find the action that pushed the stub over the limit.
JSONSchema
The JSONSchema of the stubpost.data._stubber_platform.stubbucks_limit is: