Export posted sales invoices to Shopify

Important

Some of the functionality described in this release plan has not been released. Delivery timelines may change and projected functionality may not be released (see Microsoft policy). Learn more: What's new and planned

Enabled for Public preview General availability
Users, automatically - Oct 2024

Business value

Buyers can sign in to Shopify and access all their invoices, regardless of whether the invoices were created in Shopify or in Business Central.

Feature details

You can export posted sales invoices to Shopify as orders by using a new report (batch job). The report is available on the Shopify Shop Card page, or you can use Tell Me search to find it. You can also run the report by using the job queue.

To enable the capability for a specific shop, go to the Shopify Shop Card page and turn on the ** Posted Invoice Sync** toggle.

The sync includes invoices under the following conditions:

  • The Shopify Order ID field contains 0.
  • The bill-to customer has a mapping in the Shopify Customers or Shopify Companies tables.
  • The bill-to customer isn't used as the Default Customer on the Shopify Shop Card or Shopify Customer Template.
  • The posted invoice has at least one non-comment line where the No. field has a value.

When you run the report, the following happens in Business Central and Shopify.

Business Central

Update the Shopify Order ID field based on results of sync:

  • Successful export – update Shopify Order Id field with ID of order in Shopify.
  • Export failed – set "-1"
  • Invoice is excluded from sync for a reason listed in the conditions mentioned earlier – set "-2"

The same pattern is used in the Posted Sales Shipment, where the Update Document page lets you replace "-1" and "-2" or "0" to retry the export.

Shopify

The connector uses GraphQL to first create a draft order with header and item lines, and then complete the draft order and convert it to an order.

Headers and lines

The following fields are exported on the order header:

  • The mapped bill-to customer/company is used.
  • The Fulfilment Status field shows Fulfilled. Tracking Details don't synchronize.
  • The Paid Status field shows Paid or Partially Paid, based on the customer ledger entry linked to the sales invoice. For partially paid, it shows the Remaining Amount field.

The following fields are exported on the order lines:

  • Items (item variants) that are mapped export as products.
  • Items that aren't mapped and lines of other types, such as G/L Account or Item Charge lines, export as custom products in Shopify.
  • Shipping charges in Shopify aren't created. The shipping cost is registered as a custom product in Shopify.
  • The new setting on the Shopify Shop Card page lets you avoid exporting invoices with non-mapped items. Turn on the Items must be mapped to Products toggle to exclude posted invoices from sync if there's at least one line of type Item where the selected item isn't mapped to a product or variant in Shopify.
  • Tax amounts. Because the Graph API doesn't currently support the TaxLine object, the calculated tax is added as a custom product. Tax information from Business Central won’t be available in the tax report in Shopify Admin. To avoid Shopify recalculating taxes, orders are marked as Tax Exempt.
  • Quantity, in whole numbers. Shopify doesn’t support fractions.

Impact on the process of synchronizing orders

Synchronization imports the order and checks whether it was exported earlier. If it was exported earlier:

  • It marks the order as processed.
  • It adds a link to the posted sales invoice (related documents, should happen automatically because the Shopify Order ID is already populated). Shopify might automatically archive Fully Paid and Fulfilled orders, and the synchronization won't process them.

Deal with updates

In Shopify, because the order is already fulfilled, the only meaningful changes are Notes, Payment Status, and payment transactions. If payments are processed in Shopify, refunds and returns are as well.

In Business Central, changes aren't tracked. Currently, if you want to mark the order as paid, use the Mark as Paid action on the Shopify Order Card page.

Tell us what you think

Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.