# \[Code Tasks & AI Tasks\] How to streamline an RMA Approval Process

**URL:** <https://community.process.st/t/code-tasks-ai-tasks-how-to-streamline-an-rma-approval-process/1915>\
**Category:** How To\
**Tags:** workflows, ai-tasks, code-tasks\
**Created:** [August 19, 2025, 9:04am UTC](https://community.process.st/t/code-tasks-ai-tasks-how-to-streamline-an-rma-approval-process/1915 "2025-08-19T09:04:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ellie](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/ellie/32/42_2.png) [@Ellie](https://community.process.st/u/Ellie)\
**Post date:** [August 19, 2025, 9:04am UTC](https://community.process.st/t/code-tasks-ai-tasks-how-to-streamline-an-rma-approval-process/1915/1 "2025-08-19T09:04:16Z")

</div>

Here’s how you can use [Code Tasks](https://www.process.st/help/docs/code-task/) and an AI tasks together to perform mathematical calculations and an AI to generate a summary for a return merchandise authorization.

https://www.loom.com/embed/c528bbc86bc749348b8ce0d3c6fc79bd

Based on problem details entered during an RMA, the Code Task uses Math Formulas to automatically calculate a restocking fee based on product age, defect type, and customer status.

The approval routing is then automatically assigned based on the final fee amount.
