Shipping method exclusions and eligibility qualifiers
Key Takeaway
A shipping method is applicable to a shipment only when it passes all three checks. It excludes none of the shipment's products. It doesn't exclude the shipping address, if one is set. The shipment customer belongs to one of its assigned customer groups, if any are assigned. Failing any one check makes it inapplicable.
A shipping method in B2C Commerce doesn't have to be available for every order. Its eligibility can depend on four things: the products in a shipment, the shipping address, the customer groups the customer belongs to, and the session currency. Developers use the Script API, mainly ShipmentShippingModel, to find out which shipping methods a given shipment is allowed to use.
What can limit a shipping method
A shipping method's eligibility can be narrowed in four ways:
- Product exclusions: the method can exclude certain products.
- Shipping address exclusions: the method can exclude certain shipping addresses.
- Assigned customer groups: the method can be limited to certain customer groups.
- Currency: the method can be tied to a currency.
The first three are checks against a specific shipment. Currency depends on the shopper's session currency.