Alletec Logo
  • Solutions & Services
    • AI Business Applications
    • Enterprise Data Services
    • AI & Intelligent Solutions
    • Azure Infrastructure & Platform Services
    • Security Solutions
    • Services
    • Partner Services
    • Modern Work & Digital Productivity
    Microsoft Dynamics 365Microsoft Dynamics 365Power PlatformPower Platform
    • BusinessCentralBusiness Central
    • SalesSales
    • FinanceFinance
    • Customer InsightsCustomer Insights | Marketing
    • Supply Chain ManagementSupply Chain Management
    • Customer ServiceCustomer Service
    • Project OperationsProject Operations
    • Field ServiceField Service
    • Human ResourcesHuman Resources
    • Contact CenterContact Center
    • Power BIPower BI
    • Power AppsPower Apps
    • Power AutomatePower Automate
    • Power PagesPower Pages
    Microsoft AzureData Engineering & Modern Data Platforms
     
    • Modern Data PlatformsModern Data Platforms
    • Data EngineeringData Engineering
    • Microsoft FabricMicrosoft Fabric
    • Data Governance & QualityData Governance & Quality
    • Analytics & InsightsAnalytics & Insights
      AI & Intelligent SolutionsAI & Intelligent Solutions
       
      • AI Agents & CopilotsAI Agents & Copilots
      • Unified Intelligence FrameworkUnified Intelligence Framework
      • Applications ModernizationApplications Modernization
      • Applied AI Use CasesApplied AI Use Cases
      • RPARobotic Process Automation (RPA)
        • Power BIPower BI
        • Power AppsPower Apps
        • Power AutomatePower Automate
        • Power PagesPower Pages
        Microsoft AzureAzure Infrastructure & Platform Services
        • Cloud Architecture & Landing ZonesCloud Architecture & Landing Zones
        • Resilience, Backup & Disaster RecoveryResilience, Backup & Disaster Recovery
        • Azure InfrastructureAzure Infrastructure (IaaS)
        • Azure Platform ServicesAzure Platform Services (PaaS)
        • Hybrid & Multi-Cloud EnablementHybrid & Multi-Cloud Enablement
        • Cloud Operations & FinOpsCloud Operations & FinOps
        • Security & GovernanceSecurity & Governance
        • Managed ServicesAzure Managed Services
        • Modern Data PlatformsModern Data Platforms
        • Data EngineeringData Engineering
        • Microsoft FabricMicrosoft Fabric
        • Data Governance & QualityData Governance & Quality
        • Analytics & InsightsAnalytics & Insights
        • AI Agents & CopilotsAI Agents & Copilots
        • Unified Intelligence FrameworkUnified Intelligence Framework
        • Applications ModernizationApplications Modernization
        • Applied AI Use CasesApplied AI Use Cases
        • RPARobotic Process Automation (RPA)
        • Cloud Architecture & Landing ZonesCloud Architecture & Landing Zones
        • Resilience, Backup & Disaster RecoveryResilience, Backup & Disaster Recovery
        • Azure InfrastructureAzure Infrastructure (IaaS)
        • Azure Platform ServicesAzure Platform Services (PaaS)
        • Hybrid & Multi-Cloud EnablementHybrid & Multi-Cloud Enablement
        • Cloud Operations & FinOpsCloud Operations & FinOps
        • Security & GovernanceSecurity & Governance
        • Managed ServicesAzure Managed Services
          • Data EngineeringData Engineering
          • Microsoft FabricData Fabric
          • AI Powered SolutionsAI-Powered Solutions
          • RPARobotic Process Automation (RPA)
          • AIMAIM Modernization Center
          • NAVD365 Business Central | NAV
          • Upgrade Nav to BCUpgrade NAV to D365 Business Central
          • Customer EngagementD365 Customer Engagement Services
          • GP to BCGP To D365 BC Migration
          • SharePointSharePoint Solutions
          • Data EngineeringData Engineering
          • Microsoft FabricMicrosoft Fabric
          • RPARobotic Process Automation (RPA)
          • AI PoweredAI-Powered Solutions
          • AIM Modernization CenterAIM Modernization Center
          • MasterVARMasterVAR
          Security SolutionsSecurity Solutions
           
          • Cyber Threat DefenseCyber Threat Defense
          • Protect Business DataProtect Business Data
          • Manage DevicesDevice Management
          • Secure Remote AccessSecure Remote Access
          • Keep Employees ConnectedKeep Employees Connected
            Modern Work & Digital ProductivityModern Work & Digital Productivity
             
            • Teams & CollaborationTeams & Collaboration
            • SharePoint & Knowledge ManagementSharePoint & Knowledge Management
            • Microsoft 365 CopilotMicrosoft 365 Copilot
            • Secure remote & hybrid workSecure remote & hybrid work
            • Industries
              • Professional Services
              • Manufacturing
              • Education
              • Trade & Distribution
              • Financial Services
              • Retail & Digital Commerce
              • Travel
              • Food & Beverages
                • Bakery
                • Beverages
                • Confectionary
                • Dairy
                • Fresh Produce
                • Frozen & Packaged Food
                • Meat & Poultry
                • Sauces & Dressings
                • Snacks
                • Spices
            • Products
              • Industry Solutions
              • Dynamics 365 Accelerators
              • Travel 365Travel 365
              • EdTech 365EdTech 365
              • Smart-CXSmart-CX
              • BAFINSBAFINS
              • EPC 365EPC 365
              • XtendedWMSXtendedWMS
              • socialRelaySocialRelay
              • ProActivateProActivate
              • CyborgCyborg
              • P2P 365P2P 365
            • Resources
              • Alletec Blog
              • Videos
              • Case Studies
              • Brochures
              • eBooks & Infographics
            • Alletec
              • Company Profile
              • Board of Directors
              • Investor Relations
              • Life @ Alletec
              • Careers
              • Contact Us
            Great Place to work Alletec
            Blog

            Dynamics AX integration with a PHP application using JSON

            AlletecAlletec

            At this time, the majority of developers and solution architects are very well aware of the MS Dynamics AX capabilities to support different integration paths with third-party applications. Based upon different requirements one can choose integration paths like file-based, http based, etc. However, sometimes there are peculiar requirements from customers where none of the standard integration paths can be used and at such times, we have to think ‘outside the usual’ and come out with a workable solution for the same. There can be various reasons for this – like customer already has an established php front end for its customers/vendors/employees and wants to use & integrate it with AX with minimal changes to the existing system. One such option is to integrate (http adapter) with php application using JSON.

            Solution approach:

            JSON integration is not supported in AX, so we have to do customizations for the same. Again, we have many options like either we write a code to accept JSON based values and serialize it to xml or dataset and use the records OR develop a utility bundled in dll, which will do the transformation for you. In this blog, we will discuss the later approach.

            Method:

            We will create an integration port in AX to accept the data and store it in the staging tables. Secondly, we will create mid-tier .net utility as a web service, which will accept JSON values from the third party, serialize it and send that converted data to AX by calling AX web service.

            1. Creating integration port in AX: One can either use document-based integration using a wizard or write custom data contract & service class to create an inbound port in AX. This service will accept the data and store it in staging tables so that other functionalities can use the data for various postings.
            2. Creating .net web service (mid-tier): One can create a simple web service in asp.net using C#. In this service, one will add a reference to the AX web service we created in point (1) above. In addition, one needs to use third-party dll for serializing the received JSON values to AX SOAP xml format. Hosting this service and sharing the service url with third-party dev so that they can consume it and send across the JSON data.

            Error handling:

            This is a very important aspect in this whole process. If we do not have proper error handling in place then be prepared to spend hours in identifying the issue and long delay in fixing the same. We will break the error handling points as below:

            1. JSON formatting error: Most of the dll that you are going to use for serialization itself will handle this. So make sure this code is inside ‘try-catch block’. In addition, there needs to be a mechanism in place to communicate the ‘error to caller’ based on specific requirements.
            2. Data error: Best would be to get this handled at AX level. In AX, we already have ‘service and contract’ objects where you can have a validation in place, which checks the incoming data. Also, we need to make sure that the error raised by AX propagates to the caller via .net utility web service.

            Once everything is in place the integration is ready for testing, and thereafter for production. It goes without saying that to solve one problem there are numerous solutions, but one has to pick a solution, which seems feasible depending upon the requirements.

            To learn more about Microsoft Dynamics 365, connect with Alletec experts.

            Let's Build Smarter, Agile, and Scalable Solutions Together
            Talk to An Expert
            Talk to An Expert Alletec
            Mar 20, 2018 2304 Views

            Recent Posts

            Dynamics 365 Project Operations for Professional Services: 5 Ways to Simplify Project Expense Management

            Jan 27, 2026

            Dynamics 365 Project Operations for Professional Services: 5 Ways to Simplify Project Expense Management
            Read Full Blog    
            Decoding Microsoft’s New IQ Layer: Work IQ, Fabric IQ, and Foundry IQ Explained

            Jan 13, 2026

            Decoding Microsoft’s New IQ Layer: Work IQ, Fabric IQ, and Foundry IQ Explained
            Read Full Blog    
            5 Cybersecurity Mistakes Your Business Cannot Afford in 2026

            Jan 9, 2026

            5 Cybersecurity Mistakes Your Business Cannot Afford in 2026
            Read Full Blog    

            Alletec blends deep Microsoft solutions expertise with industry knowledge and 25+ years of experience to catalyse digital transformation and amplify business outcomes for enterprises.

            FOLLOW US
            LATEST NEWS
            • Alletec recognized as 2025/26 Inner Circle Winner for Microsoft AI Business Solutions
            • From Copilot to Sustainability: Alletec to Lead Expert Discussions at Directions ASIA 2025
            • Alletec Strengthens North American Footprint with Major Microsoft Dynamics 365 Contact Center Win
            • Alletec Expands to the Middle East with a Subsidiary in Dubai
            • Alletec Named a Great Place to Work® for the Third Consecutive Year
            CONTACT US
            • India: A-1, Sector - 58 Noida - 201 301, India +91 120 3000 300

            • USA: 5605 North MacArthur Blvd., Ste 1000, Irving, Texas 75038 +1 469 767 9753

            • Kenya: The Westwood Vale Close Off Ring Road Westland +254 725 074 589

            • Canada: 181 Bay Street, #1800, Toronto, Ontario, M5J 2T9 +1 289 763 5998

            • United Arab Emirates: IFZA Business Park, DDP, PO Box 342001, Dubai +971 58 248 0169

            • info@alletec.com
            Quick Links
            • eBooks
            • Blogs
            • Case Studies
            • Brochures
            • Life At Alletec
            • Company Profile
            • Partner Program
            • Privacy Policy

            @ 2026 Alletec. All rights reserved.

            Chatbot IconAsk me anything