Configuring Shipping Rate Filtering for Pickup Points

Shipping rate filtering is the process of dynamically showing or hiding specific shipping rate options during checkout, based on whether a customer has chosen home delivery or a pickup point. When implemented correctly, it ensures customers only ever see the rates that are relevant to their chosen delivery method.

This guide explains when filtering is required, what to consider during implementation, and how to define your filtering rules.

The need to implement custom shipping rate filtering depends on your chosen Launch Experience. Read the section below carefully to determine whether filtering applies to your setup.


When Is Filtering Required?

Shipping Method Launch Experience

The pickup option appears directly within the list of shipping methods, alongside your standard home delivery options (e.g., "Standard Home Delivery", "Express Home Delivery", "DPD Standard Pickup").

Filtering requirement: In most cases, explicit filtering logic is not required. When the customer selects a pickup shipping method, the platform understands this choice inherently defines the delivery method and associated rate. Other rates are implicitly not chosen.

Toggles Launch Experience

The customer chooses between "Home Delivery" and "Pickup" before the detailed shipping methods and rates are displayed — typically using buttons, toggles, or tabs presented near the shipping address input.

Filtering requirement: Filtering logic is almost always required when using this launch experience. After the customer selects "Pickup" via the toggle, your ecommerce platform needs to:

  1. Detect that "Pickup" was chosen.
  2. Filter the list of available shipping rates to show only those applicable to the selected pickup method or network.
  3. Conversely, if "Home Delivery" is chosen, hide any pickup-specific rates.

Common Reasons to Implement Filtering

  1. Offering distinct pickup rates — you may want to offer pickup at a different price point than home delivery (e.g., "Standard Pickup — $2.99" vs. "Standard Home Delivery — $4.99"). Filtering ensures only the relevant rate appears based on the customer's choice.

  2. Managing different service levels — you might offer specific service levels for pickup that differ from home delivery. For example, offering "Standard Pickup (3–5 days)" but not "Express Pickup (Next Day)", while still offering "Express Home Delivery". Filtering hides the unavailable express pickup rate.

  3. Handling multi-carrier setups — if you use different carriers for different delivery types, or for different pickup networks, filtering is essential. For example: you use Royal Mail for standard home deliveries, but all shipments going to DPD Pickup Points must be shipped via DPD. If a customer selects a DPD Pickup Point, your checkout must hide the Royal Mail rate and show only DPD rates.

  4. Preventing illogical options — ensuring non-applicable rates are hidden entirely. For example, hiding all home delivery rates (such as "Next Day Home Delivery") when a pickup point has been confirmed.


Key Considerations for Implementation

If you are using the Toggles launch experience, or have complex multi-carrier rules that require filtering even with the Shipping Method launch experience, your development team will need to address the following.

Identifying the Pickup Choice

Determine how your backend or checkout logic will know the customer selected "Pickup" via the toggle mechanism:

The onCollectPointConfirmed callback (available in the HubBox SDK) fires when a customer confirms a pickup point. You can use this to send a "pickup selected" flag — along with the chosen network or location details — to your backend. The onCollectPointUnselected callback fires when pickup is deselected, allowing you to send a "home delivery selected" flag.

Accessing and Modifying Shipping Rate Logic

Within your ecommerce platform, identify where and how you can programmatically access the list of available shipping rates before they are presented to the customer. Key questions to answer:

The implementation approach varies significantly by platform. Refer to the platform-specific guides linked in the #next-steps section below.

Defining Clear Filtering Rules

Map out the exact conditions for showing or hiding each shipping rate before writing any code. Example rules:

IF delivery_choice == 'PICKUP'
  THEN SHOW ['PickupStandard', 'PickupNextDay']
  AND HIDE ['HomeDeliveryStandard', 'HomeDeliveryExpress']

IF delivery_choice == 'HOME'
  THEN SHOW ['HomeDeliveryStandard', 'HomeDeliveryExpress']
  AND HIDE ['PickupStandard', 'PickupNextDay']

IF delivery_choice == 'PICKUP' AND selected_network == 'dpd'
  THEN SHOW ['DPD_Pickup']
  AND HIDE ['RoyalMail_Pickup', 'HomeDeliveryStandard', ...]

Handling Rate Display and Updates


Platform-Specific Implementation

The technical method for implementing shipping rate filtering varies significantly depending on your ecommerce platform. The table below summarizes the approach for each supported platform:

