ShipBridge plugins are typically developed by SellerCloud and incur customization charges. Developers can use the instructions below to aid in development.
Add Plugins in ShipBridge
- Obtain your customized plugin from SellerCloud Support.
- Save it to the PC where ShipBridge is installed.
- In ShipBridge, open the menu and select Plugins.
- Click Install Plugin to open a File Explorer window to search for the plugin on your PC.
- Select the plugin and save.
- Check the box next to the plugin to enable it.
ShipBridge will call all enabled plugins to retrieve a shipping rule for each order. The plugins will be called whenever a new order is loaded to, or refreshed in the grid, or scanned in Scan & Ship.
The most important reference is ShipBridge.Extensibility, and the ShipBridge.Extensibility.dll is found in the ShipBridge application folder
- It exposes the IPlugin interface which all plugins should implement
- It provides access to ShipperHelper and PluginHelper which have easy-to-use properties and methods for checking orders
IPlugin and SamplePlugin
- ID Each plugin should have a unique identifier (GUID). You can generate one from here
- DisplayName and Version keep the Plugins window updated with relevant information
- OnConnected is called every time ShipBridge initializes the plugin. You can call any initialization code here.
- OnOrderBeforeAddedToGrid is called immediately after a new order is received, but before any processing is made by ShipBridge itself. This is useful if a shipping method has to be selected before ShipBridge processes the order.
- OnOrderAfterAddedToGrid is the most frequently used handler. It’s called after ShipBridge has finished processing the order and allows plugins to select a proper shipping method.
- OnCellBeginEdit is called when the user starts making a change to a grid cell. This handler is rarely used.
- OnCellEndEdit is called after the user makes a change to a grid cell. This handler allows you to handle any address or weight changes so that the proper shipping method is selected.
provides quick access to frequently used order operations (getting or
checking the state against another value, calculating its subtotal, weight, or
checking if the order is “international,” to a military/US territory address
and so on).
Instantiating a PluginHelper is
done with a simple call by referencing the OrderData:
Dim helper As New
The actual change of shipping service can be
made by changing the helper.ShippingService
to a ServiceInfo instance using ServiceInfo.GetByName. You can find a
full ServiceInfo listing below. Of course, you can use any shipping rules based
on destination, order subtotal, weight, etc. Example:
‘ si keeps the original shipping service, siNew
will be the shipping
‘ rule-selected service. This is used to track
shipping service changes.
Dim si As ServiceInfo = helper.ShippingService
Dim siNew As
ServiceInfo = si
‘ If order address is POBox AND weight > 16 oz, use USPS Priority
helper.ShippingWeightInOz > 16 Then
RuleColor = GetColor(2)
‘ … process any
other shipping rules if necessary.
‘ Check if si is
different than siNew, and if so, update helper.ShippingService
‘ and return TRUE,
i.e. “service changed”
If si Is siNew Then
‘ Nothing has changed
It’s important to skip fully shipped or “ready for pickup”
orders so that their shipping service is not altered. This can be done using the
following code as used in the sample plugin:
' Skip FullyShipped and ReadyForPickup orders If helper.ShippingStatus = OrderShippingStatus.FullyShipped OrElse elper.ShippingStatus = OrderShippingStatus.ReadyForPickup Then Return False End If
You can optionally skip rush or other orders by checking with the helper or another OrderData property.
‘ Leave this
uncommented if rush orders should be skipped
You can get a ServiceInfo instance of any shipping service
by calling the ServiceInfo.GetByName method
(case-insensitive). Below is a list of all names:
Bound Printed Matter
Intl First Class
Next Day Early AM
Next Day Saver
2nd Day AM
Freight LTL Standard
Freight LTL – Guaranteed
Worldwide Express Plus
Worldwide Express Saver
Expedited to Canada
Express Saver to Canada
Express to Canada
Express Plus to Canada
Standard to Canada
3 Day to Canada
Expedited Mail Innovations
Economy Mail Innovations
Intl Priority Freight
Intl Economy Freight
Intl Ground to Canada
SmartPost Standard Mail
SmartPost Bound Printed Matter
SmartPost Media Mail
SmartPost Parcel Post
available to domestic (US) destinations. Similarly, UPS Economy
is only available to international destinations.