Our company is currently trying ERPNext as a new solution.
I am trying to develop a connector to sync our company’s data between Pipedrive CRM and ERPNext.
In our previous ERP (home made), Pipedrive webhooks are triggered when a new quote is created, which are handled by a PHP script, which in turn inserts data directly into the ERP’s SQL database, creating new quotes in the ERP.
From my understanding, it is not recommended to directly insert in ERPNext’s DB and we should use the API endpoints instead.
Our current workflow is :
Pipedrive webhook ==> PHP script ==> DB insert
So far I can without issue insert a new quote using the API (with postman) and read webhook data. However, I can’t find the workflow that I should use in order to consume the webhook data and insert it into ERPNext.
In other words, if I want to replicate our current workflow, where should the script be stored?
Obviously the JSON payload from Pipedrive’s webhook has to be parsed/formatted before I can insert the data into ERPNext (through a python script which would replace our current PHP script), but even after searching the documentation and forums, I can’t find where to store this “man in the middle” script.
TL;DR where should I put the code to consume webhooks and insert the JSON payload data into ERPNext?
Thanks for your help!