-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Breaking Bugs / lack of maintenance:
Outdated API: #108 #104 (draft PR #112)
Missing Features: #47 (Draft PR #75)
Required for first PR
- shipments can be made for any order in any combination of single or multiple stock locations
- Shipping labels are presented on the Backend with a label containing the solidus shipment number
- Buy Shipping called twice resulting in error during purchase of shipment #113
Required for second PR
- API Key can be set in backend on per store base
- Additional shipping states for rountrip / inbound
- Only use EasyPost when the item has a ShippingCategory that uses EasyPost #75
Features
shippingTypes of shippingMethods
Fields required
Shipping Method needs shippingtype
A picklist named shippingType containing the following options
NormalRoundtrip(Returns are not integrated with EasyPost out of the box #83)InboundInboundRountrip
Product needs Default Inbound Stock Location
Add default inbound stock location to products to overwrite the stock the item is returning to. The stock location can be chosen from existing stocks.
Implementation
Normalcreates a regular shipping labelRoundtripcreates a Return Label in addition the outbound label to the default stock location from which the item was removed or, if present, from item inbound stock.Inboundcreates an Inbound label using the customer shipping address asfrom_addressand the product default inbound stock location asto_addressInboundRountripcreates in addition to the inbound label a Return Label to the customer to the customer shipping address from the inbound stock location asfrom_address
Additional Information
Easypost offers return label generation endpoints.
Add insurance
The Shipping Method should contain an insurance flag to allow using easypost insurance for either all items or by item value.
Fields required on shipping method
A picklist named Insurance containing the following options
TrueFalseTreshold
If Treshold is chosen, a minimum amount has to be set. Therefor following fields need to created as well:
insuranceMinfor the order value of the products contained in the shipment
Implementation
Add Insurance (link to Easypost API) by following logic:
- If Insurance
Trueinsure for total amount of product value contained in the shipment by providing the lineitemsvalue of items contained in the shipment - If insurance
Falsedo not insure - If Insurance
Tresholdis applied, the shipment should be insured if the value of lineitems contained in the shipment are exceedinginsuranceMin
Notes
Easypost expects the insured amount to be provided in USD, this is not always possible right now as no exchange rate tracking is available. Currently we will just convert 1 to 1 for now. A better solution would be the import of the free ECB feed https://github.com/matthutchinson/ecb_exchange/blob/main/lib/ecb/exchange.rb
Overhaul Shipment Tracking
Add Inbound tracking code on shipment resource
The inbound tracking code should live a separate life not touching current states.
States
Current shipping states are
- Pending
- Ready
- Shipped
Additional states are need to reflect inbound shipment states:
- InboundPending (Inbound label created)
- InboundReady (Inbound label created)
- InboundShipped (Inbound label has been shipped)
- InboundDelivered (Inbound shipment has been received)
- Delivered (Shipment has been delivered)
Currently updates to the order states rely on solidus webhooks.
| States | Normal | Roundtrip | Inbound | InboundRountrip |
|---|---|---|---|---|
| InboundPending | N/A | N/A (RMA) | Inbound Label not created | Inbound Label not created |
| InboundReady | N/A | N/A (RMA) | Inbound Label created | Inbound Label created |
| InboundShipped | N/A | N/A (RMA) | Inbound Label Shipped | Inbound Label Shipped |
| InboundDelivered | N/A | N/A (RMA) | Inbound Label Received | Inbound Label Ready (Updated via Backend or API) |
| Pending | As before | As before | N/A | Outbound Label Ready (Updated via Backend or API) |
| Ready | As before | As before | N/A | Outbound Label Ready (Updated via Backend or API) |
| Shipped | As before | As before | N/A | Outbound Label Shipped (Updated via Backend or API) |
| Delivered | Updated via Backend or API | Updated via Backend or API | N/A | Updated via Backend or API |
Implement Customer Returns
The ability to integrate an existing ticket with a customer return needs to be implemented fetching the tracking code from the Outbound Shipment if available.