Setting Up Dual Invoice Series in Business Central for Native and Shopify Sales

In this quick post, we aim to share a practical tip for businesses leveraging Microsoft Dynamics 365 Business Central alongside Shopify. Handling sales from multiple channels can often complicate sales documentation. Our focus is on a simple yet effective method to create two distinct series for sales invoices – one for native sales and another for sales originating from Shopify. This approach not only simplifies management but also improves the clarity and tracking of transactions across different platforms.

Table of Contents

Scenario

In this section, we’ll walk you through a real-life scenario demonstrating the ease of setting up and using dual invoice series for Shopify and native sales within Microsoft Dynamics 365 Business Central. This straightforward process ensures that sales orders from different channels are easily identifiable, aiding in streamlined sales management and reporting.

Step-by-Step Guide

  1. Create a New Number Series:
    • Navigate to the “No. Series” section within Business Central.
    • Create a new series named S-ORD-2.
    • Define the series with a new format, in this case, SHPFY00001, to be used specifically for Shopify orders.

2. Configure Sales & Receivables Setup:

  • Go to “Sales & Receivables Setup”.
  • Locate the newly added field “Shopify Order Nos.”.
  • Select the series S-ORD-2 for Shopify orders, linking this number series to all future Shopify-generated sales orders.

3. Create a Sales Order from Shopify Orders:

  • Proceed to the “Shopify Orders” page.
  • Initiate the creation of a sales order. This action triggers the use of the S-ORD-2 series, applying the predefined format to the new order.

4. Verify the Sales Order or Invoice Number:

  • After creating the sales order, check the “Sales Order No” or “Sales Invoice No” field.
  • Notice that the new order adheres to the SHPFY00001 format, confirming the successful separation of Shopify-generated sales within your Business Central setup.

Code

In the “Code” section, we detail a tailored setup for Business Central, featuring a codeunit for auto-assigning number series to Shopify orders, a tableextension adding a “Shopify Order Nos.” field, and a pageextension making this field accessible. These modifications streamline sales order processing for Shopify transactions.

TableExt

The tableextension 50100 "Sales & Receivables Setup" enhances Business Central’s “Sales & Receivables Setup” by adding a “Shopify Order Nos.” field. This allows for the setup of a unique number series for Shopify sales, facilitating clearer tracking and management of e-commerce transactions directly within Business Central’s framework.

PageExt

The pageextension 50100 "Sales & Receivables Setup" modifies the “Sales & Receivables Setup” page in Business Central to display the “Shopify Order Nos.” field. Positioned conveniently after the “Order Nos.” field, it ensures visibility and accessibility for users needing to configure or reference the unique number series designated for Shopify sales, thus streamlining the management of e-commerce transactions within the platform.

Codeunits

This codeunit 50100 "Shoppify Events" for Microsoft Dynamics 365 Business Central streamlines the assignment of unique number series to Shopify-generated sales orders. By hooking into the OnBeforeCreateSalesHeader event, it ensures Shopify orders are distinguished by a specific number series set in “Sales & Receivables Setup”. This enhances clarity in sales management and reporting, allowing for efficient multi-channel sales data handling and improved operational accuracy within Business Central.

Conclusion

Concluding our swift dive into enhancing Microsoft Dynamics 365 Business Central for businesses leveraging Shopify, we’ve walked through a streamlined approach to segregate and manage sales invoices from different channels efficiently. This micro post was designed to deliver quick, actionable insights for a common but crucial integration need, providing you with the necessary code snippets to differentiate Shopify sales orders within Business Central.

For those looking to explore this solution further or to customize it to fit more specific business needs, the complete code is available on GitHub. Visit Complete Code on GitHub for a deep dive into the implementation details. Additionally, for extended functionalities or modifications in the Shopify to Business Central integration processes, the Shopify repository offers a wealth of resources. Check out Shopify Integration Repository for more information and support.

This express guide aims to empower your business with the knowledge and tools to enhance operational efficiency and sales tracking between Business Central and Shopify. We hope this serves as a valuable resource, aiding in your continuous pursuit of business excellence.

Leave a Reply

Your email address will not be published. Required fields are marked *