This commit is contained in:
2026-04-25 21:31:50 +02:00
parent 4931c55338
commit 4b998ea5be
16 changed files with 697 additions and 75 deletions

View File

@@ -85,6 +85,13 @@
- sprawdza warunki,
- wykonuje akcje (`send_email`, `issue_receipt`, `update_shipment_status`, `update_order_status`),
- zapisuje wynik do `automation_execution_logs`.
- Warunek `order_status` czyta status z kontekstu eventu:
- `new_status` dla eventow zmianowych (`order.status_changed`),
- `current_status` dla eventu czasu w statusie (`order.status_aged`).
- Akcja `send_email` ma opcjonalna flage `send_once_per_order`:
- konfiguracja trzymana w `automation_actions.action_config`,
- deduplikacja oparta o `automation_email_once_deliveries` (`rule_id + action_id + order_id` UNIQUE),
- wpis "wyslano raz" zapisywany tylko po udanej wysylce (`EmailSendingService::send(...)->success = true`).
## Shipment tracking — mapowanie statusow kuriera
- `ShipmentTrackingHandler` (job `shipment_tracking_sync`) iteruje po aktywnych paczkach i pobiera status z API przewoznika (`Inpost/Apaczka/AllegroTrackingService`).