[n8n] - Shopify Orders to D365 Business Central Sales Orders / Sales Invoices

For Shopify, this automated workflow efficiently transfers new orders to D365 Business Central as either Sales Orders or Sales Invoices, ensuring timely processing of paid orders within a 24-hour window. It eliminates duplication by checking existing records and integrates customer data seamlessly, enhancing order management and reducing manual entry errors. The solution is designed to streamline operations, saving time and improving accuracy in financial tracking.

7/8/2025
39 nodes
Complex
2rjghx5rhcjdxr52opc1ylqytimmr498schedulecomplexsticky noteshopifyschedule triggersplitinbatchesnoopsplitoutfilterautomationadvancedapiintegrationlogicconditionalcron
Categories:
Schedule TriggeredComplex WorkflowE-commerce & Retail
Integrations:
Sticky NoteShopifySchedule TriggerSplitInBatchesNoOpSplitOutFilter

Target Audience

  • E-commerce Managers: Streamline order processing from Shopify to Business Central.
    - Operations Teams: Automate the integration of sales orders and invoices, reducing manual entry.
    - Developers: Customize the workflow for specific business needs.
    - Business Analysts: Monitor and analyze sales data across platforms effectively.
  • Problem Solved

    This workflow automates the integration of Shopify orders into D365 Business Central as either Sales Orders or Sales Invoices. It eliminates the need for manual data entry, reducing errors and saving time. This is particularly beneficial for businesses with high order volumes, ensuring that all orders are processed efficiently and accurately.

    Workflow Steps

  • Schedule Trigger: Initiates the workflow at defined intervals.
    - Get Shopify Orders: Fetches orders created or updated in the last 24 hours.
    - Filter Paid Orders: Only processes orders that have been paid.
    - Loop Over Items: Iterates through each order to perform actions.
    - Check Customer Existence: Looks up existing customers in Business Central to avoid duplication.
    - Create New Customer: If the customer does not exist, it creates a new record.
    - Select Fields: Prepares the necessary fields for the order or invoice.
    - Preprocess Order: Maps line items to their assigned locations and adjusts for taxes and discounts.
    - Create Sales Order/Invoice: Depending on the order type (POS or Web), it creates a corresponding Sales Order or Sales Invoice in Business Central.
    - Create Order/Invoice Lines: Adds line items to the created Sales Order or Invoice.
    - Error Handling: Deletes the order or invoice if any errors occur during line item creation.
    - End Workflow: Completes the workflow, ensuring all processes are finalized.
  • Customization Guide

  • Edit Environment Settings: Update the tenantId, environmentName, and companyId in the D365 BC Environment Settings node.
    - Adjust Shopify Connection: Modify the Shopify node to connect with your Shopify account.
    - Set Filters: Customize the Shopify Order Filter node to include or exclude specific order criteria.
    - Modify Mapping: Update the Sales Order Mapping and Sales Invoice Mapping nodes to include additional fields as needed.
    - Change Schedule Trigger: Adjust the frequency of the Schedule Trigger to suit your operational needs.