Articles on: Regios Automatic Discounts

Shopify Functions Input Query Complexity Limitation

This article explains why:
Some feature requests cannot be implemented
Shipping discounts do not support certain features, such as the "Logged-in customers" customer eligibility option

What is the "input query complexity limitation"?


Our app is built on a new Shopify feature called Shopify Functions. Discounts built with Shopify Functions execute their code on Shopify's servers, instead of our own servers. However, this comes with several limitations and restrictions.

One of them is the "input query complexity" limitation. This places a hard limit on how much information about the cart a discount built with our app can query from Shopify's API.

How does this prevent some feature requests from being implemented?


Adding some new types of conditions for discounts requires us to request additional data from Shopify's API. If we have already hit the input query complexity limit, then we cannot request this data, making those features implement to add to our app.

How does this affect shipping discounts?


Shipping discounts require us to request additional data from Shopify's API related to delivery groups and delivery methods. This pushes us closer to the input query complexity limit. So, we don't have enough space to request some data, such as whether the customer is signed in.

Why are you using Shopify Functions despite this limitation?


The benefit of Shopify Functions discounts is that they integrate seamlessly with the entire platform, and so they can consistently apply in the cart, checkout, and POS without requiring draft orders or other workarounds.

However, they have some several limitations, some placed by Shopify themselves.

Despite this limit, we believe that the benefits of Functions to merchants like you outweigh the cons. We are hoping Shopify will adjust this limit in the future.

Have any feedback for us?


We want to hear about your experience with our app! Leave a review on the Shopify App Store.

Updated on: 26/08/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!