Offers: Running a Large Number of Offer Personalizations with Shopify Functions
Last updated
Last updated
A Shopify function only can contain so much information. Once you exceed ~20 Offer Personalizations (active or inactive) we may need to use multiple Shopify Functions to accurately store all of your Offer Personalization data.
This means that you will have several functions operating independently. Each function will return its own result, and will apply stacking logic only to the campaigns stored within that function.
When configuring an Offer Personalization's stacking settings, you will see the names of the other Offer Personalizations it can stack with.
When the functions run on your store, Shopify will choose the single result with the maximum benefit, and apply that discount to the order.
Function A holds Offer Personalization 1 (10% discount) and Offer Personalization 2 (15% discount). Both are set to stack
Function B holds Offer Personalization 3 (30% discount) also set to stack
If a user is eligible for all the above Offer Personalizations, Function A will return a stacked discount (10% + 15%) and Function B will return a single discount (30%)
Because the result from Function B has a greater benefit (30% > 10% + 15%) only the result from Function B will apply to the order.
If you are using checkout.liquid
you can only have 1 active discount function with an 'automatic' application method (this is the type of function our campaigns use). Otherwise, Shopify allows for a maximum of 5.
However, this number isn't scoped to just the Intelligems app - every automatic discount, whether it's created by another app or Shopify, counts against this total.
If there are any campaign(s) that we couldn't find function space for, we'll highlight them in red. These Offer Personalizations will not run on your store. In order to make room so they will run, you can remove any non-Intelligems automatic discounts, or remove other Intelligems Offer Personalizations.