Platform Filtering Mechanism Notes
Shopify Plus (Toggles/Buttons) Shopify Delivery Customizations, powered by Shopify Functions Configured via the HubBox App Admin Panel. Turn on "Shipping Rate Filter" under Additional Settings, then select which rates to show for Pickup and Home Delivery respectively.
Shopify Plus (Shipping Method) Generally not required The platform handles rate selection implicitly when a pickup shipping method is chosen.
Shopify Basic / Advanced Generally not required The platform handles rate selection implicitly when a pickup shipping method is chosen.
Magento 2 Plugin on collectRates method of carrier models Create an afterPlugin on the relevant carrier model(s). Inspect the quote or address object to determine if HubBox pickup is selected, then filter the $result object accordingly.
Salesforce Commerce Cloud HubBox controller callbacks HubBox appends to the controller and provides onCollectPointConfirmed and onCollectPointUnselected callbacks to toggle pickup state and trigger rate filtering.
Custom / SDK onCollectPointConfirmed / onCollectPointUnselected callbacks Use the HubBox SDK callbacks to send the pickup state to your backend, which then filters the available rates before returning them to the frontend.
Tag / BigCommerce / WooCommerce Implemented within the Tag script The shippingMethods segment within the Tag script controls which rates are shown or hidden depending on customer's selection of pickup or home delivery.

Detailed instructions, code examples, and platform-specific considerations are available in the relevant platform integration guides in the HubBox Console.


FAQs

Do I need to implement shipping rate filtering if I'm using the Shipping Method launch experience?

In most cases, no. When using the Shipping Method launch experience, the customer selects a specific pickup shipping method from the list, and the platform understands this choice implicitly. Other rates are not chosen and do not need to be hidden.

However, filtering may still be required in complex multi-carrier setups where selecting a specific carrier's pickup rate should also hide other carriers' home delivery or pickup rates. Consult your HubBox Integrations Manager if you are unsure.

How does the HubBox SDK signal that a pickup point has been confirmed?

The HubBox SDK provides two key callbacks for this purpose:

Your backend logic should receive these flags and filter the available shipping rates accordingly before returning them to the frontend. Refer to the /docs/software-development-kit for full implementation details.

What happens if a customer switches between Pickup and Home Delivery after rates have been filtered?

Your filtering logic must handle this scenario. When the customer toggles back to Home Delivery, the onCollectPointUnselected callback fires. Your system should use this event to re-trigger the rate filtering logic and display the correct home delivery rates. The rate list should update dynamically without requiring a page reload.

Ensure you test this switching behavior thoroughly during UAT, including scenarios where the customer switches multiple times before completing their order.

How do I implement filtering for a multi-carrier setup?

In a multi-carrier setup, your filtering rules need to account for the specific carrier network the customer has selected, not just whether they chose pickup or home delivery. For example:

IF delivery_choice == 'PICKUP' AND selected_network == 'dpd'
  THEN SHOW ['DPD_Pickup']
  AND HIDE ['RoyalMail_Pickup', 'HomeDeliveryStandard', ...]

IF delivery_choice == 'PICKUP' AND selected_network == 'royalmail'
  THEN SHOW ['RoyalMail_Pickup']
  AND HIDE ['DPD_Pickup', 'HomeDeliveryStandard', ...]

On Shopify Plus, the HubBox App Admin Panel supports multi-network rate filtering. You can map specific shipping rates to specific carrier networks (e.g., {"dpd": ["DPD Pickup"], "royalmail": ["Royal Mail Pickup"]}). When a customer selects a DPD rate and opens the Widget, only DPD collect points are displayed. When they select a Royal Mail rate, only Royal Mail collect points are shown.

Refer to the /docs/shopify for full configuration details.

I'm on Shopify Basic or Advanced — can I still implement rate filtering?

Yes, but the approach differs from Shopify Plus. Shopify Functions (which power the Delivery Customizations used on Plus) are not available on Basic or Advanced plans.

For non-Plus stores, options include:

Refer to the /docs/shopify-basic for detailed instructions.

How do I implement rate filtering in Magento 2?

In Magento 2, shipping rate filtering is implemented via a Plugin on the collectRates method of the relevant shipping carrier models (e.g., Magento\Quote\Model\Quote\Address\RateRequest). You may need plugins for multiple carrier models depending on which rates you need to filter.

In your afterCollectRates(\Magento\Shipping\Model\Rate\Result $result) method:

  1. Determine if the current quote's shipping address represents a HubBox pickup selection (the HubBox module may add a flag or specific data to the Quote or Quote Address object that you can inspect).
  2. Iterate through the rates in the $result object using $result->getAllRates().
  3. If HubBox pickup is selected, remove rates intended only for home delivery.
  4. If Home Delivery is selected, remove rates intended only for HubBox pickup.
  5. Return the modified $result.

Refer to the /docs/magento for full implementation details and code examples.

Who should I contact if I need help determining whether filtering is required for my setup?

Contact the HubBox Integrations team. Your HubBox Integrations Manager can review your checkout architecture, launch experience configuration, and carrier setup to advise on whether filtering is required and the best approach for your platform.