Configure Swiss Post (DIE Post) Connector

This document provides a complete step-by-step guide to configure and use the Swiss Post (DIE Post) connector in Odoo. Once the connector is set up, you can price shipping on your sale orders, create shipping labels and track shipments directly from your Odoo.

To see everything the connector can do, read Swiss Post (DIE Post) Connector Features.

Let’s begin with the configurations.

Configure Shipping Partner

The shipping partner stores your Swiss Post account credentials and connects Odoo to Swiss Post. You can add more than one shipping partner if you use more than one Swiss Post account.

  1. Go to Inventory ‣ Configuration ‣ Delivery ‣ Shipping Partner and click New.

The Swiss Post shipping partner form with the Name, Partner and the API Credential tab showing Client ID and Client Secret.

Fill in the required fields to connect your account:

  • Name: Choose a meaningful name for your account (e.g. Swiss Post).

  • Partner: Select SwissPost.

  1. Open the API Credential tab and enter the credentials you get from the Swiss Post team:

    • Client ID: Your client ID from the Swiss Post team.

    • Client Secret: Your client secret from the Swiss Post team.

  2. Save the shipping partner.

  • From the shipping partner, the Delivery Methods smart button opens the delivery methods linked to this account.

Check the Shipping Logs

Every request that Odoo sends to Swiss Post is saved in the shipping logs. Use them to find the exact request and response when a label or tracking request fails.

  1. Go to Sales ‣ Configuration ‣ Shipping Partner and open your Swiss Post shipping partner.

  2. Click the Shipping Logs button at the top of the form.

  3. Open an entry to see the request URL, the request data and the response data.

Note

The Shipping Logs button is shown in developer mode only. Activate developer mode to see it.

Note

If you archive a shipping partner, you can no longer use it. Its delivery methods cannot reach Swiss Post until you restore it.

Configure Delivery Method

The delivery method defines how shipping is priced and how parcels are sent to Swiss Post. Click the Delivery Methods smart button on the shipping partner and then New.

The Swiss Post delivery method form with the Shipping Partner field and the Configuration tab showing Franking Licence, SwissPost Services and Label Format.

Fill in the main fields of the delivery method:

  • Delivery Method: Choose a meaningful name for the delivery method (e.g. Swiss Post with Fixed Price or Swiss Post with Based on Rules).

  • Provider: Choose how the shipping is priced (see below).

  • Shipping Partner: Select the Swiss Post shipping partner you configured.

Important

Swiss Post does not support live rate calculation. Choose one of these providers to get rates:

  • SwissPost with Fixed Price: Charges a predefined cost.

  • SwissPost with Based on Rules: Calculates the charge from your pricing rules.

If you choose plain SwissPost, Odoo shows the message “SwissPost does not support live rate calculation. Please use SwissPost – Fixed Price or SwissPost – Based on Rules to get rates.”

In the Configuration tab, fill out these fields:

  • Franking Licence: Your franking licence. You get it from the Swiss Post team. Swiss Post uses it to charge the shipment to your account.

  • SwissPost Services: The Swiss Post services to use for shipments sent with this delivery method.

  • Label Format: The size of the shipping label. Choose A5 format (148 × 210 mm), A6 format (105 ×148 mm) or A7 format (74 ×105 mm) to match your labels and printer.

Configure Delivery Method with Fixed Price

With the SwissPost with Fixed Price provider, every shipment with this delivery method costs the same fixed price.

The Swiss Post delivery method with the SwissPost with Fixed Price provider and its fixed price.
  1. Open the delivery method and set Provider to SwissPost with Fixed Price.

  2. Enter the fixed price you want to charge.

  3. Fill in the Configuration tab as explained above and save.

Configure Delivery Method with Based on Rules

With the SwissPost with Based on Rules provider, Odoo calculates the shipping charge from the pricing rules you define.

The pricing rules of a Swiss Post delivery method with the SwissPost with Based on Rules provider. The Swiss Post delivery method with the SwissPost with Based on Rules provider and its Configuration tab.
  1. Open the delivery method and set Provider to SwissPost with Based on Rules.

  2. Add your pricing rules.

  3. Fill in the Configuration tab as explained above and save.

Use Delivery Method In Sale Order

You can add the Swiss Post shipping charge to a quotation before you confirm it.

  1. Open the quotation and select the Swiss Post delivery method you configured.

  2. Get the rate. Since Swiss Post does not support live rate calculation, the rate depends on the delivery method you use:

    • SwissPost with Fixed Price: The predefined fixed price is applied.

    • SwissPost with Based on Rules: The price is calculated from your pricing rules.

  3. Add the shipping charge to the sale order.

Getting the rate with a Swiss Post fixed price delivery method on a sale order. Getting the rate with a Swiss Post based on rules delivery method on a sale order.

Note

If Odoo shows “Error: this delivery method is not available for this address.”, the customer’s address does not match the delivery method. Check the address or choose another delivery method.

Validate Delivery Order

After you confirm the sale order, process the delivery order in the Inventory app.

  1. Open the delivery order and check that the Swiss Post delivery method you configured is set on it.

  2. Click Validate.

Odoo sends the shipment to Swiss Post with the shipper and recipient addresses, the weight, your franking licence and the services set on the delivery method. Swiss Post creates the shipment and returns the tracking number and the label.

A delivery order with the Swiss Post delivery method set, ready to validate.

If the validation fails, check the message Odoo shows:

  • “Shipping weight is missing!”: Set a weight on the products or the packages and validate again.

  • “Network error contacting Swiss Post: …” or “Unexpected error contacting Swiss Post: …”: Odoo could not reach Swiss Post or got an unexpected answer. Check your connection and the Client ID and Client Secret on the shipping partner, then try again. Open the shipping logs to see what Swiss Post answered.

Tracking and shipping information in delivery order

Once the delivery order is validated, the shipment is registered with Swiss Post and the tracking and label information is recorded on the order.

After validation:

  • The tracking number is saved on the delivery order.

  • A message “Shipment created!” with the tracking number is posted in the chatter.

  • The shipping label is attached to the delivery order chatter.

The tracking number and the shipping label in the chatter of a validated delivery order.

View Generated Label

Swiss Post creates the label in the Label Format set on the delivery method (A5, A6 or A7). Open the attachment in the delivery order chatter to view and print the label.

Track Shipment

Click the tracking link on the validated delivery order. Odoo opens the official Swiss Post shipment list, where you can find the shipment by its tracking number and see its status and location.

The Swiss Post tracking portal opened from a delivery order.

Cancellation

Warning

Swiss Post does not support shipment cancellation from Odoo. If you try to cancel a shipment, Odoo shows “Shipment cancellation is not supported by Swiss Post.” Cancel the shipment directly with Swiss Post.