7bridges APIs: Using tags to control 7bridges' optimisation

Overview

The 7bridges optimisation tools work best when they have many different services and fulfilment locations to choose from when determining the optimal fulfilment solution. However you may wish to apply constraints to the optimisation tools for one reason or another: for example a customer of yours may ask for a particular carrier to be used, and you would like to accommodate them.


This guide explains how you can select constraints to be used for given shipments.


This area is under active development and expansion by 7bridges: if you feel there are missing features you would like to use please contact us as it is likely we already have a plan to implement them.

Tags and constraints


Fulfilment constraints are selected by your client by passing tags on the API. Tags are just any character string. The 7bridges platform then uses those tags to select pre-configured constraints to apply to orders with that constraint.


For example, say that you always wanted to pick a specific service Speedy Service 1 for some orders. You would:

  1. talk to your 7bridges contact and state the service you want to be able to constrain your shipment to.
  2. agree a tag to use to identify this service, such as SPEEDY-SERVICE-1, and your 7bridges contact will configure that on the 7bridges platform
  3. then send that tag over the API on any relevant object, and 7bridges optimisation tools will be sure to select that service.
☝Note that if you are using Send and the platform cannot for some reason automatically select a service that matches your fulfilment constraints, or if you manually view available services, then the list of services you see initially in the Shipping Method step will only be those that satisfy the constraints. You can, however, view all of the available services if you wish to manually override the constraints by checking the " Show rates filtered by settings" checkbox on the Shipping Method step.

Passing tags on the API

These are the places you can pass tags on the API:


  • In the Order"tags" field when creating or updating an order (see the Order API – Create or Update an Order section of the API docs). These tags will apply to any outbound movement demand or shipment that is created from this order (but not a return, since in general returns will have different requirements from outbound shipments).
  • In the Shipment"advanced_return"."tags" field in a /shipment/<shipment_id>/!get-postage request, to specify tags to apply to an advance return shipment (an advance return shipment is one that has a label created at the same time as the outbound shipment so that it can be packed in the box and sent to the recipient to use immediately if they want to return any items).

Available constraints


These are the constraint types that are currently available for you to use.


As mentioned above, this area is under active development. If you would like to constrain the 7bridges optimisation tools in a way that is not possible using these constraints, please contact your 7bridges support contact.
Name Negatable* Description
Fixed provider yes Only allow services from the specified provider
Fixed service yes Only allow a specific pre-configured services to be used
Fixed service from order no Only allow a specific service to be used, but allow that to be passed on the order (only for outbound shipments)
Fixed fulfilment location no Only allow the order/shipment to be shipped from a specific pre-configured fulfilment location. Doesn't apply to return shipments

 

*negatable: this means the constraint can be configured in a negated form, where its meaning becomes its opposite. So for example, negating a fixed provider constraint means that all providers except for that provider are allowed. Multiple negatable constraints can be applied to a shipment to incrementally filter out e.g. providers that you do not want.