Hi,
My use case is to trigger some external actions whenever there is a add to wishlist for any product by any user. What's the best way to do this? I can think of the following options
a) Build a module which catches the add to wishlist event and curls an external URL, which can then asynchronously trigger the actions.
b) Build a cron which runs every few minutes and queries the DB for any new wishlist items and then invokes external URL
c) Build an admin REST API which returns all wishlist items sorted by descending time. A tool like Zapier polls this API periodically and triggers actions for any new items found.
Are there any other ways to achieve this? I am wondering what the pros and cons of each of these approach is and what do you think is the best option? For example, for a) If this curl fails, will it cancel the user action? Is the error handled gracefully?