Skip to content
← Back to Index

OnTicketComplete

This hook runs during the completion of a Ticket Actor. sendMessage effects can be returned to cause side-effects in other actors. validationError may be used to block completion of the ticket.

Type

filtrera
{
  hook: 'OnTicketComplete'
  ticket: Ticket
}

Effects

sendMessage Behavior

In most hooks, sendMessage effects are optimistically applied, meaning errors and responses are ignored. In the case of OnTicketComplete messages are sent and checked for returned errors before any message is applied.

This is done by the system previewing all messages before actually sending them. If any message results in an error, the ticket completion is aborted and the error is returned.

`effects.common.sendMessage` Sends a message to another actor **before** ticket is completed. Errors **will** abort ticket completion.
`effects.common.scheduleJob` Schedules a job
`effects.common.sendEmail` Queues an email for delivery through the Sendings system
`effects.common.validationError` Aborts the completion of the ticket and returns the error to the caller.

© 2024 Hantera AB. All rights reserved.