Skip to content

[FR] Supplier integration #3261

Closed
Closed

Description

@matmair

Problem
There are a bunch of integrations for different vendors. Most implement the same logic.

Suggested solution
Create models and APIs to make integration easy. Create them in a way that TOSs are not borken.

  • Model + API for API keys and connections settings
  • Model + API for requests + answers (+ cleanup)
  • Plugin mixin to enable easy search integration
  • API + python integration to enable third parties proxied calls without keys on the system (or knowledge of them at all).

Describe alternatives you've considered
A lot of small implementations work right now.

Do you want to develop this?
Yes - I have some code that will be seriously reduced by that.

I really would like to get some feedback on this and maybe make a list of all vendors that should be considered:

Activity

  1. added
    enhancement
    plugin
    on Jun 26, 2022
  2. added this to the 1.0.0 milestone on Jun 26, 2022
  3. matmair commented on Jun 26, 2022

    @matmair
    MemberAuthor

    Ping for feedback core team: @SchrodingersGat @eeintech
    Previous involved in discussions around this: @rcludwick @awulf @rco3 @maholli @Snevzor @Decee1

    This is long-term - I would like to have a picture of the effort before tackling it. Unnecessary to cerate APIs nobody uses.

  4. pinned this issue on Jun 27, 2022
  5. added
    help wanted
    roadmap
    on Jun 27, 2022
  6. eeintech commented on Jun 28, 2022

    @eeintech
    Contributor

    Thanks @matmair for taking a stab at this 👍

    Here are my thoughts (all of those points are subjective and based on my own experience/workflow):

    • Linking orders and part pricing should be must-have:
      • Orders auto-sync would be huge to keep an inventory up-to-date while lowering the number of manual steps for order management, I would put this as the highest priority
      • Part pricing auto-sync for BOMs would be incredible, no more having to upload BOM into supplier websites, InvenTree will have it always updated, I would put this as the second highest priority
    • Part number lookup using supplier to create a part straight in InvenTree would be nice-to-have, unless there is a way to easily sync to CAD tools, then it could become must-have. I think it would be easier to have InvenTree plugins made for CAD tools instead, the existing Python API delivers all the hooks needed for that. I would definitely put the focus on the previous items at first.
    • Full-fledged part search feature should be skipped, it's huge amount of work and it doesn't add any value trying to recreate the search pages of Digi-Key, Mouser, Octopart... Leave user browse to supplier websites which are perfectly made for this purpose.
  7. Stefanhg commented on Jun 28, 2022

    @Stefanhg

    I've been working on my own project as i felt like the way the getparts library was made was a bit messy.
    https://github.com/Decee1/SupplierBarcodeAnalyzer
    It is using the library for Mouser and Digikey. Or at least that is the goal.

    I am trying to stay away from the barcodes as i concluded they are messy to work with so i am mostly using the QR codes on the parts. LCSC, Mouser and Digikey all use QR codes.

    I might use barcodes when i get my new Logitech C922 which should be much better quality than my current webcam

    It is still in alpha, some functions still not working and i still need to analyze a lot more data to figure out the difference between each part. That's why i got different files for collecting and testing barcodes. I got a test function so you can compare the results of each barcode and check if they are correct.

  8. matmair commented on Jun 28, 2022

    @matmair
    MemberAuthor

    Thank you for your comments.
    @eeintech those a some interesting high level concepts. Not sure if that won't be left to the individual integrations.
    @Decee1 interesting project. Some ppl. in this repo already figured out the used standard for the barcodes / QR codes. They follow some standardized format. Maybe look if you can find them - might safe some time.

  9. SchrodingersGat commented on Jun 29, 2022

    @SchrodingersGat
    Member

    I think the key here would be to add some basic "stubs" to the plugin architecture which take care of the required back-end functionality, and then expose functions which plugins have to provide, e.g. API calls, authentication, etc.

    In addition to which suppliers we want to support, we should also determine a set of core functionalities

  10. rcludwick commented on Jun 29, 2022

    @rcludwick
    Contributor

    I am trying to stay away from the barcodes as i concluded they are messy to work with so i am mostly using the QR codes on the parts. LCSC, Mouser and Digikey all use QR codes.

    2D barcode scanners are reasonably cheap.

    https://www.amazon.com/wireless-2d-barcode-scanner/s?k=wireless+2d+barcode+scanner

  11. spectre-ns commented on Jun 29, 2022

    @spectre-ns

    McMaster-Carr would be an absolute game changer on the mechanical side.

  12. 8 remaining items

  13. matmair commented on Oct 24, 2022

    @matmair
    MemberAuthor

    hi there @ndbroadbent !
    This is currently on hold as I am tackling a better installing and updating experience to lower the support load on the core team.
    Ki-nTree is the way to go right now, it should enable most of what you are asking for.
    What will be supported in the end is hard to say right now; I will try to deploy a PoC first and then build upon that based on user feedback.

  14. martonmiklos commented on Nov 30, 2022

    @martonmiklos
    Contributor

    Hi folks,

    I have an idea in my mind which is slightly related to the supplier integration, just in the opposite way.

    Use case: when browsing supplier web sites it could be very useful to see the in house stock levels (if given part is stocked).

    To solve this I have envisioned creating a Grease/TamperMonkey user script would do the following:
    It would ran on the search results/product detail pages of the suppliers website and it would scrape the MFR/supplier partnumbers from the website. Then it would query the stock level from InvenTree and would inject the resutlts back to the site.

    Somehow like this:

    Before:
    kép

    After:
    kép

    It would be great if the script generation could be done from the InvenTree as the server address could be generated into it automatically together with the supplier mapping (for e.g. an userscript made for the Farnell needs to know which InvenTree company is the Farnell.)

  15. matmair commented on Nov 30, 2022

    @matmair
    MemberAuthor

    @martonmiklos seems interesting but not sure if that should really go into core. If you have a script you can provide me I might be able to create a plugin from that.

    @SchrodingersGat what do you think?

  16. SchrodingersGat commented on Nov 30, 2022

    @SchrodingersGat
    Member

    @martonmiklos that's a really interesting use-case of the API! I think this would be best suited as a third-party script / add-on, but really cool :)

  17. eeintech commented on Dec 1, 2022

    @eeintech
    Contributor

    Great idea and nice job implementing it @martonmiklos, if it is made available on all supplier's websites that'd be super awesome!

  18. added
    Seeking Funding
    on Mar 13, 2024
  19. modified the milestones: 1.0.0, horizon on Jan 27, 2025
  20. removed
    Seeking Funding
    on Mar 20, 2025
  21. matmair commented on Jul 2, 2025

    @matmair
    MemberAuthor

    Also see #9761

  22. removed
    help wanted
    roadmap
    on Feb 26, 2026
  23. matmair commented on Sep 21, 2026

    @matmair
    MemberAuthor

    This ca be done by #9761 and there are various implementions out there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplugin

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions