Skip to content
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

Notify Robotoff when a product is created/updated/deleted #1707

Closed
raphael0202 opened this issue Mar 13, 2019 · 4 comments
Closed

Notify Robotoff when a product is created/updated/deleted #1707

raphael0202 opened this issue Mar 13, 2019 · 4 comments
Assignees

Comments

@raphael0202
Copy link
Contributor

raphael0202 commented Mar 13, 2019

Notify Robotoff when a product is created/updated/deleted, so we can:

  • generate insights (ex: category)
  • delete insights associated with deleted products
  • delete insights if the attribute has been manually provided (ex: a user manually set the category, the category insight is not necessarily relevant anymore)

For created actions, the best would be to wait for the form to be sent before triggering a notification (in other words, don't send a notification as soon as the images are uploaded)

Send an application/x-www-form-urlencoded POST request to /api/v1/webhook/product with the following parameters:

  • barcode (string, required)
  • action (string, required) : one of updated, deleted, created
  • updated_fields (str, comma separated list): list of updated fields (only for updated action)
@stephanegigandet
Copy link
Contributor

Currently the form does not keep track of what has been updated, can I just notify that it has been updated? Then you can delete all current insights and recompute new ones. Is that ok?

@hangy
Copy link
Member

hangy commented Mar 28, 2019

Currently the form does not keep track of what has been updated, can I just notify that it has been updated? Then you can delete all current insights and recompute new ones. Is that ok?

Don't we have the changed fields available when the changelog entry is created?

@raphael0202
Copy link
Contributor Author

@stephanegigandet Yes just notifying that the product has been updated is enough, no need to provide a detailed changelog

@raphael0202
Copy link
Contributor Author

@stephanegigandet I believe this issue can be closed?

@CharlesNepote CharlesNepote added the Fixed ? This issue might have been fixed. We can close them once we verify that they have. label Jun 12, 2019
@VaiTon VaiTon closed this as completed Jul 4, 2019
@VaiTon VaiTon removed the Fixed ? This issue might have been fixed. We can close them once we verify that they have. label Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants