# Step 15: Integrating refunds

You can manage refunds at the order and line-item level from the Digital River [Dashboard](https://dashboard.digitalriver.com). The Salesforce Lightning app provides a Refunds button on the order. When you click the **Refunds** button, you will be redirected to the Order details page in the Dashboard.

{% hint style="info" %}
The Refunds button is only available to users assigned to the [DigitalRiver Connector - Refunds permission set](https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.6/integrate-the-salesforce-lightning-app/step-13-manage-permission-sets).
{% endhint %}

To add the Refunds button to your Order layout:

1. Click the App Launcher ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FpDih49dtyNecoKF3ioWT%2FApp%20launcher.png?alt=media).
2. Type `Orders` in the **Search** field and click **Orders**.\
   ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FlWQfGKTw5g9tEu3lGiqX%2FOrders.png?alt=media)
3. Click a link under the **Order Number** column.\
   ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FYOKoMQLEFeFvJ9VeDipN%2FOrders%20Recently%20Viewed.png?alt=media)
4. Click **Setup** ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FrV6gMA5MM9QLOPkMoBPs%2FSetup.png?alt=media) and select **Edit Page**.\
   ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FKjjVbaGbCc3vNs625LcC%2FSetup%20Edit%20Page.png?alt=media)
5. Click the top panel.\
   ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FJxmeDYm87usFQjUZR8cZ%2FTop%20panel%20-%20No%20Refund%20button.png?alt=media)
6. Click **Upgrade Now** button on the panel to the right of the Lightning App Builder.![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FUtALa8jrFKqXleQRVlKJ%2FUpgrade%20Now.png?alt=media)
7. Click **Migrate** from the **Dynamic Actions** dialog and then click **Next**.\
   ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2F0AvvmcRbtmVSWF2ip66u%2FMigrate.png?alt=media)
8. Select **Order Layout** and click **Finish**.
9. Click **Add Action** in the panel to the right.\
   ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2Fb33ASQXdjUmmpnO8sEKd%2FAdd%20Action.png?alt=media)
10. Type `Refunds` in the **Search actions** field and click **Refunds**.![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FZ1UI5za0nbQnraCSWtql%2FAcions%20-%20Refunds.png?alt=media)
11. Click **+ Add Filter** to set the action visibility.\
    ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FL9fzoh47kdB3USVtQwbe%2FAdd%20Filter.png?alt=media)
12. Clicked the **Advanced** tab and then click the **Select** button.\
    ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FORvOi6hSt7UcPN6ygh7Z%2FAdd%20Filter%20-%20Select.png?alt=media)
13. Select **Permissions** from the filter list in the **Select field** dialog.![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FTaRokmIPyD6CXADw4MGM%2FSelect%20field.png?alt=media)
14. Select **Custom Permission** from the next filter list.\
    ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FHuPcsraZLTkD29nIj9jD%2FSelect%20field%20-%20Custom%20Permission.png?alt=media)
15. Select **digitalriverv3.Enable\_Refunds\_Button** from the next filter list.![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FV1ziKPdTw280wuHEq86c%2FSelect%20field%20-%20Enable%20Refunds%20Button.png?alt=media)
16. Click **Done**.
17. Set the **Value** field to **True** and click **Done**.\
    ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2F5sCYlirwsk95yopTc36z%2FSet%20value%20to%20True.png?alt=media)
18. Click **Done**.\
    ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2Fi99iQFEm63wJu7JKGfeg%2FClick%20Done.png?alt=media)\
    The Refunds button appears in the top panel.\
    ![](https://3252901943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnrT0Aw9SJXFncA6OzO2%2Fuploads%2FMfisuXYhUToOfMtpXcu6%2FTop%20panel.png?alt=media)
19. Click **Save** and then click **Activate**.


---

# Agent Instructions: 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:

```
GET https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.6/integrate-the-salesforce-lightning-app/step-15-integrating-refunds.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
