vtex-apps / store-discussion

VTEX IO store builders' community
80 stars 5 forks source link

Listen to subscriptions events #663

Open pankinho opened 2 years ago

pankinho commented 2 years ago

What are you trying to accomplish? Please describe.
I want to listen to subscriptions events (canceled-subscription, expired-subscription, skipped-subscription, etc) like it's in message center. My end goal is to trigger communications about subscriptions on a third-party platform that doesn't have an official integration with Vtex.

What have you tried so far?
Tried to listen to events by creating a back-end application and listening to vtex.orders-broadcast, but it doesn't works for subscriptions events.

Additional info
I don't know which app (if any) in my workspace issues these events. In the end, the perfect solution would be listen to events like message center does, in the tab templates. If any app issues these events to the message center and if i could listen to them (and filter if necessary) using a back-end app. Other solutions, like notifying a webhook, would work as well.