OpenERP 7 Integration with USPS using stamp.com

USPS is one of the providers of the shipping services. USPS services are used by majority of the users of OpenERP. USPS can be integrated with the delivery of OpenERP to manage delivery form OpenERP itself.

We have created a module that helps us manage shipping through USPS from OpenERP itself. We have archived it by using the stamp.com API. stamp.com is a vendor of the USPS stamps and it provides ways to ship any kind packages and print stamps/shipment labels for that package. To integrate OpenERP with stamp.com API, we need some basic things. They are:

  • An stamp.com account username and password.
  • An integration id

We can register ourselves to stamp.com to obtain a username and password. After we have created the stamp.com account, we have to apply for a Integration Id to stamp.com. They also provide integration id for testing purpose in which we will be able to generate test shipments and labels. The details regarding the registration and obtaining the integration id can be found in www.stamp.com.

USPS Configuration :

The OpenERP module is compactible with OpenERP v7. No extra packages are required. We can install the module as a normal OpenERP module. After installing the module, we can see two new menu Warehouse > Configuration > Shipping Configuration > USPS Configuration and Warehouse > Configuration > Shipping Configuration > USPS Payment History. In USPS Configuration menu, we can configure our login credentials like User Id, Password and Integrator ID which we obtain from www.stamp.com. A screenshot is shown below:

To communicate with the stamp.com API, we need to create a authentication token first. This can be obtained by passing the User Id, Password and Integrator ID to the authenticator API of stamp.com. This authentication token is valid for only 24 Hrs from the time of token generation. After we have configured these credentials we can create our shipments.

USPS Shipment :

After the module is installed, a new field named “Shipment Type” is added in delivery order. Its a dropdown field with USPS value. If the shipping type is USPS is selected, a new tab named “Shipping USPS” appears where we can configure the shipment details. A screenshot is shown below:

A screenshot of the tab “Shipping USPS” is shown below:

Before we start the shipment, we need to make sure that the address of the recipient of the delivery is of correct format. This can be done by cleansing the address of the recipient. The address will the fetched from the field “Customer” of delivery order. Stamp provides an address cleansing API also to to do this. In “Shipping USPS” tab, you can see a button named “Cleanse Address”. If we click this button, the address of the customer will be send to stamp.com for cleansing. The response from the API will have the cleansed address from stamp. The cleansed address will be shown in the tab “Shipping USPS”. A screenshot is shown below:

User can check the address weather the address is correct. If not correct, user can change the partner address and again cleanse the address by clicking “Reset” button and then “Cleanse Address” button. You can also see a checkbox named “Address Match ?” which denotes weather the address send and the cleansed address matches and “City State Zip OK ?” which denotes the city state zip matches the send data.

Now we have to define the packages send in the shipment. This can be done in the field “Package Details”. A screenshot is shown below:

In this field, we can define “Pack” – which is the package assigned to the move in delivery order, “Package Type” – which is the type of the package send by USPS. This can be :

  • Postcard
  • Letter
  • Large Envelop or Flat
  • Thick Envelop
  • Package
  • Flat Rate Box
  • Small Flat Rate Box
  • Large Flat Rate Box
  • Flat Rate Envelop
  • Flat Rate Padding Envelop
  • Large Package
  • Oversized Package
  • Regional Rate Box A
  • Regional Rate Box B
  • Regional Rate Box C
  • Legal Flat Rate Envelop

“Weight” – Weight of the shipment, “Insured Amount” – Amount insured for the shipment, “Shipment State” – state of the shipment.

Now after we define the package details, we can get the available shipment type and their shipment amount by clicking “Get Shipment Rate” button. After pressing the “Get Shipment Rate” button, the available shipments, their expected delivery days, and the amount of the shipment will be shown in the field “Price Details”. A screenshot is shown below:

This list is the available shipments for the packaged defined in the field “Package Details”. User will be able to select which shipment to use and create the label for that particular shipment by opening the rate and clicking the button “Accept Shipment”. A screen shot is shown below:

When the shipment is accepted, the label will be generated and the label will be available as attachment. A sample of the label generated is shown below:

The amount for the shipment will be reduced from your USPS account.

Purchasing USPS Postage :

To create shipments online, we have to have credits in our USPS module. We can also buy postage for USPS from OpenERP itself. In Warehouse > Configuration > Shipping Configuration > USPS Configuration, there is a new wizard added to buy postage. In form view if you expand “More” in the header, there is a menu item called “Purchase Postage”. A screenshot is shown below:

When this menu item is clicked, a new window opens up showing the available balance in the account, control balance and the amount to which the account need to be filled. A screenshot is shown below:

We can enter the amount to which the account need to be credited and press Purchase to credit the amount to our stamp account. A confirmation mail will be send by stamp.com regarding the payment made to the registered email. The transaction will be recorded in Warehouse > Configuration > Shipping Configuration > USPS Payment History. A screenshot is shown below:

Comments

: ".

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2020 Zesty Beanz Pvt Ltd All Rights Reserved.