I am using ERPNext which has a JSON API and Prestashop. As an example, I want to save transactions and so forth TO ERPNext FROM Prestashop when a client makes a purchase on Prestashop.
In essence, I would like to create a "Logic Hook" that gets triggered on the Prestashop side when a CRUD action occurs.
Examples:
1) A new user registers on Prestashop: The user is created as a client on ERPNext.
2) A client places an order on Prestashop: An order is created in ERPNext.
3) A contact is made on Prestashop: A ticket is created in ERPNext.
Where would I place the custom code (in Prestashop) for doing so, and how would it get fired?
I do not necessarily want to create new modules in Prestashop, just hook into or extend current functionality.
I know that I can access Prestashop's API / Webservice, but ideally, I would like to push transactions from Prestashop to the ERP, not the other way around.
Any help would be greatly appreciated.
It would be great if someone could point me in the right direction.