Generate Variants from API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeffreysgrossman
    Member
    • Jan 2025
    • 65

    Generate Variants from API

    We are trying to figure out how to integrate the products we have into EspoCRM thru the API. We have created the products as templates and have the variants defined. However, how do you actually have the system generate the Variants from the API so they can be used..

    Click image for larger version

Name:	image.png
Views:	36
Size:	85.3 KB
ID:	115769
    Is there an API call to hit this and make them all generate? If not is there a reason why not? We need a way to load all the products from our Inventory system to Espo. The only piece missing is to have the actual variants generated. There is a button that does this. That makes me think that it "should" be able to be scrpted as that is probably what the button does..

    Let us know your thoughts. Even if it has to be a workflow in Espo instead of thru the API. Ideally however when we create a new product we would like to be able to also generate all the variants as well so its complete and ready to go for the team. We are loading the inventory numbers under each product for the team as well thru the API so it really needs to have a way to do this with the API for us to have a nice solution.

    As always appreciate any info or thoughts on this..

    Thank You,​
    Attached Files
  • yuri
    Member
    • Mar 2014
    • 8795

    #2
    Everything a user can do via the UI can be done via the API as the frontend communicates with the backend via the API.

    If you open the browser console (F12) > Network tab, then, initiate the Generate Variants action via the UI, you should see the API request sent by the browser to the backend. You can replicate the same request.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

Working...