Hi
So I have like 15 tasks triggered by OrderStatusChangedNotification.
They’re all task which should be ran depending on the order status itself. Like 4 tasks have be run if the orderstatus is “processing”. 6 tasks if the orderstatus is completed. You get the idea.
Instead of starting every task with
using var scope = this.factory.CreateScoped();
IUmbracoCommerceApi commerceApi = scope.GetInstance();
var status = await commerceApi.GetOrderStatusAsync(evt.OrderStatusId.To.GetValueOrDefault());
if (status.Alias != OrderStatuses.Processing)
{
return;
}
How would you handle this?
Is there a way to customize the notificationEvent to split the OrderStatusChangedNotification into subnotifications which each handles its own order status?