Notifications for Write-offs in Returns

Tags: v9

New notifications have been added for processing order returns via the API. This allows plugins to respond to the return of items and perform necessary actions in external systems or prohibit the return.

The following notifications have been added to INotificationService:

INotification<(Guid orderId, IReadOnlyCollection<Guid> returnOrderItemIds, Guid removalTypeId)> PartialOrderItemsRemovalTypeSelected { get; }

INotification<(Guid orderId, Guid removalTypeId)> RemovalTypeSelected { get; }

Plugins can subscribe to these notifications and, if necessary, cancel the further execution of the return operation if processing in the external system has failed. This is especially important for plugins working with marked goods (e.g., alcohol), where it is necessary to cancel write-offs in external systems upon return.