0

I would like to know if Magento 1.x has any kind of webhook capability, or if there is an extension available (preferably that someone here has experience with) that does the job.

I'm trying to make an integration with an accounting system. I need to get order and customer information out.

Unfortunately the only way I can do this (that I've found) is through polling the API endpoints every so often. I need more accuracy - I need Magento to tell my external integration there is something new, rather than my integration asking Magento every 15 minutes if there's something new.

  • Does the API endpoint support webhooks? Also what new stuff are you talking about orders, customers, users, products? – André Ferraz Jan 2 '18 at 13:54
  • For my purposes, just new or updated customers, and new orders. I am asking, I suppose, if there are any known extensions for Magento that can provide the functionality, as I'm almost certain now that it can't do this OOB. – Turpachull Jan 2 '18 at 14:19
2

Not sure if there are any extension out there that would meet your requirements, however instead of using a cron task like you're doing. You can take advantage of the observable events in Magento to communicate with your other integration.

You could use these events for new orders:

sales_order_place_after

or and

checkout_onepage_controller_success_action

And here is the event you could use for new customers, you might have to create your own custom event to also detect admin creation of customers etc.

customer_register_success

You will need to create new observers to detect those events.

EDIT:

Like @Nidheesh said in the comment, you will need to implement a queue logic so this doesn't slow down the execution of the site. Here is an example of a queue system for M2, but you can always make it in M1.

  • 1
    Try to avoid magento events using for webhooks as it will slowdown the execution by waiting for the call to complete. Implement a queue which can be processed via a cron job for better performance if you are on a high traffic website – Nidheesh Jan 3 '18 at 10:42
  • @Nidheesh you are correct. I'll unfortunately M1 EE doesn't have queues like M2 EE. – André Ferraz Jan 3 '18 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.