karrioapi / karrio

Programmable Shipping API (self-hosted)
https://karrio.io
Apache License 2.0
539 stars 100 forks source link

Automatically detect carrier based on tracking number only #391

Open danh91 opened 1 year ago

MarcoWel commented 1 year ago

Nice! X-Referencing this here: https://github.com/karrioapi/karrio-dashboard/issues/262#issuecomment-1561174857

MarcoWel commented 10 months ago

Any update on this one? It would be indeed an #epic and very helpful feature.

danh91 commented 10 months ago

Hey @MarcoWel, This one will great to have indeed. However, it is more of really nice to have features.

I want to focus on upgrading carrier APIs before the old ones get deprecated. Hopefully eventually tackle it Q2 2024.

MarcoWel commented 10 months ago

How about just adding a Tracking ID Regex field to the carrier definition? This way, the carrier detection can be implemented easily and users that need that feature can use it already.

IMO this feature is not only nice-to-have but quite important, as it is a required for easy tracking of 3rd party shipments by inexperienced users and bulk tracking of multiple shipments as suggested here: https://github.com/karrioapi/karrio-dashboard/issues/262

danh91 commented 10 months ago

I don't doubt the usefulness but I remember spending some times spiking it and the regex/identification part of it is the tip of the iceberg and it is not a 100% accuracy solution.

Adding it to the API was the more challenging part. It requires handling wrong carrier detection, manual correction, retries…

Not as simple as it seems. 😅

I agree that it will be very helpful for batch imports. But right now, it is possible to do the batch import, it just requires knowing in advance which carrier was used to ship in addition to the tracking number which I believe most OMS and e-commerce platforms can provide.

I would love to have it in myself 😅. Just that with limited resources I also have to pick my battles 😅.

MarcoWel commented 10 months ago

I understand. But having the regex solution in place, even if it is not active as standard, would help a lot!! I can offer to provide tested regexes for selected carriers like DHL, DHL Express, UPS, Fedex.