Carrier calculated shipping providers not given post-discount total

We use Intuitive Shipping on a store and we’ve noticed that certain customers are getting Free Shipping (threshold cart value is >=£45) even when an automatic order discount has discounted the cart to below that threshold.

Their support has told me that “Shopify applies these discounts as part of the cart information, rather than on the products themselves, so when it comes time to call for rates, we aren’t given the discounted price nor any other flag or other identifier that a discount is even present”.

The discount in question is a ‘Buy X Get Y’ product discount.

I’m not sure if this is incorrect or not, as having customers’ CCS rates based on pre discount cart info rather than post seems like a strange default.

Any ideas?

Do you happen to know which function they’re using?

Hahaha if I’m not getting you on Slack it’s here! :sweat_smile:

Intuitive just leverages CCS - they get a checkout payload, and return rates - old school and functionless I believe.

The discount in Shopify is just a standard Buy X Get Y, not sure behind the scenes what function API that entails.

1 Like

Hey @Paul_Holmes :waving_hand:

When automatic discounts (including Buy X Get Y discounts) are applied to a cart, the shipping calculation through CCS is based on the pre-discount cart total, not the post-discount total.

This is a known limitation on our end though, which we’ve logged. The most common workaround if your shipping provider isn’t looking into using Functions is to use custom/manual shipping rates instead of CCS calculated rates.

We do mention this here in our developer documentation in case it’s helpful.

Hope this helps, please let me know if I can clarify anything more on my end here. Happy to assist with any workarounds if needed.

1 Like

Hey Alan,

Thanks for the info - I wasn’t aware of this limitation. What function API would you suggest CCS rate providers use to be able to achieve this? Unfortunately manual rates aren’t an option - the whole point of CCS on the store was to get round the myriad limitations on manual rates.

Best,

Paul

1 Like

Hey again @Paul_Holmes :waving_hand:

Great question! So after a bit of digging, I just wanted to confirm that the Discount Function API could potentially help here, but it’s likely not something Intuitive Shipping could implement on their end without assisting with some configuration on the merchant side of things, if that makes sense (unless they built a set up flow that runs upon installation of their app).

The Discount Function API allows for creating shipping discounts that could technically evaluate the actual post-discount cart total and adjust shipping accordingly. In theory, you could build a custom function that checks if the post-discount total falls below a certain amount of money and then adds a shipping charge back to compensate for the incorrectly applied free shipping.

The main catch as mentioned earlier there is that this would need to be implemented merchant-side as a workaround rather than being something the CCS provider could build into the CCS service itself. It would essentially be a two-step process where Intuitive Shipping calculates rates based on the pre-discount total (giving free shipping), and then your custom function would need to “correct” this by adding shipping costs back when appropriate.

You/they would need maintain shipping logic in two places (both in Intuitive Shipping and in your custom function), which could get out of sync. It might also confuse customers who initially see free shipping in their cart, only to have a shipping charge added by the discount function.

Let me know if you’d like me to elaborate on any of this - happy to pass your feedback on the original limitation as well since I do know it is common problem for many merchants/partner devs.

Just an FYI, a discount function can only discount the shipping line, rather than add to the shipping line. Apologies if you meant this, but you’d likely want to charge a higher price and then optionally discount, or not discount. @Paul_Holmes - hit me up on Slack/DMs if you want to test this out together!

2 Likes

Hi @Alan_G,

Thanks again for the comprehensive reply. I think the caveats you’ve listed largely rule out this approach, but appreciate the thought put into it.

Excuse my naivety, but is there a particular reason Shopify can’t send the post-discount order value, rather than pre-discount value, to the CCS endpoint?

My guess for the omission was that the original rationale for CCS was so that actual couriers (e.g. FedEx, DHL) could provide rates based on weight (i.e. where subtotal doesn’t matter), but I also believe Shopify’s own manual rates (which I guess are served through a similar mechanism - or maybe some other legacy mechanism) do not have this limitation, and given how ubiquitous it is to have the ‘final total’ be the basis for shipping rates this is a very difficult one to logically explain / defend to clients whose shipping needs go beyond the rudimentary options offered via manual rates.

Hey @Paul_Holmes, thanks for following up here, I can’t confirm the exact technical reasoning behind the limitation at the moment, but let me touch base with the team internally to see if there’s additional context we can share about the design decisions here.

I can’t guarantee that I’ll be able to share the exact details, but I’m more than happy to see if I can share anything on our end here, and at the very least I can put through a feature request for you so that we can look at enabling more robust CCS customization in the future.

Hey @Paul_Holmes - I was able to do a bit of digging into this, and I’m unable to share the specific internal reasoning for this, but essentially we built this limitation in to limit the amount of rate requests we’re sending out to third party Carrier Service Apps. There’s a bit more info on this here:

That said, I definitely understand it’s not ideal. So I’m happy to put in a feature request for sure. Let me know if there’s anything else I can share in the feature request report on my end here and I’d be happy to get that sent up to the product team.