Dr Free Gift & BOGO

Why is my Gift Fraud Checkout Rule not working?

APP SETUP

What’s Happening?

The issue arises due to limitations imposed by Shopify’s Shopify Functions feature. Specifically, Shopify has implemented a strict input size limit for their functions, which affects how much data can be processed during a single execution.

In practical terms, the cart data—which serves as the input for this function—can exceed this limit in about 0.06% of cases (approximately 1 in every 2000 executions). This primarily happens when there are too many items in the cart.

Why Can’t This Be Fixed?

Unfortunately, this limitation is on Shopify’s end, and our app has no control over the input size cap they’ve set. Until Shopify raises this limit, there is no way to guarantee that the Gift Fraud Checkout Rule will always execute successfully for customers with excessively large carts.

Who Is Affected?

Based on our analysis, 100% of affected sessions so far have been bots. These bots often add the entire store’s catalog to their carts, causing the input size to surpass Shopify’s limit. However, this issue could theoretically affect legitimate customers who add several tens of different products to their cart simultaneously.

What Happens When the Limit Is Exceeded?

When the cart data exceeds Shopify’s input size limit:

  • The Gift Fraud Check is unable to execute.
  • Customers (or bots) with large carts can proceed through Checkout without this validation.

What Can Be Done to Mitigate This Issue?

While the root cause lies with Shopify, here are some best practices to reduce the likelihood of this issue:

  1. Monitor Suspicious Activity:
    Keep an eye on your cart and checkout activity. Many affected sessions are bots that can be identified through unusual cart patterns, such as excessively large item counts or repetitive attempts.
  2. Use Bot Protection Tools:
    Consider implementing bot protection or CAPTCHA on your store to limit the activity of automated scripts. This will reduce the likelihood of bots adding all items to their carts.
  3. Limit the Number of Items Displayed or Allowed in Carts:
    While not ideal for user experience, some stores choose to limit the number of products that can be added to a cart. This prevents carts from becoming excessively large.To do this, you can use applications that apply rules to the entire cart or individual products within the cart.

How Often Does This Happen?

Statistically, this issue is very rare, occurring in only about 0.06% of executions. However, when it does happen, it can create vulnerabilities in your Gift Fraud prevention strategy.

What’s Next?

While we hope Shopify will address this limitation soon, we recommend staying proactive with bot protection and monitoring your store’s activity. If you notice unusual checkout behavior, consider implementing additional fraud prevention strategies until Shopify resolves the input size issue.