Skip to content

RatanPaul/webhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webhooks for the rest of us

This is a salesforce connector that uses the Apex Microservices Open Specification (AMOS), particularly:

What is the "webhook" pattern?

Instead of you polling another system for data... they knock on the door of your system.

What this isn't:

We're not just standing up an Apex webservice class or a REST annotated method. A webhook shouldn't be concerned with performing any action. It should merely eat the notification so the transmitter can "fire and forget."

webhook1

What it does do:

It separates the three concerns: the synchronous responder that says "got it!"; the event that is persisted; another service performs some action while having no knowledge of the webhook transport.

webhook2

Why not just hard code the webhook action?

Rolling that Apex webhook probably won't be the first or the last one we ever build. We separate the event from the action by using AMOS with a service container. And the action gets free transaction management, free error handling, and context independence. Code less like the left, and more like the right:

webhook3_4

How to arrange the services?

  • First is your webhook
  • Second is your action (using AMOS)

webhook5-crop

How to configure different endpoints?

On any service instance, click Configure to expose:

  • URL path
  • HTTP verbs
  • Custom response

webhook6-crop

Video walkthrough:

video-frame

About

Webhooks for the rest of us

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages