Custom Model for Stock Notifications: How to Notify? #571
-
Working on a custom setup to allow customers to be notified when a product returns to in stock. Still planning but would like to implement this week. As far as I have figured out so far:
Sending the notifications is where I am looking for guidance. I have read the docs but have not yet created a custom notification in Swell and would love to be pushed in the right direction. If using conditions I imagine I would associate this with the product model, and when a record updates check the stock level for greater than 0? Or would it be easier just to use a webhook to the endpoint when a Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
@coderreco This looks like an excellent Swell app idea. Do you want to try it?
https://developers.swell.is/guides/notifications I would recommend following the below steps in addition to your thoughts:
On a side note, add an additional field ( These can be achieved easily via Swell apps. If you are interested, please check this out: |
Beta Was this translation helpful? Give feedback.
@coderreco This looks like an excellent Swell app idea. Do you want to try it?
https://developers.swell.is/guides/notifications
I would recommend following the below steps in addition to your thoughts:
$notify
operator inside your webhook implementation.On a side note, add an additional field (
unsubscribed
) in stock-notification model to stop sending an email …