Discount Ninja
Search
K
Comment on page

Events published

Documentation related to the events published by the script which can be used to integrate with custom solutions.

Promotions loaded

Event
la:dn:promotions:loaded
Timing
Published after promotions have been loaded and processed by the app.
Parameters
  • event.detail.data: an array of objects representing the offers loaded by the app
Each offer includes:
  • Token: the token of the offer
  • TriggeredByTrigger: the trigger that triggered the offer, including its token (TriggeredByTrigger.Token), the Schedule, the Filter settings and an array of offer tokens in Offers.
  • Entitlement: describes what the offer includes
  • Tiers: describes further details of the offer per tier
  • Prerequisite: describes what needs to be in the cart for the offer to apply
  • Stacking: contains information about if/how the offer stacks and combines with other offers
  • Building blocks: the Notification, StickyBar, Cart and DrawerCart properties describe the configuration of the building blocks for the offer