Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Business Cases: Webhooks #8765


User avatar
0
crumbdav created

Greetings; This message is really meant for fellow users.

Im a relatively new developer to ABPZero and have noticed the Webhooks feature. It seems like a nice feature.

But Im trying to wrap my head around the business cases and what possibilites it may hold for me. And of course what requirements on the other end for me to integrate on my end.

So, to the group. What are the use/business cases you could/potentially could see for using web hooks? What are the possibilites? How are you implementing Webhooks in your application? Give us noobs some inspiration!

Also, what is needed on the 'host' end? Just a rest api endpoint? A rest api endpoint that only returns one record?

Thanks in advance,

--Dave


13 Answer(s)
  • User Avatar
    0
    BobIngham created

    Me too, I'd like to know what to use this for. Is it possible to integrate with the likes of Teams or Trello?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    There might be many use cases but this is just one example which comes to my mind;

    If you are building a e-shop and if 3th party e-shops are selling your product, than you can define a webhook for product price change and your clients can register to this webhook and get notified when the price of a product is changed.

  • User Avatar
    0
    BobIngham created

    @ismcagdas - nice, so this is possible? Teams - Sending messages to connectors and webhooks and this? Teams - Post external requests to Teams with incoming webhooks If it is then I'm clearing my desk for .NET Core and 8.5!

  • User Avatar
    0
    crumbdav created

    But Im still trying to wrap my head around what is the REQUEST and what is the RESPONSE. So lets take the example above of a price change. What would be the payload? Is it just a boolean? or is it an actual JSON document of the previous price, the new price, timestamp, username etc.

    This is supposed to be a "push" process right? The webhook pushes something to us and we are supposed to know what the payload is and then to be able to do something with it?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can check https://aspnetboilerplate.com/Pages/Documents/Webhook-System for a sample usage example.

  • User Avatar
    0
    musa.demir created

    Hi @crumbdav

    You can think that it is just an HTTP request. When some events happen, you can send information about it to any endpoint. You can send any data to subscribed endpoint(be careful about sensitive data). It basically converts it to JSON and posts to the given endpoint.

    When you publish a webhook it makes an HTTP request to each subscriber's endpoint. So the request is that created request. And the response is the response that the client sends back. It stores response just because you can check it later, it only cares if the response is succeeded. Then stores it for logging so that you can go back and see what happened when it sent a request to your endpoint.

  • User Avatar
    0
    musa.demir created

    so this is possible? Teams - Sending messages to connectors and webhooks and this? Teams - Post external requests to Teams with incoming webhooks

    We currently don't try it but you will most probably implement some codes. Because webhook system adds some additional data to payload. https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Webhooks/WebhookPayload.cs

    We may add some additional settings to send the exact data that you try to publish. Then you can probably use it fastly.

  • User Avatar
    0
    BobIngham created

    I have no idea what that means. Could you explain again? Is it possible to communicate with Teams?

  • User Avatar
    0
    musa.demir created

    Sorry @bobingham, I accidentally edit your comment instead of create new one.

    Here is my answer.

    Currently it is probably not possible. You should send a normal http request to Teams. You probably can not use webhook system because it sends data in WebhookPayload

    I created an issue about it. https://github.com/aspnetboilerplate/aspnetboilerplate/issues/5460

    Sorry about that again 😃

  • User Avatar
    1
    BobIngham created

    @demimursa, good to know. Nice to see you want to continually develop the functionality to improve third partycommunication. I would have closed this issue and marked your answer as correct but no longer seem to have the rights.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @bobingham because you are not the author of this issue :). @crumbdav Let us know if you need more help.

  • User Avatar
    0
    BobIngham created

    @ismcagdas, you are perfectly correct. I apologise to all, that was rude, I should have known.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @crumbdav

    If you don't have any other question, I will close the issue.