...
The Sanity ID for the live offers document, for the most part, will be
feature-loyalty-offers-ui-singleton
, however, some markets have drifted from this convention.An offer is open only if it has the ruleset
RequiresAuthentication = False
. If the rulesetRequiresAuthentication
is not present in the offer OR if the rulesetRequiresAuthentication = True
, then the offer is closed and should only show for guests that are signed into the kiosk.Sample query:
Code Block | ||
---|---|---|
| ||
query getSanityOffers { LoyaltyOffersUI(id: "feature-loyalty-offers-ui-singleton") { # Available for all users. # You can use these to lookup assets from global. sortedSystemwideOffers { _id loyaltyEngineId name { enRaw } rules { # Returns the value of the AuthenticationRequired rule ... on RequiresAuthentication { requiresAuthentication } # Add more rules as needed here (e.g. FirstOrderOnly, LoyaltyBetweenDates, etc) } } # These are config. offers (templates). # You should use these only to display content (images, names, etc). # You can use these to lookup assets from the actual Personalized offers. liveConfigOffers { _id loyaltyEngineId name { enRaw } } } } |
...