|
| 1 | +================ |
| 2 | +USPS integration |
| 3 | +================ |
| 4 | + |
| 5 | +.. |COP| replace:: :abbr:`COP (Customer Onboarding Portal)` |
| 6 | + |
| 7 | +Integrating a USPS account with Odoo's **Inventory** app makes it possible to calculate delivery |
| 8 | +rates and generate delivery labels within Odoo. This is accomplished by enabling the USPS shipping |
| 9 | +connector, then configuring at least one shipping method. |
| 10 | + |
| 11 | +Enable shipping connector |
| 12 | +========================= |
| 13 | + |
| 14 | +To enable the USPS shipping connector, open the :menuselection:`Apps` app from the main Odoo |
| 15 | +dashboard. In the :guilabel:`Search` field, search for `USPS` and click :guilabel:`Install`. |
| 16 | + |
| 17 | +After the shipping connector is installed, the USPS connector is enabled by default. |
| 18 | + |
| 19 | +Configure USPS business account |
| 20 | +=============================== |
| 21 | + |
| 22 | +A USPS business account is required to obtain the information needed to :ref:`fill out the fields in |
| 23 | +the shipping method form <inventory/shipping_receiving/usps-configuration>`. To create a new |
| 24 | +account, navigate to USPS's `Create Your USPS.com Account |
| 25 | +<https://reg.usps.com/entreg/RegistrationAction_input>`_ page, select the :guilabel:`Business |
| 26 | +Account` option, then follow the steps. |
| 27 | + |
| 28 | +Create a developer app |
| 29 | +---------------------- |
| 30 | + |
| 31 | +After the USPS Business Customer Onboarding Portal (COP) is set up, `sign in to the USPS COP |
| 32 | +<https://cop.usps.com/>`_ to manage business account information and access the USPS APIs. |
| 33 | + |
| 34 | +On this page, make note of the :guilabel:`Customer Registration ID (CRID)`, the :guilabel:`Master |
| 35 | +Mailer ID`, and the :guilabel:`Label Mailer ID`. |
| 36 | + |
| 37 | +Click the :guilabel:`My Apps` link at the top of the screen. |
| 38 | + |
| 39 | +Open the :guilabel:`Developer Apps` tab. Click the :guilabel:`Add App` button. In the *Add App* |
| 40 | +pop-up window, specify an :guilabel:`App Name`. Select the APIs to use. Finally, click the |
| 41 | +:guilabel:`Add App` button. |
| 42 | + |
| 43 | +A window opens, titled after the app name. Keep this window open as the shipping method is |
| 44 | +configured. The :guilabel:`Consumer Key` and :guilabel:`Consumer Secret` will be necessary in the |
| 45 | +shipping method form. |
| 46 | + |
| 47 | +Configure shipping method |
| 48 | +========================= |
| 49 | + |
| 50 | +Once the USPS shipping connector is enabled, at least one shipping method must be configured. After |
| 51 | +doing so, the shipping method can be included in sales orders (SOs) and used to compute delivery |
| 52 | +costs and print shipping labels. |
| 53 | + |
| 54 | +Open or create a new shipping method. Navigate to :menuselection:`Inventory --> Configuration --> |
| 55 | +Shipping Methods`, then open an existing USPS shipping method to display its form. Alternatively, |
| 56 | +click :guilabel:`New` to open a blank form and configure a new shipping method. |
| 57 | + |
| 58 | +.. image:: usps/method-form.png |
| 59 | + :alt: The USPS Domestic shipping method, fully configured. |
| 60 | + |
| 61 | +.. important:: |
| 62 | + Enabling the USPS shipping connector automatically creates two default shipping methods: |
| 63 | + :guilabel:`USPS Domestic` and :guilabel:`USPS International`. Each of these methods is |
| 64 | + preconfigured with test credentials, allowing them to be used for testing purposes. |
| 65 | + |
| 66 | + Before the shipping method can be used to create actual shipments, the test credentials must be |
| 67 | + replaced with credentials from a valid USPS account. |
| 68 | + |
| 69 | +General information |
| 70 | +------------------- |
| 71 | + |
| 72 | +At the top of a delivery method form are fields that configure how the method operates in Odoo. In |
| 73 | +the :guilabel:`Provider` field, select :guilabel:`USPS` from the drop-down menu if it is not already |
| 74 | +selected. |
| 75 | + |
| 76 | +The remaining fields in this section are general to all delivery providers. For details on how to |
| 77 | +fill them out, see :doc:`third_party_shipper`. |
| 78 | + |
| 79 | +.. _inventory/shipping_receiving/usps-configuration: |
| 80 | + |
| 81 | +USPS Configuration tab |
| 82 | +---------------------- |
| 83 | + |
| 84 | +The options in the *USPS Configuration* tab of a USPS shipping method form are used to connect the |
| 85 | +method to a USPS account and to configure the delivery details associated with it. |
| 86 | + |
| 87 | +Configure the following fields in the form: |
| 88 | + |
| 89 | +- :guilabel:`EPS Number`: The Enterprise Payment System (EPS) account number identifies the payment |
| 90 | + account and is used for electronic funds transfers. After a payment account is added in the |COP| |
| 91 | + tool, the EPS number will display, or it can be retrieved from the `USPS Business Customer Gateway |
| 92 | + <https://epay.usps.com/paymod/>`_. |
| 93 | +- :guilabel:`CRID`: The CRID is a number that identifies a physical business address across all USPS |
| 94 | + systems and applications. |
| 95 | +- :guilabel:`MID`: This is the :guilabel:`Master Mailer ID` listed in the |COP|. |
| 96 | +- :guilabel:`Manifest MID`: This is the :guilabel:`Label Mailer ID` listed in the |COP|. |
| 97 | +- :guilabel:`USPS API Key`: This is the :guilabel:`Consumer Key` credential for the app created in |
| 98 | + the USPS |COP| tool. |
| 99 | +- :guilabel:`USPS API Secret`: This is the :guilabel:`Consumer Secret` credential for the app |
| 100 | + created in the USPS |COP| tool. |
| 101 | +- :guilabel:`Label Format`: Specify the file format that generated labels should use. |
| 102 | +- :guilabel:`USPS Package Type`: Specify or select the package type to use for shipping. |
| 103 | +- :guilabel:`USPS Domestic Service` or :guilabel:`USPS International Service`: Specify or select the |
| 104 | + service level that should be used to generate shipping labels. |
| 105 | +- :guilabel:`Delivery Nature`: Specify whether the shipping method is :guilabel:`Domestic` or |
| 106 | + :guilabel:`International`. |
| 107 | +- :guilabel:`Content Type`: Specify the type of content that will be shipped in packages with this |
| 108 | + shipping method. |
| 109 | + |
| 110 | +In the :guilabel:`Options` section, configure the following fields: |
| 111 | + |
| 112 | +- :guilabel:`Domestic Rating Indicator` or :guilabel:`International Rating Indicator`: USPS uses |
| 113 | + specific indicators, pricing groups, and automated classification systems to distinguish between |
| 114 | + domestic and international shipments for rating purposes. These systems help ensure accurate |
| 115 | + postage calculations based on factors such as destination, package weight, dimensions, and |
| 116 | + selected mail class. Select the rating indicator that works best for shipping needs. |
| 117 | +- :guilabel:`Processing Category`: Select a packaging processing category. |
| 118 | +- :guilabel:`Generate Return Label`: For domestic shipments only. Select this checkbox to |
| 119 | + automatically generate a return label when the delivery is validated. |
| 120 | + |
| 121 | +Turn on the USPS integration |
| 122 | +============================ |
| 123 | + |
| 124 | +After the USPS connection is set up, use the smart buttons at the top of the form to publish, turn |
| 125 | +on production mode, or activate debug logging. |
| 126 | + |
| 127 | +- :guilabel:`Unpublished` / :guilabel:`Published`: Determines if this shipping method is available |
| 128 | + on the user's **eCommerce** website. |
| 129 | +- :guilabel:`Test Environment` / :guilabel:`Production Environment`: Determines whether label |
| 130 | + creation is for testing and canceled immediately (:guilabel:`Test`) or generating a real shipping |
| 131 | + label that is charged to the USPS account (:guilabel:`Production`). |
| 132 | +- :guilabel:`No Debug` / :guilabel:`Debug Requests`: Determines whether API requests and responses |
| 133 | + are logged in Odoo (turn on developer mode and go to :menuselection:`Settings app --> Technical |
| 134 | + --> Logging`). |
0 commit comments