- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
notifyOnFailureStep - Medusa Core Workflows Reference
This documentation provides a reference to the notifyOnFailureStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step sends one or more notification when a workflow fails. This step can be used in the beginning of a workflow so that, when the workflow fails, the step's compensation function is triggered to send the notification.
Example#
Input#
NotifyOnFailureStepInput
NotifyOnFailureStepInputThe notifications to send.
NotifyOnFailureStepInput
NotifyOnFailureStepInputto
stringThe address to send the notification to, depending on
the channel. For example, the email address for the email channel.
to
stringchannel
stringThe channel to send the notification through. For example, email
.
A Notification Module Provider
must be installed and configured for the specified channel.
channel
stringemail
.
A Notification Module Provider
must be installed and configured for the specified channel.template
stringThe ID of the template to use for the notification. This template ID may be defined
in a third-party service used to send the notification.
template
stringdata
Record<string, unknown> | nullOptionalThe data to use in the notification template. This data may be used to personalize
the notification, such as the user's name or the order number.
data
Record<string, unknown> | nullOptionaltrigger_type
string | nullOptionalThe type of trigger that caused the notification to be sent. For example, order_created
.
trigger_type
string | nullOptionalorder_created
.resource_id
string | nullOptionalThe ID of the resource that triggered the notification. For example, the ID of the order
that triggered the notification.
resource_id
string | nullOptionalresource_type
string | nullOptionalThe type of the resource that triggered the notification. For example, order
.
resource_type
string | nullOptionalorder
.receiver_id
string | nullOptionalThe ID of the user receiving the notification.
receiver_id
string | nullOptionaloriginal_notification_id
string | nullOptionalThe ID of the original notification if it's being resent.
original_notification_id
string | nullOptionalidempotency_key
string | nullOptionalA key to ensure that the notification is sent only once. If the notification
is sent multiple times, the key ensures that the notification is sent only once.
idempotency_key
string | nullOptionalWas this page helpful?