SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Page | 2© 2017 Mage Titans
Magento 2 ERP Integration Best Practices:
Microsoft Dynamics
Page | 3© 2017 Mage Titans
Joshua Warren
CEO, Creatuity
@JoshuaSWarren / #MageTitansUSA
Introductions
Page | 5© 2017 Mage Titans
• Family of ERP systems
• Dynamics AX
• Dynamics GP
• Dynamics NAV
• Dynamics SL
• Dynamics C5
Microsoft Dynamics
Page | 6© 2017 Mage Titans
• Manages finance, manufacturing, CRM, supply chain and inventory for
medium-sized enterprises
Microsoft Dynamics NAV
Page | 7© 2017 Mage Titans
• Needs no introduction
Magento Commerce
Page | 8© 2017 Mage Titans
• Business processes such as fulfillment and inventory management
become highly automated
• Employees don’t waste time manually entering data
• Focus on delivering unique value – not just doing the things a
computer could do
Magento Commerce + Dynamics NAV
Page | 9© 2017 Mage Titans
• Stable, scalable integration
• Simple to maintain, low cost of ownership – no one wants to spend
their budget on ERP integrations
• Easy to support – no one wants to answer tickets about an ERP
integration
Project Goals
Page | 10© 2017 Mage Titans
• Import basic product & inventory data from Dynamics (no PIM)
• Export customers and orders from Magento into Dynamics
• Import shipment data from Dynamics
• Don’t break the Dynamics-powered POS deployed in 30+ stores –
this is a real-world deployment, not a theoretical project
Business Goals
Page | 11© 2017 Mage Titans
Page | 12© 2017 Mage Titans
• Eliminate dependence on third-party encrypted ERP connectors
A Corporate Mission
Page | 13© 2017 Mage Titans
• Much of this integration was designed and written by an excellent
long-time member of our development team, Scott
A Special Thanks
Integration Architecture
Page | 15© 2017 Mage Titans
• Base module for all of our integrations
• Provides a common set of logging, reporting and UI components
• Ensures all of our integrations have a merchant-friendly admin
management page
Base Module
Page | 16© 2017 Mage Titans
• RabbitMQ, scalable messaging queue
• Magento 2 has native support for communicating with Rabbit
• Rabbit libraries for PHP, Java, .NET, Python, Javascript, Ruby & Go so
ERP developers can use the language of their choice
RabbitMQ
Page | 17© 2017 Mage Titans
• Creatuity writes the module necessary to publish and
consume Rabbit messages in Magento
• ERP integrator or client’s in-house ERP team writes the
code to publish and consume Rabbit messages for the ERP
RabbitMQ – In General
Page | 18© 2017 Mage Titans
• Creatuity also supports the client’s Microsoft Dynamics
instance, so we’re writing both ends of the connection
• Continuing to develop best practices around where to host
the ERP-specific code in this case – another Magento
module or a separate script
RabbitMQ – Microsoft Dynamics
Page | 19© 2017 Mage Titans
• Does the ERP have an existing PHP library?
• If not, what language is the ERP’s library written in?
RabbitMQ – Architecture Questions
Page | 20© 2017 Mage Titans
• Best case – ERP’s library is written in PHP, merchant is
using Magento Commerce Cloud
• Worst case – client’s ERP utilizes an antiquated language
and is hosted behind a strict firewall
RabbitMQ – Architecture Questions
Page | 21© 2017 Mage Titans
• Sometimes RabbitMQ is more than a smaller site needs
• “Cron mode” enables direct communication from Magento to Dynamics
using Magento’s cron system for scheduled tasks
• Works well in this case as we are responsible for both the Magento code
and the ERP integration code
Rabbit Alternative - Cron Mode
Page | 22© 2017 Mage Titans
• Task Layer
• Service Layer
• Data Layer
• Connection Layer
Layers
Page | 23© 2017 Mage Titans
• Product update, shipment update and order update are each tasks
• Easily add new tasks in the future
• Cron and RabbitMQ level tasks occur here
Task Layer
Page | 24© 2017 Mage Titans
• Used to perform requests to Microsoft Dynamics
• Executes and parses requests
Service Layer
Page | 25© 2017 Mage Titans
• Contains all logic related to processing both Magento and
Microsoft Dynamics data
Data Layer
Page | 26© 2017 Mage Titans
• Performs and manages the actual connection to Microsoft
Dynamics
• Encapsulates all connection logic so remaining code doesn’t
care how the connection works or if it changes
Connection Layer
Integration Implementation
Page | 28© 2017 Mage Titans
• Extract data from a source
• Process, map and transform that data
• Deliver it to the destination
Basic Concepts
Page | 29© 2017 Mage Titans
• Designed as a single Magento module
• Module is broken down into 10 main models to implement our layers
• Some of the models then break down into smaller components
Structure
Page | 30© 2017 Mage Titans
• Keeps code clean & easy to maintain
Structure
Page | 31© 2017 Mage Titans
• Manager that manages the overall data transformation process
• Extractor pulls data from source, uses a Mapper to map fields to a
standard format
• Transform class performs basic transformations
Data Layer
Page | 32© 2017 Mage Titans
• Processor class processes changes in Magento that need to
happen based on data from the ERP
• Allows us to utilize core Magento functions for making these
changes
• DI & architecture of Magento 2 makes this simple
• For instance – we use the core StockRegistryInterface API
Data Layer - Processor
Page | 33© 2017 Mage Titans
$stockItem = $this->stockRegistry->getStockItem($productData->getId());
$stockItem
->setQty($intermediateData->getQty())
->setIsInStock($intermediateData->getIsInStock());
$this->stockRegistry->updateStockItemBySku($productData->getSku(),
$stockItem);
Updating Magento Stocks from ERP
Page | 34© 2017 Mage Titans
• Microsoft Dynamics NAV can be customized – field names can
be changed
• Don’t hard-code field names
• Separate out implementation-specific code from platform-
specific code
Lessons Learned
Page | 35© 2017 Mage Titans
• 150 hours of development work and QA
• 10 hours of documentation
• Deploying this integration for future Microsoft Dynamics clients could be a
5-10 hour process
Implementation Effort
End User Experience
Page | 37© 2017 Mage Titans
• Customers on the site aren’t aware the ERP exists – which is
our goal
• Their orders are fulfilled quickly and they receive a tracking
number soon after placing their order
• If the customer experience is impacted by your ERP, there’s
room to improve that integration
Customer-Facing Experience
Page | 38© 2017 Mage Titans
• Warehouse staff fulfill orders out of Microsoft Dynamics as they always
have – no need to login to a separate system
• Customer service representatives can view up-to-date product inventory
and order status information in Magento, no need to login to Dynamics
• If a sync encounters an issue, detailed information is available in the
Magento admin panel for easy troubleshooting and resolution
Admin User Experience
Page | 39© 2017 Mage Titans
• Previous off-the-shelf connector required a developer to SSH
to the server any time the sync failed.
• Encrypted code made debugging impossible
• No stable base for feature enhancements
Developer Experience
Future Improvements
Page | 41© 2017 Mage Titans
• Refactoring code to allow other members of the Microsoft
Dynamics family to easily integrate with Magento
• Developing new adapters based on other integration methods
(i.e., CSV files)
• Expanding to connect with other ERPs as well
Adapters
Page | 42© 2017 Mage Titans
• One consistent system for all integrations, lowering
maintenance costs and time to implement
• Open source? Collaboration?
Vision
Results
Page | 44© 2017 Mage Titans
• Restocked products go live on Magento much more
quickly
• Errors importing one order no longer stops all other orders
from importing
• It just works – no longer have to think about the ERP
integration
Faster, More Reliable Syncing
Page | 45© 2017 Mage Titans
• This integration would’ve taken substantially longer if not for the
design patterns and architecture of Magento 2
• Code is cleaner, easier to maintain and more robust thanks to
following the Magento 2 architecture
Impact of Magento 2
@JoshuaSWarren / Creatuity.com
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Camunda in Action
Camunda in ActionCamunda in Action
Camunda in Action
 
Magento Meetup Mancheter with PushON: Elena Leonova
Magento Meetup Mancheter with PushON: Elena Leonova Magento Meetup Mancheter with PushON: Elena Leonova
Magento Meetup Mancheter with PushON: Elena Leonova
 
Best practices for building poweful, user friendly webforms
Best practices for building poweful, user friendly webformsBest practices for building poweful, user friendly webforms
Best practices for building poweful, user friendly webforms
 
Create a Custom Connector
Create a Custom ConnectorCreate a Custom Connector
Create a Custom Connector
 
Sage 200 cloud professional from db computer solutions
Sage 200 cloud professional from db computer solutionsSage 200 cloud professional from db computer solutions
Sage 200 cloud professional from db computer solutions
 
ISV Error Handling With Spring '21 Update
ISV Error Handling With Spring '21 UpdateISV Error Handling With Spring '21 Update
ISV Error Handling With Spring '21 Update
 
Camunda for Modern Web Applications by Corinna Cohn and Sowmya Raghunathan
Camunda for Modern Web Applications by Corinna Cohn and Sowmya RaghunathanCamunda for Modern Web Applications by Corinna Cohn and Sowmya Raghunathan
Camunda for Modern Web Applications by Corinna Cohn and Sowmya Raghunathan
 
When to Code / Config / Config + Code in Salesforce - Nikunj Doshi
When to Code / Config / Config + Code in Salesforce - Nikunj DoshiWhen to Code / Config / Config + Code in Salesforce - Nikunj Doshi
When to Code / Config / Config + Code in Salesforce - Nikunj Doshi
 
Webinar: BPMN with camunda
Webinar: BPMN with camundaWebinar: BPMN with camunda
Webinar: BPMN with camunda
 
Get the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia WorkflowGet the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia Workflow
 
Personify360 7.6.2 Sneak Peek
Personify360 7.6.2 Sneak PeekPersonify360 7.6.2 Sneak Peek
Personify360 7.6.2 Sneak Peek
 
Building applications with Bonita open source BPM
Building applications with Bonita open source BPMBuilding applications with Bonita open source BPM
Building applications with Bonita open source BPM
 
Camunda BPM 7.2: Performance and Scalability (English)
Camunda BPM 7.2: Performance and Scalability (English)Camunda BPM 7.2: Performance and Scalability (English)
Camunda BPM 7.2: Performance and Scalability (English)
 
[Webinar] Announcing the Camunda Cloud Public Beta - February 2020
[Webinar] Announcing the Camunda Cloud Public Beta - February 2020[Webinar] Announcing the Camunda Cloud Public Beta - February 2020
[Webinar] Announcing the Camunda Cloud Public Beta - February 2020
 
CamundaCon 2018: How to combine Camunda with RPA (Camunda)
CamundaCon 2018: How to combine Camunda with RPA (Camunda)CamundaCon 2018: How to combine Camunda with RPA (Camunda)
CamundaCon 2018: How to combine Camunda with RPA (Camunda)
 
Creating SOA with Oracle Fusion Middleware 11g
Creating SOA with Oracle Fusion Middleware 11gCreating SOA with Oracle Fusion Middleware 11g
Creating SOA with Oracle Fusion Middleware 11g
 
Camunda BPM at Zalando: Order Processing at scale
Camunda BPM at Zalando: Order Processing at scaleCamunda BPM at Zalando: Order Processing at scale
Camunda BPM at Zalando: Order Processing at scale
 
Overview of Oracle SOA Suite11g
Overview of Oracle SOA Suite11gOverview of Oracle SOA Suite11g
Overview of Oracle SOA Suite11g
 
Server fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil AhujaServer fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil Ahuja
 
Develop a first business process application
Develop a first business process applicationDevelop a first business process application
Develop a first business process application
 

Ähnlich wie Magento 2 ERP Integration Best Practices: Microsoft Dynamics

