-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Prevent app to receive webhook for event this app has triggered #12538
Comments
@lkostrowski I think that some apps may expect to receive the payload triggered by themselves. For example, an app that finalizes the checkout by calling "orderCreateFromCheckout" may also expect to receive the "order-fully-paid" webhook. I believe that there is no reason to switch the value between Saleor versions. If you, as an app developer, do not expect to receive self-events, then you can set this flag to true. Otherwise, you will need to add additional implementation to handle this case. A helpful change we could make in Saleor 4.0 is the behavior of Another way to simplify the validation of current events that are sent to the app would be to include an If we agree to provide |
My initial thought was that it should be the default behaviour (hence the change in v4 to avoid breaking change). But if it makes sense to be the default - that's fine, I'm editing the original description. If we document it well, I think both options are fine.
I think its not a problem for app to detect this event, rather optimize unnecessary traffic |
Problem
There is an App, likely integrated with external systems, like CMS.
This app performs the following flow:
So, the app ensures the product is linked between systems
The problem is that app, saving metadata/external ID of the product, is triggering
PRODUCT_UPDATED
event, so it's called again. This leads to 3 problems:Real example of webhook payload for PRODUCT_VARIANT_UPDATED
Proposed solution
Introduce a new field to
webhookCreate
and manifest webhook creation that can be named likeomitForSelfEvents
(probably something better).With default valuefalse
(current behavior), and with Saleor v4 -true
.There should be decision if this flag should be "true" or "false" by default
The text was updated successfully, but these errors were encountered: