Subscription Checkouts + Delivery Customization Function

This is regarding the interaction between Shopify’s custom checkout behavior for delivery options for subscription products and the Delivery Customization Function.

The Shopify checkout behavior for shipping options for checkouts with a subscription product goes as follows (as far as I can tell):

  1. Get all shipping options from the delivery profile(s) like normal for the items that will be sent out immediately. Could include the first shipment for the subscription products plus any possible one-time products in the order.
  2. Repeat step 1 for all items that will be in recurring shipments as a result of this order. Might be the same as step 1, might be different.
  3. Show the step 1 options to the shopper so that they can choose which delivery option their first shipment ships with (maybe they’d like an Express option for their first shipment, to get it faster).
  4. Shopify automatically chooses the first/cheapest of all the options received from step 2 for the recurring shipments, because they’re recurring, so it makes sense to choose the cheapest. No real reason a shopper would want to pay for a premium shipping option on the recurring shipments.

The problem I’m seeing and running into is that this flow does not play nicely with Delivery Customization Functions which hide certain shipping options. The flow/behavior described above made sense before Delivery Customization Functions, but now with them, there are some pitfalls it doesn’t account for well in my opinion, and we have merchants who are struggling as a result.

Whether created by an app or a merchant using an app to configure their own Delivery Customization Function behavior, these functions can use their “Hide” operation to hide that single shipping option that Shopify automatically chose for the recurring shipments. In this case, the shopper is unable to checkout, seeing an error badge in place of the shipping options saying “Shipping not available”.

It’s not an unreasonable thing to write Delivery Customization Function logic that goes through each delivery group given as input, and hides certain shipping options from that group. An example: Maybe a merchant wants to give free shipping to any shoppers with the gold-loyalty tag. They configure their rates in the delivery profile to include a Standard for $5 and a free Standard. Their function reads whether or not the shopper has the gold-loyalty tag. If not, it uses the “Hide” operation to hide that free Standard option.

BUT, if this particular shopper happened to have a subscription product in their cart, then the perfectly reasonable and useful Delivery Customization function the merchant configured just hid the ONLY shipping option for the recurring shipment delivery group because Shopify automatically selects the cheapest option as the only possible option for that delivery group.

This is obviously broken behavior, the solution I see is that, if Shopify must choose a single option for the recurring shipment delivery groups, then they should choose the cheapest option AFTER all Delivery Customizations have run. Obviously choosing the cheapest that is NOT HIDDEN.

I don’t disagree with Shopify’s product decision to not allow shoppers to select from the full group of available options for the recurring shipments. It makes sense. But the single rate that is selected for them should be selected by Shopify after it knows no Delivery Customization functions are hiding it.

If the use case with the gold-loyalty tag does not make sense, let me know, I’d be happy to give more examples of plausible, reasonable use cases for Delivery Customization Functions using the “Hide” operation to hide certain shipping options that are configured in the delivery profile (or from Carrier Services).

Here’s what it looks like to the shopper when a Delivery Customization Function hides their only shipping option for the subscription recurring delivery group.

@NickWesselman @David-Shopify @Liam-Shopify If I’m remembering correctly from shopify.dev, you guys are the Shopify Functions experts. Do you guys have any insights on this?

Just stumbled upon this myself. @ColemanCook have you had any luck reaching someone in Shopify about this?

I’d also prefer it if the “Recurring shipments” section would respect the hidden options. The very reason we’ve hidden it is because it is not the correct one for the current cart.

Yeah, that’s exactly right. Unfortunately I haven’t heard any response from Shopify on this yet. Have reached out through a couple channels.

@ColemanCook any news on this? having the same issue apparently