Skip to navigation

Set up Shopify returns and refunds (legacy order import)

Set up the import of Shopify returns and refunds, and process them in the Shopify Legacy Return Queue.

This article describes how to set up and use the import of Shopify returns and refunds with the legacy order import. The legacy order import is used when the Shopify Ecommerce Order Experience feature is disabled in NaviPartner Feature Management.

For an overview of the process and of what is covered, refer to Shopify returns and refunds.

Prerequisites

  • The Shopify integration is set up, and orders are imported into Business Central.
  • The payment method mapping and shipment method mapping are in place.
  • Finance has decided which G/L accounts to use for refunds. None of the accounts can be blocked, and all of them must allow direct posting.

Enable returns for the Shopify store

  1. Search for Shopify Stores, and open the store you want to set up.

  2. In the Sales Return Order Integration section, populate the following fields:

    Field nameDescription
    Sales Return Order IntegrationEnables the import of returns and refunds. When you enable it, the job queue entries that import returns and refunds are created.
    Get Returns Starting FromMandatory. Returns closed before this date aren’t imported and need to be handled manually. This is normally the go-live date.
    Get Refunds Starting FromOptional. Refunds created before this date aren’t imported. If it’s empty, the date from Get Returns Starting From is used.
    Post Returns AutomaticallyIf enabled (default), the return order is posted straight away. If disabled, the return order is created as a draft, and a user needs to post it.
    Return Poll Lookback (Days)Specifies how many days back the system looks for changed orders on every check. If you set it to 0, the default of 30 days is used.

Set up accounts and items used on return orders

On the same Shopify Store card, in the Legacy Order Import section, populate the following fields:

Field nameDescription
Return Refund G/L Account No.Mandatory. The account the card refund is paid out from. The refund is posted to this account to close the credit memo on the customer.
Return Gift Card Refund G/L Account No.The part of the refund that went back to a gift card or to Shopify store credit. If it’s empty, the Return Refund G/L Account No. is used. Recommended if you use gift cards or store credit.
Return Shipping Refund G/L Account No.Shipping costs refunded to the customer. Mandatory if you refund shipping. Otherwise, these refunds fail.
Return Fee G/L Account No.Fees kept from the customer, such as a restocking fee or a return shipping fee. Mandatory if you charge return fees.
Refund Discrepancy G/L Account No.Amounts refunded beyond the value of the returned or refunded lines, such as goodwill amounts or discounts given after the sale. Mandatory if you give goodwill refunds or discounts after the sale. For more information, refer to Discrepancies.
Refund Item Charge No.The item charge used when the customer gets money back but keeps the goods (refund without restock). The charge reduces the value of the original sale without putting anything back in stock. Mandatory if you refund without restocking.
Return Generic Item No. and Return Generic SKU PrefixUsed for products that don’t exist as items in Business Central (for example, made-to-order products). Returned lines whose SKU starts with the prefix are booked on the generic item. Only needed if you use generic products.

Other settings that affect returns

  • E-commerce Stores - the e-commerce store linked to the Shopify sales channel. Its Location Code is used when the return location can’t be determined, and for refunds where nothing goes back to stock. Its salesperson and dimensions are copied to the return order.
  • Location mapping - when Shopify restocks an item at a location, the item is received at the mapped Business Central location.
  • Shopify Integration Setup - the Max. Document Process Retry Count field (default 5) specifies how many times a failed row is retried before the system stops trying.

Job queue entries

When you enable Sales Return Order Integration, the following job queue entries are created:

Job queue entryDescriptionRuns every
Get closed Shopify returns and refunds (legacy order import)Checks Shopify and adds new returns and refunds to the queue.15 minutes
Import queued Shopify returns and refunds (legacy order import)Creates and posts the return orders for the rows in the queue.5 minutes

Process returns in the Shopify Legacy Return Queue

Search for Shopify Legacy Return Queue, or open it from the action on the Shopify Store card. Every Shopify return or refund found by the system is displayed as one row.

Statuses

StatusDescriptionWhat to do
NewFound in Shopify, but not processed yet.Nothing. The import job picks it up.
ProcessingThe row is being processed.Nothing. If it stays in this status for a long time, the next run takes it over.
WaitingThe row can’t be finished yet. The Outcome Note explains why, for example, the refund is still pending in Shopify, or the order isn’t fully shipped and invoiced in Business Central yet.Usually nothing, as the row is checked again on every run. If the reason doesn’t clear, fix it (for example, post the open order).
Draft CreatedA sales return order was created, but not posted. Either automatic posting is disabled, or posting failed.Open the document, check it, and post it. If it’s wrong, use Discard Draft and Retry.
ImportedThe credit memo is posted and the refund is booked.Nothing.
Nothing to CreditNothing on the order was invoiced in Business Central, so there is nothing to credit. For example, the order was canceled before it was invoiced.Nothing.
ErrorSomething went wrong. The Last Error field shows the reason. The row is retried until the retry limit is reached.Read the error, fix the cause, and choose Process. If the row can’t be imported, handle it manually and choose Dismiss.
DismissedA user marked the row as handled outside the import. It’s kept so it’s never imported again.Nothing.

Actions

ActionDescription
Poll Shopify NowChecks Shopify for new returns and refunds immediately, instead of waiting for the job queue entry.
ProcessProcesses the selected rows.
Discard Draft and RetryDeletes the draft return order and its payment lines, and sets the row back to New, so it’s created again. This action also reopens a dismissed row.
DismissMarks the row as handled manually, so it’s never imported again.
Open DocumentOpens the return order or the posted credit memo.
Open VoucherOpens the retail voucher (gift card) that the refund went back to.

The following columns are also useful when reviewing the queue:

  • Location Fallback Used - the e-commerce store location was used because the return location couldn’t be determined.
  • Not Restocked - the goods weren’t put back in stock.
  • Gift Card Refund Amount, Voucher, and Outcome Note.

Warning: If you delete a row, its unposted draft return order is deleted too. If the return was handled manually, use Dismiss instead, so it isn’t imported again later.

Troubleshooting

Message or symptomCauseSolution
”… beyond the lines of …, but Refund Discrepancy G/L Account No. is blank …”Shopify refunded more than the value of the lines (goodwill or a discount after the sale), and no account is set.Populate Refund Discrepancy G/L Account No. on the Shopify Store card, and process the row again.
An error about a blank Return Shipping Refund, Return Fee, or Return Refund account, or a blank Refund Item ChargeA setup field needed for this refund is empty.Populate the field on the Shopify Store card, and process the row again.
The row stays in Waiting.The refund is still pending in Shopify, the order isn’t fully shipped and invoiced in Business Central, or another unposted credit document is applied to the same invoice.Read the Outcome Note, and post the open order or document. The row is checked again on every run.
The row stays in Draft Created.Automatic posting is disabled, or posting failed.Open the document, fix it if needed, and post it. Alternatively, use Discard Draft and Retry.
”… contains an exchange line …”Exchanges aren’t supported.Handle the return manually in Business Central, and then dismiss the row.
The item isn’t found for a SKU.The Shopify product isn’t linked to a Business Central item.Link or create the item (or use the generic item setup), and process the row again.
No location could be found.The Shopify location isn’t mapped, and the e-commerce store has no location.Map the Shopify location, or set a location on the e-commerce store.
Location Fallback Used is selected.The e-commerce store location was used.Check that the stock went to the correct location. Map the Shopify location if needed.
A return from before go-live is missing.It was closed before the date in Get Returns Starting From.Handle it manually.
The return or refund isn’t in the queue at all.The job queue entry hasn’t run yet, the return isn’t closed in Shopify, or it’s before the start date.Check the return in Shopify, and choose Poll Shopify Now.