Skip to content

Conversation

@bachuv
Copy link
Contributor

@bachuv bachuv commented Oct 16, 2025

This pull request introduces a complete, orchestrated order return processing system using Azure Functions and OpenAI Agents. It implements a multi-step workflow for handling customer return requests, including validation, automated refund processing, and escalation to human review when necessary.

Order return validation:

  • Adds order_return_validation.py defining an AI agent and business logic to validate return reasons against company policy, with structured result output.

Automated refund processing:

  • Adds refund_processing.py defining an AI agent for processing refunds, including simulated payment operations and order detail retrieval.

Durable orchestrators and activities:

  • Adds order_return_orchestrators.py registering orchestrators for the main order return process, validation, refund processing, and a human review activity.

Documentation and API reference:

  • Adds ORDER_RETURNS.md with an overview, API reference, business logic, example requests/responses, architecture diagram, and testing instructions for the order return system.

@bachuv bachuv requested a review from lilyjma October 16, 2025 18:05
@lilyjma
Copy link

lilyjma commented Dec 3, 2025

@bachuv - thanks for adding this sample Varshi. I noticed a few things

  • The sample is not in its own folder. I think it should be in its own directory like the other samples (basic, customer_service, etc.) and have its own README
  • The README should have a quick intro of the sample, followed immediately by instructions on how to run the sample, then how to test. The other sections can go after.
  • There seems to be no way to run the sample locally because there's no emulator some of the services used, like OpenAI. In that case, I think we have two options:
    • Explicitly call out that customers need to create certain resources first in a dedicated section (up front) and link to docs on how to create them. Then, include instructions on how to deploy, and finally test
    • (Ideal) Include the bicep files for creating the resouces and deploying the sample. That way customers can deploy with just azd up. Nick's trip planner sample has good bicep reference. You can ask him for the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants