diff --git a/src/Tracker/BaseTracker.php b/src/Tracker/BaseTracker.php index fa99d36..b8a3462 100644 --- a/src/Tracker/BaseTracker.php +++ b/src/Tracker/BaseTracker.php @@ -89,6 +89,7 @@ protected function distinguishProcess($process, $isFirstPosition = false) } $process = strtolower($process); + if (preg_match('(counter|outbound|transhipment|collection|collected|picked up)', $process)) { return "item_received"; } @@ -105,6 +106,10 @@ protected function distinguishProcess($process, $isFirstPosition = false) return "facility_process"; } + if (preg_match('(unsuccessful|failed)', $process)) { + return "delivery_failed"; + } + if (preg_match('(delivery|with courier)', $process)) { return "out_for_delivery"; }