Ähnlich wie Magento 2 ERP Integration Best Practices: Microsoft Dynamics (20)

Eugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
Eugene Shaksuvarov - Tuning Magento 2 for Maximum PerformanceEugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
Eugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
 
Igor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best PracticesIgor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best Practices
 
CRM Integration Options–Scribe, SmartConnect, Microsoft Connector. What's the...
CRM Integration Options–Scribe, SmartConnect, Microsoft Connector. What's the...CRM Integration Options–Scribe, SmartConnect, Microsoft Connector. What's the...
CRM Integration Options–Scribe, SmartConnect, Microsoft Connector. What's the...
 
Magento 2 Best Practice MLUK17
Magento 2 Best Practice MLUK17Magento 2 Best Practice MLUK17
Magento 2 Best Practice MLUK17
 
Migration from Magento 1 to Magento 2, Why, When and How?
Migration from Magento 1 to Magento 2, Why, When and How?Migration from Magento 1 to Magento 2, Why, When and How?
Migration from Magento 1 to Magento 2, Why, When and How?
 
Mli 2017 technical first steps to building secure Magento extensions
Mli 2017 technical first steps to building secure Magento extensionsMli 2017 technical first steps to building secure Magento extensions
Mli 2017 technical first steps to building secure Magento extensions
 
A long way from Monolith to Service Isolated Architecture #MM19NL
A long way from Monolith to Service Isolated Architecture #MM19NLA long way from Monolith to Service Isolated Architecture #MM19NL
A long way from Monolith to Service Isolated Architecture #MM19NL
 
How to Manage Data Integration within Microsoft Dynamics
How to Manage Data Integration within Microsoft DynamicsHow to Manage Data Integration within Microsoft Dynamics
How to Manage Data Integration within Microsoft Dynamics
 
The long way from Monolith to Microservices
The long way from Monolith to MicroservicesThe long way from Monolith to Microservices
The long way from Monolith to Microservices
 
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
 
Testing in Magento 2
Testing in Magento 2 Testing in Magento 2
Testing in Magento 2
 
Jean-René Roy: Integrate Legacy App with Dynamic CRM
Jean-René Roy: Integrate Legacy App with Dynamic CRMJean-René Roy: Integrate Legacy App with Dynamic CRM
Jean-René Roy: Integrate Legacy App with Dynamic CRM
 
SwiftAnt EDI Services_Microsoft Gold Partner
SwiftAnt EDI Services_Microsoft Gold PartnerSwiftAnt EDI Services_Microsoft Gold Partner
SwiftAnt EDI Services_Microsoft Gold Partner
 
Monitoring your cache effectiveness in Magento 2
Monitoring your cache effectiveness in Magento 2Monitoring your cache effectiveness in Magento 2
Monitoring your cache effectiveness in Magento 2
 
MDOQ - Platform As A Service Agile Workflow Application for Magento - Launch ...
MDOQ - Platform As A Service Agile Workflow Application for Magento - Launch ...MDOQ - Platform As A Service Agile Workflow Application for Magento - Launch ...
MDOQ - Platform As A Service Agile Workflow Application for Magento - Launch ...
 
Data Migration Done Right for Microsoft Dynamics 365/CRM
Data Migration Done Right for Microsoft Dynamics 365/CRMData Migration Done Right for Microsoft Dynamics 365/CRM
Data Migration Done Right for Microsoft Dynamics 365/CRM
 
Multi Source Inventory (MSI) in Magento 2
Multi Source Inventory (MSI) in Magento 2 Multi Source Inventory (MSI) in Magento 2
Multi Source Inventory (MSI) in Magento 2
 
CIMtrek migrator to share point user guide
CIMtrek migrator to share point user guideCIMtrek migrator to share point user guide
CIMtrek migrator to share point user guide
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019
 
Expert guidance on migrating from magento 1 to magento 2
Expert guidance on migrating from magento 1 to magento 2Expert guidance on migrating from magento 1 to magento 2
Expert guidance on migrating from magento 1 to magento 2
 

