> For the complete documentation index, see [llms.txt](https://missiveapp.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://missiveapp.com/docs/advanced-features/rules/templates/auto-label-issued-refunds.md).

# Auto-label issued refunds

**Auto-Label Issued Refunds** is a Missive rule template designed for those in e-commerce and retail who have to process and keep track of refunds.

#### When enabled:

* The rule allows you to **automatically tag an email with a refund label** when you’ve sent out an email notifying the customer of their refund.

#### Here’s how it works:

* You need to determine a default sender of your refund emails.
* You need a consistent variable in your “refund issued” emails
* You need to check for attachments
* You need to create a **refunds** label

***

### Outgoing email rule: Auto-label issued refunds

This rule is meant to help you organize your e-commerce inbox a little more, without any extra manual steps.

<a href="https://mail.missiveapp.com/?importRule=auto-label-emails-for-issued-refunds_outgoing-message" class="button primary" data-icon="plus">Add to Missive</a>

#### There are three conditions and one action to make this rule work.

{% stepper %}
{% step %}
Each time an **email is sent from** your sales@ team, where it **contains a specific subject line** (Your refund has been approved), and there is **an attachment present**…
{% endstep %}

{% step %}
it will automatically **add the label** Refunds.
{% endstep %}
{% endstepper %}

<div data-with-frame="true"><figure><img src="/files/0BjWM1fSv6vFkB9lspI6" alt=""><figcaption></figcaption></figure></div>

<table><thead><tr><th width="220.484375">Component</th><th>Value</th></tr></thead><tbody><tr><td>Condition 1</td><td><strong>From is</strong> → {...}</td></tr><tr><td>Condition 2</td><td><strong>Subject contains</strong> → Your refund has been approved</td></tr><tr><td>Condition 3</td><td><strong>Attachments name is</strong> → present</td></tr><tr><td>Action 1</td><td><strong>Add label(s)</strong> → Refunds</td></tr></tbody></table>


---

# 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://missiveapp.com/docs/advanced-features/rules/templates/auto-label-issued-refunds.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.
