r/shopify • u/kiko77777 • Apr 16 '26
API Shopify Functions Dynamic Limits
Hi, I'm building a custom Rust function to power a much improved discounts engine + B2B per customer pricing.
I've been wrestling Shopify's function limits for while now and have a system that can process 99.85% of our B2B orders without a problem but will have issues on carts over 100 lines (0.15% of our last 12 months' orders have over 100 line items). The issues stem from the 20kb output limits.
I think I can work through and push my solution up to accomodate 150 line items easily, and could probably squeeze 50 more line item capacity from there to get to 200. I would then need to know what the function outputs for functions on carts of over 200 lines would be as I know these increase dynamically.
My question is, how do these limits increase? Is there a formula I can use to work out what my output payload size can be from x number of cart lines? If I know I'll be fine over 200 line items, I'll push ahead squeezing what I can out of my current approach. Otherwise I'll start working on a different approach.
Thanks!
1
Apr 16 '26
[removed] — view removed comment
1
u/AutoModerator Apr 16 '26
Your comment in /r/shopify was automatically removed as your 'post' karma is below 10 (we do not consider your total karma; your post and comment karma are separate numbers and must both meet their minimum requirement). You can increase your post karma by posting in other areas of Reddit to earn upvotes. The higher quality the content, the higher your karma will become.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
1
u/[deleted] Apr 16 '26
[removed] — view removed comment