Mehr von Joshua Warren

Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
Joshua Warren
 

Mehr von Joshua Warren (20)

Enhancing the Customer Experience with Chatbots
Enhancing the Customer Experience with ChatbotsEnhancing the Customer Experience with Chatbots
Enhancing the Customer Experience with Chatbots
 
Transforming the Customer Experience Across 100 Stores with Magento
Transforming the Customer Experience Across 100 Stores with MagentoTransforming the Customer Experience Across 100 Stores with Magento
Transforming the Customer Experience Across 100 Stores with Magento
 
Its Just Commerce - IRCE 2018
Its Just Commerce - IRCE 2018Its Just Commerce - IRCE 2018
Its Just Commerce - IRCE 2018
 
Rural King Case Study from the Omnichannel Retail Summit
Rural King Case Study from the Omnichannel Retail SummitRural King Case Study from the Omnichannel Retail Summit
Rural King Case Study from the Omnichannel Retail Summit
 
Avoiding Commerce Extinction: Lessons from Retail Dinosaurs
Avoiding Commerce Extinction: Lessons from Retail DinosaursAvoiding Commerce Extinction: Lessons from Retail Dinosaurs
Avoiding Commerce Extinction: Lessons from Retail Dinosaurs
 
Building a Global B2B Empire: Using Magento to Power International Expansion
Building a Global B2B Empire: Using Magento to Power International ExpansionBuilding a Global B2B Empire: Using Magento to Power International Expansion
Building a Global B2B Empire: Using Magento to Power International Expansion
 
Magento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second CountsMagento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second Counts
 
Magento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersMagento 2 Development for PHP Developers
Magento 2 Development for PHP Developers
 
Pay No Attention to the Project Manager Behind the Curtain: A Magento 2 Tell-All
Pay No Attention to the Project Manager Behind the Curtain: A Magento 2 Tell-AllPay No Attention to the Project Manager Behind the Curtain: A Magento 2 Tell-All
Pay No Attention to the Project Manager Behind the Curtain: A Magento 2 Tell-All
 
Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016
Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016
Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016
 
How I Learned to Stop Worrying and Love Composer - php[world] 2015
How I Learned to Stop Worrying and Love Composer - php[world] 2015How I Learned to Stop Worrying and Love Composer - php[world] 2015
How I Learned to Stop Worrying and Love Composer - php[world] 2015
 
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
 
Work Life Balance for Passionate Developers - Full Stack Toronto 2015 Edition
Work Life Balance for Passionate Developers - Full Stack Toronto 2015 EditionWork Life Balance for Passionate Developers - Full Stack Toronto 2015 Edition
Work Life Balance for Passionate Developers - Full Stack Toronto 2015 Edition
 
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015
 
pnwphp - PHPSpec & Behat: Two Testing Tools That Write Code For You
pnwphp - PHPSpec & Behat: Two Testing Tools That Write Code For Youpnwphp - PHPSpec & Behat: Two Testing Tools That Write Code For You
pnwphp - PHPSpec & Behat: Two Testing Tools That Write Code For You
 
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
 
