← all flows

cookbook enablement · deal-close-enablement-guard

Close deals with a discount

Put an agent on closing. It applies the real discount to win the deal; it can't stack margin away.

Agno Bedrock · Nova Pro APPLY_DISCOUNT
before Closing discounts went through a human — an agent that stacks a second discount when it doesn't see a result gives margin away every retry.
APPLY_DISCOUNT the line ↓ APPLY_DISCOUNT commits real margin to win the deal.
now you ship The agent applies the closing discount itself. The boundary makes it exactly once.
1 Agent proposes APPLY_DISCOUNT on a Deal.
2 KIFF reads the Deal's current state — before anything runs.
3 State is OPEN → the agent's action runs, receipt signed.
4 State is now DISCOUNTED → every repeat is a no-op. You don't babysit it.

The flow you ship

A sales agent applies a 15% closing discount on an OPEN deal. Nothing in the prompt stops it applying a second and third — the model just keeps closing. You hand it the flow anyway, because the boundary holds the deal to one discount.

Why your team ships it

Once a discount is applied the deal advances to DISCOUNTED, and APPLY_DISCOUNT is allowed only while OPEN — so every repeat is a no-op (state_not_allowed). The agent owns closing; the margin stays intact.