...
Please use this playground to play with the queries below and examine the schema for fields you may wish to request.
Some
where
filters that may be relevant to Kioskids
- a collection of Engine IDs for offers/rewards. This is theloyaltyEngineId
field on every sanity offer/reward document.omitInvalids
- This controls whether invalid incentives will be returned. Only incentives that failed “fixable” rules will be returned if this is set tofalse
. A fixable rule is one that the user can change behavior to make the rule pass, like theminSpend
, the user can add more items to their cart to meet the requirement. An absolute failure likedate-band
will not be returned regardless of what the value of this filter isThis is useful for displaying error / in-line messages in the UI
serviceMode
- some incentives can only be redeemed if the service mode meets the required rulesetstoreId
- some incentives can only be redeemed at certain storessubtotalAmount
= some incentives require a minimum spendcartEntries
- some incentives require certain items to be in the cart, this rule uses the sanity id of each rbi productpaymentMethod
- some incentives require certain payment methods to be used
Example Offers Query
Info |
---|
You should use the
|
Code Block |
---|
query getLoyaltyOffers { loyaltyOffersV2(loyaltyId: "<USER_LOYALTY_ID>", where: { omitInvalids: false }) { id name type sanityId errors { code ruleId } } } |
...