The purpose of the StoreOrder method is to be able to store a virtual order/shipment in the cloud and reuse the data in other Consignor installations without having to pass all the data via other systems.
The StoreOrder method is available through Shipment Server. It will save shipment data as JSON which can then be retrieved later when needed. The solution is especially useful if you use ShipAdvisor 2.0 in a checkout solution and produce shipments via Consignor On-premises, e.g. have a Klarna integration. Data can then be imported effortlessly using the OrderId in the import file.
This section will describe a typical use case flow for the StoreOrder functionality.
You are a client who has a webshop and a checkout solution using ShipAdvisor 2.0:
- A consumer enters the checkout of your webshop. One or more GetShipAdvise requests are sent from your checkout to ShipAdvisor 2.0. (ShipAdvisor is used to display shipping alternatives, delivery times, prices etc. Read more).
- When the consumer has finished the payment, a StoreOrder request is sent to Shipment Server to store data about the order. You provide the OrderId in the request and we recommend generating a GUID for this purpose. Save it on the order in your ERP/ WMS so you can import it to Consignor On-premises later. If you are using Consignor's Klarna integration in your flow, the StoreOrder request will happen on the Klarna "confirm" request.
See example request and response below.
In the import file sent to Consignor On-premises to produce the shipment, you must include the clientId in the field ShipAdvisor Reference->Reference. This will trigger the import of the stored order data into Consignor On-premises. Note that data in the import file will always override any stored data. If the same field is present in the data stored using the StoreOrder method, it will be overwritten by the data in the corresponding field in the import file.
Example1: StoreOrder request has the value “John” in Receiver name 1. Receiver Name 1 in the import file has the value “Bill” => “Bill” will be used on shipment.
Example2: StoreOrder request has the value "John" in Receiver Name 1. Receiver Name 1 in the import file has no value => “John” will be used on shipment.
Request and response sample
Example of request body:
"Name1": "Test Name1",
"Street1": "Test Address 1",
"Attention": "Test Attention",
Upon successful request to StoreOrder we will return the clientId and the confirm the stored orderGuid that you sent:
The “clientId” is the one that should be used in the Consignor ShipAvisor Import setup item - see the next section for more details.
We recommend that you do not store sender and lines in OrderStorage. Lines stored in OrderStorage will be appended to the shipment when importing goodslines.
- You store a line in StoreOrder with 1 package, 2 kg.
- After packing your ERP/WMS send 1 package, 0,5 kg through Consignor Import, you will then end up with 1 shipment with 2 packages on 2 and 0,5 kg.
When using Import you need to provide a carrier code that corresponds with the ProdCSid in StoreOrder.
Setup in Consignor On-premises
In Consignor On-premises, open the setup item under Setup > ShipAdvisor Import.
The ClientID under the ShipAdvisor 2 tab should be the installation ID of the actor that ShipAdvisor 2.0 uses.
In your Import Setup, you must include the field ShipAdvisor Reference->Reference and use this to include the OrderId in your import file.