|
1 |
| -===================================================== |
2 |
| -How to get DHL credentials for integration with Odoo? |
3 |
| -===================================================== |
| 1 | +=============== |
| 2 | +DHL integration |
| 3 | +=============== |
4 | 4 |
|
5 |
| -In order to use the Odoo DHL API, you will need: |
| 5 | +DHL is one of the shipping carriers for which a *shipping connector* is available in Odoo's |
| 6 | +**Inventory** app. By enabling the shipping connector in the app's settings, and configuring at |
| 7 | +least one *shipping method*, the process of :doc:`calculating shipping rates |
| 8 | +<../setup_configuration>` and :doc:`generating shipping labels <labels>` is greatly simplified. |
6 | 9 |
|
7 |
| -- A DHL.com SiteID |
| 10 | +.. note:: |
| 11 | + While a variety of shipping connectors are available for different carriers, this documentation |
| 12 | + details the configuration settings specific to integrating DHL. For instructions on configuring |
| 13 | + the integration settings common to all shippers, see the documentation on :doc:`third-party |
| 14 | + shippers <third_party_shipper>`. |
8 | 15 |
|
9 |
| -- A DHL Password |
| 16 | +Enable DHL shipping connector |
| 17 | +============================= |
10 | 18 |
|
11 |
| -- A DHL Account Number |
| 19 | +Before creating a DHL shipping method, enable the carrier's shipping connector. To do so, navigate |
| 20 | +to :menuselection:`Inventory app --> Configuration --> Settings`. |
12 | 21 |
|
| 22 | +Scroll down to the :guilabel:`Shipping Connectors` section, and tick the checkbox next to |
| 23 | +:guilabel:`DHL Express Connector`. Finally, click :guilabel:`Save` to apply the changes. |
13 | 24 |
|
14 |
| -Getting SiteID and password for countries other than United States (UK and Rest of the world) |
15 |
| -============================================================================================= |
| 25 | +Once the connector has been enabled, a :icon:`fa-arrow-right` :guilabel:`DHL Shipping Methods` link |
| 26 | +appears below the setting. Click the link to open a page showing all shipping methods configured for |
| 27 | +DHL. |
16 | 28 |
|
17 |
| -You should contact DHL account manager and request integration for XML Express API. The presales should provide you live credentials. |
| 29 | +Configure DHL shipping method |
| 30 | +============================= |
18 | 31 |
|
19 |
| -Getting SiteID and Password for United States |
20 |
| -============================================== |
| 32 | +After enabling the shipping connector for DHL, shipping methods can be configured for the carrier. |
| 33 | +Once configured, a shipping method can be added as a line item to sales orders (SOs), which allows |
| 34 | +for automatic computation of shipping rates, and generation of shipping labels. |
21 | 35 |
|
22 |
| -You need to write to xmlrequests@dhl.com along with your full Account details like account number, region, address, etc. to get API Access. |
| 36 | +To create a new DHL shipping method, navigate to :menuselection:`Inventory app --> Configuration --> |
| 37 | +Settings`. In the :guilabel:`Shipping Connectors` section, select the :guilabel:`DHL Shipping |
| 38 | +Methods` link below the :guilabel:`DHL Express Connector` checkbox. |
| 39 | + |
| 40 | +.. note:: |
| 41 | + It is also possible to see existing shipping methods for every carrier, by navigating to |
| 42 | + :menuselection:`Inventory app --> Configuration --> Shipping Methods`. |
| 43 | + |
| 44 | +Click :guilabel:`New` to open a blank shipping method form. If a shipping method has already been |
| 45 | +created, it can be selected from this screen. |
| 46 | + |
| 47 | +.. image:: dhl_credentials/dhl-form.png |
| 48 | + :alt: The form for a DHL shipping method. |
| 49 | + |
| 50 | +General information |
| 51 | +------------------- |
| 52 | + |
| 53 | +Begin configuring the shipping method by entering its title in the :guilabel:`Shipping Method` |
| 54 | +field. |
| 55 | + |
| 56 | +In the :guilabel:`Provider` drop-down menu, select the :guilabel:`DHL` option. After doing so, a new |
| 57 | +:guilabel:`DHL Configuration` tab appears at the bottom of the form. |
| 58 | + |
| 59 | +All other fields in this section are identical on the shipping method forms for each shipping |
| 60 | +carrier. See the documentation on :doc:`third-party shippers <third_party_shipper>` for instructions |
| 61 | +on how to properly configure them. |
| 62 | + |
| 63 | +DHL Configuration |
| 64 | +----------------- |
| 65 | + |
| 66 | +The :guilabel:`DHL Configuration` tab on the shipping method form is used to connect the user's DHL |
| 67 | +account to Odoo, and configure the shipping method's details. |
| 68 | + |
| 69 | +DHL SiteID, password, and account number |
| 70 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 71 | + |
| 72 | +A DHL SiteID, password, and account number are used to link a DHL account with third-party services, |
| 73 | +like Odoo's **Inventory** app. |
| 74 | + |
| 75 | +.. important:: |
| 76 | + The SiteID and password are different credentials than the ones used to log in to a DHL account. |
| 77 | + |
| 78 | +Here are two ways to obtain these DHL account credentials: |
| 79 | + |
| 80 | +- **If a DHL Express account is available**: Log into the `DHL Developer portal |
| 81 | + <https://developer.dhl.com/api-reference/dhl-express-mydhl-api#get-started-section/ |
| 82 | + user-guide%get-access>`_, and then `request a DHL API account number <https://developer.dhl. |
| 83 | + com/form/dhl-express-onboarding>`_. |
| 84 | +- **If a DHL Express account is unavailable**: Follow DHL's steps to `obtain a DHL Express account |
| 85 | + <https://developer.dhl.com/api-reference/dhl-express-mydhl-api#get-started-section/user-guide%get- |
| 86 | + access:~:text=around%20the%20world.-,User%20Guide,-Get%20Access>`_, and then follow the steps in |
| 87 | + the previous bullet. |
| 88 | + |
| 89 | +Once the developer portal account has been confirmed, log in to the portal using the username and |
| 90 | +password. Click on the user avatar in the top-right corner of the screen to open the user dashboard. |
| 91 | + |
| 92 | +On the dashboard, click on the :guilabel:`Apps` tab, and select an app. In the |
| 93 | +:guilabel:`Credentials` section, click the :guilabel:`Show key` button below the :guilabel:`API Key` |
| 94 | +and :guilabel:`API Secret` fields. |
| 95 | + |
| 96 | +Return to the shipping method form in the Odoo database. Enter the *DHL API Key* in the |
| 97 | +:guilabel:`DHL SiteID` field, and the *API Secret* in the :guilabel:`DHL Password` field. |
| 98 | + |
| 99 | +Shipping details |
| 100 | +~~~~~~~~~~~~~~~~ |
| 101 | + |
| 102 | +The rest of the fields in the :guilabel:`DHL Configuration` tab are used to configure the shipping |
| 103 | +method itself: |
| 104 | + |
| 105 | +- :guilabel:`Region`: the region in which the shipping method is used. |
| 106 | +- :guilabel:`DHL Product`: the shipping service purchased from DHL (e.g. Express Worldwide). |
| 107 | +- :guilabel:`DHL Package Type`: the type of DHL package used for delivery (e.g. DHL Box). |
| 108 | +- :guilabel:`Package Weight Unit`: the unit of measure used to display package weight. |
| 109 | +- :guilabel:`Package Dimension Unit`: the unit of measure used to display package size. |
| 110 | +- :guilabel:`Label Format`: the file format used to generate shipping labels. |
| 111 | +- :guilabel:`Label Template`: the paper size used to print shipping labels. |
| 112 | + |
| 113 | +.. important:: |
| 114 | + Before selecting service options for a shipping method, make sure those services are actually |
| 115 | + available for the DHL account. Available services depend on the contract negotiated with DHL. |
| 116 | + |
| 117 | +Options |
| 118 | +~~~~~~~ |
| 119 | + |
| 120 | +Additional settings are available in the :guilabel:`Options` section at the bottom of the |
| 121 | +:guilabel:`DHL Configuration` tab: |
| 122 | + |
| 123 | +- :guilabel:`Generate Return Label`: Enable this option to automatically generate a return label |
| 124 | + after validating a delivery order. |
| 125 | +- :guilabel:`Dutiable Material`: Enable this option if the shipping method is liable to customs or |
| 126 | + other duties. |
| 127 | + |
| 128 | +Turn on the DHL Connection |
| 129 | +========================== |
| 130 | + |
| 131 | +Once the DHL connection is set up, use the buttons at the top of the form to turn on or debug the |
| 132 | +connection. |
| 133 | + |
| 134 | +- **Unpublished/Published**: turns the connection on or off. |
| 135 | +- **Test Environment/Production Environment**: sets whether requests actually get sent to DHL. |
| 136 | +- **No Debug/Debug Requests**: determines whether error logging occurs for requests to DHL. |
0 commit comments