We’ve got our CarrierService registered that calculates and returns to Shopify’s checkout the min_delivery_date and max_delivery_date values. These are nicely shown to the customer at the checkout or express checkouts. We also have an integration in place to fetch Orders from Shopify to our ERP system to process them. Our ERP system requires to know min/max delivery dates to correctly schedule the sales orders through the system.
We cannot find these min/max delivery date values anywhere via the Admin API (REST or GraphiQL). We know that the FulfillmentOrder resource contains the delivery method with min_delivery_date_time and max_delivery_date_time properties, however in our cases they are always set to blank.
Does anyone know what needs to happen or where to look to get access to the delivery dates that were shown to the customer at the checkout?
The challenge you’re experiencing is a common one, as Shopify does not currently support the saving of min or max delivery date values that you have defined in your CarrierService. These values are used in the checkout process to inform the customer about the estimated delivery date, but they are not saved with the order or available via the API after the checkout process has completed.
However, there are a few workarounds that you may consider:
Use Metafields: You can create a custom app that listens to the checkout/createwebhook. Once the checkout is created, you can use your app to calculate the delivery dates and store these values in the metafields of the checkout object. Once the order is created, you can then copy these metafields from the checkout object to the order object.
Use Note Attributes: Another option is to use the note attributes of the order object to store the delivery dates. You can use a custom app to listen to the checkout/create webhook, calculate the delivery dates, and then update the note attributes of the checkout object. The note attributes will then be copied to the order when it’s created.
Use the Order API: If you have the ability to modify the checkout process, you could add a step where you calculate the delivery dates and include them in the Order API call that creates the order.
Do note that these are workarounds for this limitation and might not be perfect for your use case, or might need slightly different approaches.
Thank you for the tips. As this is a common issue, do you think that Shopify will address that?
We have a workaround in place that uses the shipping method name to store the dates (as this also makes it clearer in the express checkouts - when we pre-sale a few weeks out, it looks confusing to the users to see messages like 15 - 19 business days)
We will evaluate if the options you provided further improve or can replace our workaround.