Way of delivery and transporters

Table of contents

Introduction

When creating an order, it is often necessary to tell the warehouse which transporter they should use to ship the order. There are two ways of solving this.

The first solution is to use the WayOfDeliveryType field in the API. In this field, the integrating system can send in their name or code for the desired transporter service. The warehouse operators can then create a mapping between the way of delivery and the correct transporter service in Ongoing WMS by using the Transporter assignment function.

The second solution is to use the TransporterContract field in the API. In this field, the integrating system can send in Ongoing WMS' code for the desired transporter service. This will set the order's transporter in Ongoing WMS directly (without the need to use Transporter assignment). This is not a free text field. The data which is sent in this field must match whatever is set up in Ongoing WMS.

You have following trade-offs between the two solutions:

  • Using WayOfDeliveryType is easier for the integrator but means that the warehouse operators must maintain a mapping between way of delivery and transporter service.
  • Using TransporterContract is more difficult for the integrator, but the warehouse operators don't have to maintain a Transporter assignment mapping.

Example

We will now discuss an example. Say you have an order which is supposed to be shipped using the transporter service PostNord MyPack Collect. In the integrating system, this service has code mypack_collect. In Ongoing WMS, it has code P19. Note that these codes are merely examples.

Using way of delivery

SOAP

If you are using the SOAP API, send the code mypack_collect like so:

<WayOfDeliveryType>
          <WayOfDeliveryTypeOperation>CreateOrFind</WayOfDeliveryTypeOperation>
          <WayOfDeliveryTypeIdentification>Code</WayOfDeliveryTypeIdentification>
          <Code>mypack_collect</Code>
          <Name>mypack_collect</Name>
        </WayOfDeliveryType>

REST

If you are using the REST API, send the code mypack_collect like so:

        
  "wayOfDelivery": {
  "code": "mypack_collect",
  "name": "mypack_collect"
  }
  

The warehouse operators should then add a mapping from mypack_collect to P19 using Transporter assignment.

Using transporter contracts

SOAP

If you are using the SOAP API, send in P19 like so:

<TransporterContract>
          <TransporterContractIdentification>ServiceCode</TransporterContractIdentification>
          <TransporterContractOperation>Find</TransporterContractOperation>
          <TransportPayment>Prepaid</TransportPayment>
          <TransporterServiceCode>P19</TransporterServiceCode>
        </TransporterContract>

REST

If you are using the REST API, send in P19 like so:

        
  "transporter": {
  "transporterServiceCode": "P19"
  }

If you want to know which transporter service codes are valid for a particular goods owner, use the API function GetTransporterContracts. In the REST API, the equivalent is the /transporterContracts endpoint.

Advanced topic: shipping payment

The above example using PostNord MyPack Collect assumes that the sender is paying for the shipping. This is by far the most common situation, but there are three other possibilities:

  1. The customer will collect the order from the warehouse themselves.
  2. The customer will pay for the shipping.
  3. A third party (neither sender nor receiver) will pay for the shipping.

For "customer pays" and "third party pays" there are two things which you must provide in the API call:

  1. Both the transporter service code (P19) and the transporter code (PLAB).
  2. The customer number which the transporter will charge for the shipping.

Also note that not all transporter services support "customer pays" or "third party pays"!

We will now provide examples of how to create orders with these options.

Customer will collect the order from the warehouse

SOAP

<TransporterContract>
          <TransportPayment>UnKnown</TransportPayment>
        </TransporterContract>

REST

        
  "transporter": {
  "paymentAdvanced": {
  "consigneeCollects": true
  }
  }
  

Customer will pay for the shipping

SOAP

<TransporterContract>
          <TransporterContractIdentification>CodeAndServiceCodeAndCustomerNumber</TransporterContractIdentification>
          <TransporterContractOperation>CreateOrUpdate</TransporterContractOperation>
          <TransportPayment>Collect</TransportPayment>
          <TransporterCode>PLAB</TransporterCode>
          <TransporterServiceCode>P19</TransporterServiceCode>
          <CustomerNumber>CUSTOMER NUMBER</CustomerNumber>
        </TransporterContract>

REST

        
      "transporter": {
        "transporterCode": "PLAB",
        "transporterServiceCode": "P19",
        "paymentAdvanced": {
          "consigneePays": {
            "customerNumber": "CUSTOMER NUMBER"
          }
        }
    }
    

A third party will pay for the shipping

SOAP

<TransporterContract>
          <TransporterContractIdentification>CodeAndServiceCodeAndCustomerNumber</TransporterContractIdentification>
          <TransporterContractOperation>CreateOrUpdate</TransporterContractOperation>
          <TransportPayment>ThirdParty</TransportPayment>
          <TransporterCode>PLAB</TransporterCode>
          <TransporterServiceCode>P19</TransporterServiceCode>
          <CustomerNumber>CUSTOMER NUMBER</CustomerNumber>
        </TransporterContract>

REST


"transporter": {
    "transporterCode": "PLAB",
    "transporterServiceCode": "P19",
    "paymentAdvanced": {
        "thirdPartyPays": {
            "customerNumber": "CUSTOMER NUMBER"
        }
    }
}