Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Refund an Online Store Order in AI Builder

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide walks you through refunding an online store order inside AI Builder, the automation tool built into Microsoft Power Platform. It covers the exact steps to create a refund flow, connect it to your store's data, and handle common issues. You'll need access to AI Builder in Power Automate or Power Apps, and a data source for your orders (like a SharePoint list or Dataverse table).

What You'll Need

  • A Power Platform environment with AI Builder enabled (check your license).
  • An existing AI Builder model or the ability to create one (e.g., a form processing model for order forms).
  • Access to your online store's order data, stored in a table or list that AI Builder can read (like Dataverse, SharePoint, or SQL Server).
  • Permissions to create and run flows in Power Automate.

Step-by-Step

  1. Open Power Automate – Go to make.powerautomate.com and sign in with your work or school account.
  2. Create a new flow – Click Create in the left menu, then choose Instant flow (or Automated flow if you want it triggered by an event). Name it something like "Refund Order with AI Builder".
  3. Choose a trigger – For an instant flow, pick a trigger like "Manually trigger a flow" so you can run it on demand. For automated, choose a trigger from your data source (e.g., "When an item is created" in SharePoint).
  4. Add an AI Builder action – Click the + button to add a new step, search for "AI Builder", and select an action like Process and extract information from forms (if you're using a form processing model) or Predict (if using a prediction model).
  5. Configure the AI Builder action – In the action, select your model from the dropdown. If you haven't built one, you'll need to create it first in AI Builder (go to AI Builder > Build, then choose the appropriate model type).
  6. Provide input data – Connect the AI Builder action to your order data. For example, if your trigger provides an order ID, use that to fetch the order details from your data source (using a "Get item" or "List rows" action) and pass the relevant fields to the AI Builder action.
  7. Run the AI Builder action – The AI Builder model will process the input and output extracted data (like order number, amount, reason for refund). These outputs will appear as dynamic content in subsequent steps.
  8. Add a condition to check refund eligibility – Use a Condition action to check if the order qualifies for a refund (e.g., if the order status is "Delivered" or if the amount is within policy).
  9. Process the refund – In the "If yes" branch, add an action to update your order record (e.g., set the status to "Refunded") and optionally send a confirmation email. Use the AI Builder outputs to fill in the details.
  10. Handle errors – In the "If no" branch, add an action to log the rejection (like creating a note in a SharePoint list) or send an alert.
  11. Test the flow – Click Test in the top right, run the flow with sample data, and verify the refund is processed correctly.
  12. Save and enable – Once testing passes, save the flow and turn it on if it's automated.

Common Mistakes

  • Not using the right AI Builder model – Ensure your model is trained on the correct type of data (e.g., order forms). Using a mismatched model will give garbage outputs.
  • Forgetting to map dynamic content – After the AI Builder action, you must manually select the output fields in later steps. They don't auto-populate.
  • Hardcoding refund amounts – Always pull the amount from the order data or AI Builder output, not a fixed number, to avoid errors.
  • Skipping error handling – Without a condition or error branch, the flow will fail silently if the AI Builder can't extract data.
  • Ignoring data source permissions – The flow needs permission to read and update the order data. Check your connections.

Tips

  • Start with a small test set – Before running on all orders, test with a few sample orders to validate the AI Builder outputs.
  • Use AI Builder's confidence scores – Many models output a confidence score. Set a threshold in your condition to only process high-confidence extractions.
  • Add a manual approval step – For high-value refunds, insert an approval action before processing to prevent mistakes.
  • Log all refunds – Keep an audit trail by writing to a log table or list.
  • Document your flow – Add notes to each action explaining what it does, so others can maintain it.

Troubleshooting

The AI Builder action fails with "Model not found" – Make sure you've selected the correct environment where the model is published. If it's still missing, go to AI Builder and republish the model.

The AI Builder outputs are empty or wrong – Check that your input data is correctly formatted. For form processing, the document must be a clear image or PDF. For prediction, ensure the input fields match the model's schema.

The flow runs but doesn't update the order – Verify the connection to your data source has write permissions. Also, check that you're using the correct update action and that the item ID is correct.

Condition always goes to "No" – Review the condition logic. Sometimes the AI Builder output is a string, but you're comparing to a number. Use expressions like int(outputs('AI_Builder')?['amount']) to convert.

Flow times out – AI Builder actions can be slow. Increase the timeout in the action settings, or optimize by reducing the number of steps.

Frequently Asked Questions

Do I need a separate AI Builder license?

AI Builder is included in many Power Platform licenses, but some advanced models require add-on credits. Check your admin center for details.

Can I use this with Shopify or WooCommerce?

Yes, if you have a connector for those platforms. The AI Builder action works the same, but you'll need to use the appropriate trigger and update actions from those connectors.

What types of AI Builder models can I use for refunds?

Form processing models are common for extracting order details from invoices or forms. You can also use a prediction model to assess refund risk, but that requires historical data.

How do I handle partial refunds?

Add an input in your flow for the refund amount, either manually or from the AI Builder output, and use that in the update action.

Can I automate the entire refund without human review?

Yes, but it's risky. It's better to include an approval step for anything above a certain amount or for unusual cases.

What if my store doesn't have a direct connector?

You can use HTTP actions to call your store's API, or export order data to a SharePoint list and work from there.