Skip to content
← Back to Index

OnSkuCommands

This hook runs after commands have been applied to a Sku Actor from the create or applyCommands message. Commands returned from rules does not trigger the hook again.

For invariants that can only be checked after every OnSkuCommands rule has run and its commands have been applied — for example rules that depend on data set by other rules — use the OnSkuValidate hook instead.

Type

filtrera
{
  hook: 'OnSkuCommands'
  before: Sku // The sku before the commands were applied
  sku: Sku // The sku after the commands were applied
}

Effects

validationError Reverts the sku state and returns the error to the caller.
messageActor Sends a message to another actor. Responses are ignored.
scheduleJob Schedules a job.
sendEmail Queues an email for delivery through the Sendings system.
skuCommand Applies additional commands to the sku actor. Commands returned from rules do not trigger the hook again.

© 2024 Hantera AB. All rights reserved.