PHPSpec & Behat: Two Testing Tools That Write Code For You (#phptek edition)
PHPSpec & Behat: Two Testing Tools That Write Code For You (#phptek edition)PHPSpec & Behat: Two Testing Tools That Write Code For You (#phptek edition)
PHPSpec & Behat: Two Testing Tools That Write Code For You (#phptek edition)
 
Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
 
Get Out of the Back Row! A Community Involvement Primer - #OpenWest
Get Out of the Back Row! A Community Involvement Primer - #OpenWestGet Out of the Back Row! A Community Involvement Primer - #OpenWest
Get Out of the Back Row! A Community Involvement Primer - #OpenWest
 
Work-Life Balance For Passionate Geeks - #OpenWest
Work-Life Balance For Passionate Geeks - #OpenWestWork-Life Balance For Passionate Geeks - #OpenWest
Work-Life Balance For Passionate Geeks - #OpenWest
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

Magento 2 ERP Integration Best Practices: Microsoft Dynamics

  • 1.
  • 2. Page | 2© 2017 Mage Titans Magento 2 ERP Integration Best Practices: Microsoft Dynamics
  • 3. Page | 3© 2017 Mage Titans Joshua Warren CEO, Creatuity @JoshuaSWarren / #MageTitansUSA
  • 5. Page | 5© 2017 Mage Titans • Family of ERP systems • Dynamics AX • Dynamics GP • Dynamics NAV • Dynamics SL • Dynamics C5 Microsoft Dynamics
  • 6. Page | 6© 2017 Mage Titans • Manages finance, manufacturing, CRM, supply chain and inventory for medium-sized enterprises Microsoft Dynamics NAV
  • 7. Page | 7© 2017 Mage Titans • Needs no introduction Magento Commerce
  • 8. Page | 8© 2017 Mage Titans • Business processes such as fulfillment and inventory management become highly automated • Employees don’t waste time manually entering data • Focus on delivering unique value – not just doing the things a computer could do Magento Commerce + Dynamics NAV
  • 9. Page | 9© 2017 Mage Titans • Stable, scalable integration • Simple to maintain, low cost of ownership – no one wants to spend their budget on ERP integrations • Easy to support – no one wants to answer tickets about an ERP integration Project Goals
  • 10. Page | 10© 2017 Mage Titans • Import basic product & inventory data from Dynamics (no PIM) • Export customers and orders from Magento into Dynamics • Import shipment data from Dynamics • Don’t break the Dynamics-powered POS deployed in 30+ stores – this is a real-world deployment, not a theoretical project Business Goals
  • 11. Page | 11© 2017 Mage Titans
  • 12. Page | 12© 2017 Mage Titans • Eliminate dependence on third-party encrypted ERP connectors A Corporate Mission
  • 13. Page | 13© 2017 Mage Titans • Much of this integration was designed and written by an excellent long-time member of our development team, Scott A Special Thanks
  • 15. Page | 15© 2017 Mage Titans • Base module for all of our integrations • Provides a common set of logging, reporting and UI components • Ensures all of our integrations have a merchant-friendly admin management page Base Module
  • 16. Page | 16© 2017 Mage Titans • RabbitMQ, scalable messaging queue • Magento 2 has native support for communicating with Rabbit • Rabbit libraries for PHP, Java, .NET, Python, Javascript, Ruby & Go so ERP developers can use the language of their choice RabbitMQ
  • 17. Page | 17© 2017 Mage Titans • Creatuity writes the module necessary to publish and consume Rabbit messages in Magento • ERP integrator or client’s in-house ERP team writes the code to publish and consume Rabbit messages for the ERP RabbitMQ – In General
  • 18. Page | 18© 2017 Mage Titans • Creatuity also supports the client’s Microsoft Dynamics instance, so we’re writing both ends of the connection • Continuing to develop best practices around where to host the ERP-specific code in this case – another Magento module or a separate script RabbitMQ – Microsoft Dynamics
  • 19. Page | 19© 2017 Mage Titans • Does the ERP have an existing PHP library? • If not, what language is the ERP’s library written in? RabbitMQ – Architecture Questions
  • 20. Page | 20© 2017 Mage Titans • Best case – ERP’s library is written in PHP, merchant is using Magento Commerce Cloud • Worst case – client’s ERP utilizes an antiquated language and is hosted behind a strict firewall RabbitMQ – Architecture Questions
  • 21. Page | 21© 2017 Mage Titans • Sometimes RabbitMQ is more than a smaller site needs • “Cron mode” enables direct communication from Magento to Dynamics using Magento’s cron system for scheduled tasks • Works well in this case as we are responsible for both the Magento code and the ERP integration code Rabbit Alternative - Cron Mode
  • 22. Page | 22© 2017 Mage Titans • Task Layer • Service Layer • Data Layer • Connection Layer Layers
  • 23. Page | 23© 2017 Mage Titans • Product update, shipment update and order update are each tasks • Easily add new tasks in the future • Cron and RabbitMQ level tasks occur here Task Layer
  • 24. Page | 24© 2017 Mage Titans • Used to perform requests to Microsoft Dynamics • Executes and parses requests Service Layer
  • 25. Page | 25© 2017 Mage Titans • Contains all logic related to processing both Magento and Microsoft Dynamics data Data Layer
  • 26. Page | 26© 2017 Mage Titans • Performs and manages the actual connection to Microsoft Dynamics • Encapsulates all connection logic so remaining code doesn’t care how the connection works or if it changes Connection Layer
  • 28. Page | 28© 2017 Mage Titans • Extract data from a source • Process, map and transform that data • Deliver it to the destination Basic Concepts
  • 29. Page | 29© 2017 Mage Titans • Designed as a single Magento module • Module is broken down into 10 main models to implement our layers • Some of the models then break down into smaller components Structure
  • 30. Page | 30© 2017 Mage Titans • Keeps code clean & easy to maintain Structure
  • 31. Page | 31© 2017 Mage Titans • Manager that manages the overall data transformation process • Extractor pulls data from source, uses a Mapper to map fields to a standard format • Transform class performs basic transformations Data Layer
  • 32. Page | 32© 2017 Mage Titans • Processor class processes changes in Magento that need to happen based on data from the ERP • Allows us to utilize core Magento functions for making these changes • DI & architecture of Magento 2 makes this simple • For instance – we use the core StockRegistryInterface API Data Layer - Processor
  • 33. Page | 33© 2017 Mage Titans $stockItem = $this->stockRegistry->getStockItem($productData->getId()); $stockItem ->setQty($intermediateData->getQty()) ->setIsInStock($intermediateData->getIsInStock()); $this->stockRegistry->updateStockItemBySku($productData->getSku(), $stockItem); Updating Magento Stocks from ERP
  • 34. Page | 34© 2017 Mage Titans • Microsoft Dynamics NAV can be customized – field names can be changed • Don’t hard-code field names • Separate out implementation-specific code from platform- specific code Lessons Learned
  • 35. Page | 35© 2017 Mage Titans • 150 hours of development work and QA • 10 hours of documentation • Deploying this integration for future Microsoft Dynamics clients could be a 5-10 hour process Implementation Effort
  • 37. Page | 37© 2017 Mage Titans • Customers on the site aren’t aware the ERP exists – which is our goal • Their orders are fulfilled quickly and they receive a tracking number soon after placing their order • If the customer experience is impacted by your ERP, there’s room to improve that integration Customer-Facing Experience
  • 38. Page | 38© 2017 Mage Titans • Warehouse staff fulfill orders out of Microsoft Dynamics as they always have – no need to login to a separate system • Customer service representatives can view up-to-date product inventory and order status information in Magento, no need to login to Dynamics • If a sync encounters an issue, detailed information is available in the Magento admin panel for easy troubleshooting and resolution Admin User Experience
  • 39. Page | 39© 2017 Mage Titans • Previous off-the-shelf connector required a developer to SSH to the server any time the sync failed. • Encrypted code made debugging impossible • No stable base for feature enhancements Developer Experience
  • 41. Page | 41© 2017 Mage Titans • Refactoring code to allow other members of the Microsoft Dynamics family to easily integrate with Magento • Developing new adapters based on other integration methods (i.e., CSV files) • Expanding to connect with other ERPs as well Adapters
  • 42. Page | 42© 2017 Mage Titans • One consistent system for all integrations, lowering maintenance costs and time to implement • Open source? Collaboration? Vision
  • 44. Page | 44© 2017 Mage Titans • Restocked products go live on Magento much more quickly • Errors importing one order no longer stops all other orders from importing • It just works – no longer have to think about the ERP integration Faster, More Reliable Syncing
  • 45. Page | 45© 2017 Mage Titans • This integration would’ve taken substantially longer if not for the design patterns and architecture of Magento 2 • Code is cleaner, easier to maintain and more robust thanks to following the Magento 2 architecture Impact of Magento 2