David Widaman
posted this on July 20, 2011 11:12 pm
The purchase flow has an event-driven API attached to it. You may register functions with the purchase flow that can be fired when events are triggered. This can allow more highly customized experiences than Topspin provides out of the box - be it cart abandonment messages, secondary share flows, additional special offers, and so on.
This functionality is available on any page where a standard offer has embedded - no special configuration is needed.
The purchase flow triggers events when certain conditions are met. You can listen for those events and Functions are registered via a simple call:
Registering a Listener:
For example, if you wanted to call your function "displayThankYouMessage" after PURCHASE_COMPLETE, your code might look like:
These are the response objects that are returned.
Lightbox Open
Lightbox Close
Purchase Complete
Cart Update