Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Magento 2 Integrations: ERPs, APIs, Webhooks & ...

Joshua Warren
September 09, 2016

Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016

Magento has long been the core system connecting and integrating various business systems. With Magento 2, we have even more tools at our disposal for these integrations – APIs, webhooks & RabbitMQ are all available to us. In this talk, we’ll cover how to determine which integration method to use for your project and work through a sample ERP integration utilizing Magento 2 Enterprise.

MageTitans USA 2016 edition.

Joshua Warren

September 09, 2016
Tweet

More Decks by Joshua Warren

Other Decks in Technology

Transcript

  1. @JoshuaSWarren #MageTitansUSA About Me • PHP-Based Ecommerce Developer Since 1999

    • Magento Developer Since 2008; Magento 2 Developer Since 2014 • Magento Master • Founder & CEO of Creatuity Corp, Magento Enterprise Solution Partner
  2. @JoshuaSWarren #MageTitansUSA Queue is a place where messages are held

    until a consumer connects and retrieves them.
  3. @JoshuaSWarren #MageTitansUSA When an order is placed, an event is

    fired and an observer handles sending the order data to the ERP
  4. @JoshuaSWarren #MageTitansUSA Topics • ‘creatuity.sent.oms’ is the topic • RabbitMQ

    can be configured to use topics to route messages to specific queues • Wildcard routing is possible - i.e., ‘creatuity.*’ would match all topics that start with ‘creatuity.’ • Topics allow the consumers connected to RabbitMQ to easily grab only the messages they need to process
  5. @JoshuaSWarren #MageTitansUSA Messages • Can be an object, can be

    a string - can be anything you’d like • Allows the application on either end of the integration to use their native format • Keep it simple
  6. @JoshuaSWarren #MageTitansUSA <config xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd"> <topic name="creatuity.sent.oms" request="Magento\Sales\Api\Data\OrderInterface"> <handler name="creatuityoms.sent.oms.handler" type="Creatuity\Oms\Model\Oms"

    method="saveOmsNum" /> </topic> <topic name="creatuity.sent.magento" request="Magento\Sales\Api\Data\OrderInterface" > <handler name="creatuityoms.sent.magento.handler" type="Creatuity\Oms\Model\Oms" method="saveOmsNum" /> </topic> </config>
  7. @JoshuaSWarren #MageTitansUSA Advantages of RabbitMQ • RabbitMQ can route messages

    to specific queues for you • Decouples your code from the API on the other side of the integration • There is a RabbitMQ client for every major language • Magento developers write Magento code, ERP developers write ERP code