USPS Shipping

USPS – or United States Postal Service – is the independent agency responsible for providing postal service in the United States.

To set up shipping with USPS:

  • Your products must have weights in poundsread more about weight here.
  • Orders must be created with a valid delivery zip, city and address. If none are specified, the system will attempt to retrieve them from the customer billing address.

Delivery time estimation, international shipping and freight and tracking services are not a part of this integration.

To integrate with USPS, you must first register for a USPS Web Tools account: https://secure.shippingapis.com/registration/.

You will be provided with a User ID and a password which you will use to configure the shipping provider

In order to set up deliveries with USPS, you must configure the USPS Shipping provider.

To do so:

  • Create or edit a shipping method in the Settings > Ecommerce > Orders > Shipping following the regular procedure
  • Select the USPS shipping provider from the dropdown menu
  • Fill in the necessary parameters (Figure 3.1)
Figure 3.1 The USPS shipping provider

You must:

  • Enter the User ID and password for your USPS Web Tools account
  • Check test if you are in test mode (you are, for now)
  • Enter the zip code from which the goods will be shipped
  • Configure the type of shipping offered:
    • Delivery service – e.g. First Class Mail, Parcel Post, etc. – you can read more about the USPS delivery services in their price list. Selecting First Class Mail will require you to specify the mail typeflat, letter, parcel or postcard
    • The package size and container

You can also:

  • Check group by manufacturer if you want to group products together based on manufacturer (rather than shipping everything together).
  • Specify the maximum number of product per package – the default is ‘everything in one box’
  • Specify a default length, width, height and girth – this is required for e.g. nonrectangular packages which are larger than 12” – read more about the requirements for particular delivery service options.
  • Set your delivery to be machinable or not – read about the criteria for machinable mail

Finally, you may check the XML log checkbox to log requests and responses between Dynamicweb and USPS Web Tools – the log will be located in \System\Log\eCom\ShippingProvider\Dynamicweb.eCommerce.Cart.ShippingProviders.USPS

Once you have configured the payment provider, you can move on to testing your setup.

USPS Delivery service types

Please be aware that you must create a shipping method per delivery service you want to make available – e.g. one for First Class Mail (1-3), one for Parcel Post, and so on.

Before going live, test your setup thoroughly.

The following template tags are available from within the Shippingmethods loop, for testing purposes:

  • Ecom:Cart.Shippingmethod.Error
    Render any technical or incorrect settings errors, that are can happened during the rate calculation service requests. If any error is present, delivery price is not calculated (equal to 0) and order can’t be passed to the checkout step – because it doesn’t pass precheckout validation.
  • Ecom:Cart.Shippingmethod.Warning
    Renders any non-critical messages, which does not prevent the calculation of the shipping rate; and other (potentially) unanticipated results that also occur.

The USPS test servers support only "canned" tests, meaning that the test servers will only accept certain request data. This means that some setups may be untestable – because they will always fail – until going live. Contact USPS for more information.

Once you are ready to go live:

  • Contact USPS Web Tools to move your account from test to production
  • Remove the checkmark in the test checkbox on your shipping provider settings