-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transaction Hooks - External Integration #62
Comments
Good idea! I can see some interesting integration here. Especially with the redemption use case. Linking to something like zapier could probably open up even more use cases in the future, but a web hook could be a good start. |
I guess right now it's possible to specify a link which automatically opens on redemption. Does it work for the use cases you have in mind? |
I think I could make that work. If it’s a specific link per wishlist item should be able to make that work with worst case a small custom handler server that would bring in parameters from the link and then do any heavier lifting that would be desired. The one thing I’m thinking about is it would be nice to have at least some basic error handling/feedback from the opened link such as for a webhook a non 200 response or if a command hook on the server a non 0 exit code etc. so that HabitTrove wouldn’t mark it as redeemed if the linked redemption process didn’t report a successful completion. I’m not sure that a straight open link would be able to have this type of feedback. Maybe there is a way to open a link and get the main http status code back from that link opening though. I’m not super familiar with all the different web/browser APIs that are available. |
For an explicit example on the allowance money redemption if the external app was down or something but there wasn’t any validation then HabitTrove would mark it as redeemed and subtract the points but it wouldn’t register on the other system and it would be require manual auditing to find the problem which would make the built in linking a lot less useful. |
The json schema is pretty easy to follow and could be easily parsed by external applications but it would be cool to have hooks that could fire either a web request, sent an mqtt message or run a configured command with the transaction details passed along so that wishlist redemption can trigger actions in external applications. One such example is if coins could be redeemed for additional allowance money or something then a script could apply that balance adjustment automatically upon redemption of the related wishlist item.
The text was updated successfully, but these errors were encountered: