> ## Documentation Index
> Fetch the complete documentation index at: https://resources.athenaintel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build and trigger the exceptions AOP

> A repeatable dispute review that starts from email or a new file.

<Frame caption="Athena 101 · Lesson 15 · Build and trigger the exceptions AOP">
  <iframe src="https://player.vimeo.com/video/1233501658?h=30e6fcd8c3&title=0&byline=0&portrait=0&dnt=1" className="w-full aspect-video rounded-xl" frameBorder="0" allow="autoplay; fullscreen; picture-in-picture" allowFullScreen title="Athena 101 · 15 · Build and trigger the exceptions AOP" />
</Frame>

<Accordion title="Transcript">
  In this episode, you'll set Northwind up so every freight dispute gets handled the same way, whether it arrives by email or lands in a folder.

  Disputes get handled the same way every time, following the procedure your team already wrote. Open a new chat, add the AOP toolkit, and point Athena at the SOP. Ask for an AOP that checks each dispute and records the result in the tracker. Athena writes the AOP. Before you run anything, open Configuration and read it. Check the name, the description, and the agent it runs as, which is Freight Desk. Then read the prompt. This is the procedure your team will rely on, so treat it like one.

  Every dispute gets the same check, and you can reuse that check anywhere. So it lives in its own small AOP, called Check one dispute. You give it three things: the dispute, the carrier, and the invoice. It always returns the same four answers: which dispute, its status, the evidence, and anything missing. The Exceptions AOP runs this check for each dispute, and waits for the answer before it moves on. If a check ever gets something wrong, you fix it in one place, and every AOP that uses it gets the fix.

  The tracker keeps one row per dispute, so a rerun never duplicates. If the same email arrives twice, that dispute still has one row, with the latest result. Every row links to the run that wrote it, so you can always see where a result came from.

  Forward a dispute to one email address, and the AOP starts on its own. Open Triggers, and click Create. Choose Email, then Dedicated Address. Give the address a name. Mail sent here starts a run, and it stays separate from Freight Desk's own inbox. Leave Send result email on, so the sender hears back. Then click Create. Copy the address, and share it with the team that receives carrier disputes.

  Invoices that land in the team's SharePoint folder can start a run too. Under Triggers, create a SharePoint trigger. Pick the folder where carrier invoices arrive, in the team's site. Each new invoice in that folder starts a run. Edits to existing files don't. Before you trust either trigger, run the AOP once by hand. Open the run, and you can see the check come back with its four answers. Then check the tracker. If the new row looks right, the triggers take it from here.

  Quick check. The same dispute email arrives twice. How many rows does the tracker get? One. The tracker keeps one row per dispute, so a rerun never duplicates.

  A legal team uses this so every court alert gets checked the same way. They forward alerts to their intake AOP's own address. A small check returns the same answers for every alert. Their tracker keeps one row per matter, and the app they build later uses the same check.

  Try it in your own workspace with this prompt. Look for AOP executed successfully in the main run, with the same answers every time.
</Accordion>

## Before you start

Upload these files from the [Northwind starter kit](/docs/athena-101/starter-kit): **Northwind dispute SOP.pdf**, the root **Disputes tracker.xlsx**, every file in **Lesson 15** including **Carrier invoices/DSP-1043.txt**, and **Workspace setup.txt**.

Use the setup guide to publish Freight Desk and the review skill, then create the main procedure and the reusable dispute check. A folder trigger needs your admin to connect the invoice folder. If it is unavailable, use the procedure’s email trigger with its actual address. If triggers are unavailable, practice a manual run; uploaded files do not create triggers or past runs.

## Steps

<Steps>
  <Step title="Turn the procedure into an AOP">
    Ask Athena to create an AOP from your written procedure and record the results in the tracker. Read **Configuration** and confirm it runs as Freight Desk before using it.
  </Step>

  <Step title="Reuse one small check">
    Create Check one dispute to accept the dispute, carrier, and invoice. Have the main procedure use it and wait for the same answers: dispute, status, evidence, and missing information.
  </Step>

  <Step title="Keep one row per dispute">
    Write the procedure to update an existing dispute rather than add it again. Keep a link to the run with each result.
  </Step>

  <Step title="Start by email">
    Open **Triggers**, click **Create**, and choose **Email** with **Dedicated Address**. This starts the procedure and is separate from the agent’s inbox; leave result replies on if the sender needs them.
  </Step>

  <Step title="Start from a folder and test">
    Create a **SharePoint** trigger for the selected invoice folder; new files start runs, edits to existing files do not. Run once by hand and check both the small check’s answer and the tracker before relying on triggers.
  </Step>
</Steps>

## Try it

> Make a small AOP that checks one \[item] and always returns the same answers, then have my main AOP use it for every \[item].

Look for a successful small check in the main run, with the same answers each time.

## Next

[Approvals, failures and rollback](/docs/athena-101/16-approvals-failures)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.