> For the complete documentation index, see [llms.txt](https://kb.bevica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.bevica.com/documentation/integration/shopify/bevica_shopify_enhanced_refund_processing.md).

# Bevica Shopify Enhanced Refund Processing

Process Shopify refunds with improved matching and posting control.

## Standard Processing of Shopify Refunds

Shopify provides the ability to synchronise refunds and process a sales credit memo document in Bevica. See [Returns and Refunds](https://learn.microsoft.com/en-us/dynamics365/business-central/shopify/synchronize-orders#returns-and-refunds) for more information.

## Bevica Enhanced Refund Processing

The Bevica Shopify Connector extension has enhanced refund processing which changes the way credit memos are created in the following scenarios:

* Items are not being restocked
* A Shopify Order is cancelled
* A generic refund is created

### **Shopify Shop Setup**

The following fields will need to be populated in the Shopify Shop record to switch on the Enhanced Refund Processing:

| Field Name                 | Note                                                                                                                                                                                                                                                                             |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Refund Return Reason Code  | The return reason code to be used when refunding items which are not being restocked. Note that if the code selected is set as 'Automatic Negative Adjustment' a negative adjustment item journal will be posted when the credit memo is posted to take the item/s out of stock. |
| Enhanced Refund Processing | Set this to use the enhanced refund processing functionality.                                                                                                                                                                                                                    |

### **General Posting Setup**

Populate the Shopify Generic Refund Account on the relevant combinations of General Business and General Product Posting Groups. This is the GL Account the credit memo line will be created with for generic refunds when Enhanced Refund Processing is switched on.

### **Items are being restocked**

If the Shopify order is fulfilled before the refund is processed, the credit memo will be created in the same way whether Enhanced Refund Processing is switched on or not. The credit memo will be created for the item/s.

If the Shopify order is refunded before it is fulfilled, with the standard Shopify connector the credit memo will be created for the Refund Account. If Enhanced Refund Processing is switched on, the credit memo will be created for the item/s.

### **Items are not being restocked**

Within the standard Shopify connector, if an item is selected to be refunded but not restocked, the credit memo is created for the 'Refund Account non-stock Items' GL Account set in the Shopify Shop record.

If Enhanced Refund Processing is switched on, the credit memo will be created for the item. The Return Reason Code will be populated with the Refund Return Reason Code set in the Shopify Shop. If the return reason has the Automatic Negative Adjustment flag set the item will be returned into stock but then a negative adjustment will be posted.

Note that the return reason code will not be populated if it is a non-inventory item.

### **Cancelling a Shopify Order**

Within the standard Shopify connector, if a Shopify order is cancelled and the item is to be restocked, the credit memo will be created for the Refund Account set in the Shopify Shop record. If the item is not to be restocked, the credit memo will be created for the 'Refund Account non-stock Items'.

If Enhanced Refund Processing is switched on, the credit memo will be created for the relevant item as per the sales invoice posted for the Shopify order. If the item is not to be restocked, the return reason code will be populated.

### **Generic Refunds**

A generic refund is where you do not specify quantities of items being refunded. Instead, you manually enter a Refund Amount in Shopify.

Within the standard Shopify connector, if a generic refund is processed, the credit memo will be created with a single line for the Refund Account set in the Shopify Shop record.

If Enhanced Refund Processing is switched on, when the credit memo is created it will look at the sales invoice posted against the original Shopify order and create the credit memo lines as follows:

* If there is an item or non-inventory item on the posted sales invoice, credit memo line/s will be created for the GL account set as the Shopify Generic Refund Account in General Posting Setup for the relevant combination of General Business and General Product posting groups on the posted sales invoice line.
* If there is a GL Account on the posted sales invoice (e.g. gift card or shipping charge), credit memo line/s will be created for the same GL Account.
* The manually entered refund amount will be split across the credit memo lines created according to the line amounts on the posted sales invoice.

### **Refunding Items and Amending the Refund Amount**

Within POS you are unable to do a generic refund, users must select an item quantity before changing the refund amount.

Within the standard Shopify connector, if you select item quantities and amend the refund amount, the credit memo will be created with an additional negative GL account line for the difference between the item lines you are refunding and the refund amount.

If Enhanced Refund Processing is switched on, the credit memo lines will be created as follows:

* If there is an item or non-inventory item on the refund which is to be restocked, credit memo line/s will be created for the item for the quantity on the refund line.
* If there is a 'No Restock' item or non-inventory item on the refund, credit memo line/s will be created for the GL account set as the Shopify Generic Refund Account in General Posting Setup for the relevant combination of General Business and General Product posting groups on the posted sales invoice line.
* If there is a gift card GL Account on the refund, credit memo line/s will be created for the same GL Account.
* A credit memo line for a shipping charge will not be created even if it was on the posted sales invoice.
* The manually entered refund amount will be split across the credit memo lines created according to the line amounts on the refund.

{% hint style="info" %}
When creating the credit memo, the enhanced refund processing functionality looks for data on the posted sales invoice related to the Shopify Order so the sales order must be posted before the refund is processed.
{% endhint %}

[Learn more about Shopify and Business Central](https://learn.microsoft.com/en-gb/dynamics365/business-central/shopify/get-started) [Shopify Account Setup](https://learn.microsoft.com/en-gb/dynamics365/business-central/shopify/shopify-account)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kb.bevica.com/documentation/integration/shopify/bevica_shopify_enhanced_refund_processing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
