Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHL Express: Make ShipmentDetails > Contents easily editable for insurance information #694

Open
DarkSwoop opened this issue Sep 24, 2024 · 5 comments

Comments

@DarkSwoop
Copy link
Contributor

We need to inform the insurance company about the contents we're shipping with the packages. And for that, it would be really cool if we somehow had the ability to set this information quickly and easily through the user interface.

Currently, in the customs section, there's a description field where you have to manually enter, via free text, the contents of the package. This info is then used for insurance purposes (DHL Express / ShipmentDetails / Contents).

It would be great if we could get an additional field in the line items (item_type or so) when creating an order, where we could submit an insurance string for insurance purposes. And this could be easily selectable with a multi-select in the frontend to inform the insurance about what products are included.

To implement this we could iterate over the line items in the order, gather all the insurance descriptions, and then go through it once with a unique function to prevent duplicates in the select field. This way, the selection in the multi-select field becomes relatively simple. And then, of course, we take that and use it to write the contents part for the shipment.

Thing to consider: The DHL Express API only allows 90 characters in the ShipmentDetails > Contents field.

What do you think?

@danh91
Copy link
Member

danh91 commented Sep 28, 2024

Hi @DarkSwoop ,
I believe I understand the requirements and it make sense that insurance will require descriptions of actual commodities that are being shipped.

Would it make sense as a first approach to do this directly in the dhl_express integration for now? 🤔

@DarkSwoop
Copy link
Contributor Author

Hi @danh91, thanks for your response.

That would definitely be sufficient for the time being.

Thank you!

@danh91 danh91 mentioned this issue Sep 29, 2024
9 tasks
@DarkSwoop
Copy link
Contributor Author

Hey Dan,

Thanks again, for your effort! Can you quickly tell me how exactly this works now? I create an order via the Order API and pass the dhl_shipment_content in the options hash, but that's not being carried over into the shipment. Like, our workflow is that we create an order in Karrio from our online shop when a shipment is supposed to happen, and then the fulfillment team creates a shipment from the order through the user interface. Do we have some kind of pass through there?

@DarkSwoop
Copy link
Contributor Author

@danh91 any update?

@adrienshen
Copy link

adrienshen commented Nov 7, 2024

It looks like the contents is set by these fields https://github.com/karrioapi/karrio/blob/762ff38a4a378b646f7fd6c33779c091189d71d7/modules/connectors/dhl_express/karrio/providers/dhl_express/shipment.py#L116C5-L116C12

    content = lib.identity(
        options.dhl_shipment_content.state
        or customs.content_description
        or packages.content
        or packages.description
        or "N/A"
    )

There appears to be no Order fields passed to the carrier connections. If the dhl_shipment_content is a dynamic field in an options hash, then its probably not going to be passed through to the carriers in any way.
Maybe a solution can be passing it to the packages.content somehow if the Order options hash key is content or %carrier_name%_content?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants