Skip to content

Conversation

@dmoonat
Copy link

@dmoonat dmoonat commented Jan 19, 2026

Implemented the functionality to apply discount codes during the checkout process in the business agent. This includes backend logic for calculating discounts, agent tool integration, and schema updates.

Key Changes:

  • Agent Logic (agent.py):

    • Added apply_discount_code tool function to handle discount requests.
  • Store Implementation (store.py):

    • Updated _recalculate_checkout to compute and deduct discount amounts from the subtotal.
    • Implemented apply_discount method which currently accepts the hardcoded code "10OFF" for a 10% discount.
  • Configuration & Data:

    • ucp.json: Added the dev.ucp.shopping.discount schema definition.
    • agent_card.json: Added the "Apply Discount" skill
  • README.md:

    • Added usage steps for applying the "10OFF" discount code in the sample walkthrough

@dmoonat dmoonat changed the title feat: add discount feature feat: add discount at checkout feature Jan 19, 2026
@dmoonat dmoonat marked this pull request as ready for review January 19, 2026 14:50
@dmoonat dmoonat requested a review from a team January 19, 2026 14:50
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.

1 participant