How the AI Agent Handles Discounts
Your AI Agent can reference and offer discount codes during conversations, but only when discounts are configured in your flows. The agent never invents discounts or makes up codes. This article explains how discount handling works and how to set it up.
Where Discounts Come From
The AI Agent gets discount information from your flows. There are two types:
Sent Discounts (node-level) These are discount codes that were already included in a message sent to the customer by a flow. For example, if your abandoned cart flow sends a message saying "Here's 10% off with code SAVE10," the AI knows that code was already shared.
The agent can reference these naturally if the customer asks about them ("What was that discount code again?") but won't re-announce them unprompted.
Available Discounts (flow-level) This is a discount you configure on the flow itself using the Set Discount option in the Flow Builder. It gives the AI a discount code it can offer during the conversation when the moment is right.
The agent offers this discount when the customer shows interest, hesitation, or asks about deals. It presents the discount as a helpful incentive, not a hard sell.
Setting Up a Flow-Level Discount
Open the flow in the Flow Builder
Click Configure Agent in the flow header
Under Flow Discount, create or select a discount
The discount details (code, type, value) are shown in the flow header for your reference
You can remove the flow discount at any time. The discount types supported are:
Percentage off (e.g., 10% off)
Fixed amount off (e.g., $5 off)
Free shipping
How the Agent Uses Discounts in Conversation
The AI doesn't force discounts into every conversation. It uses them contextually based on the flow of the conversation.
Example: Sent discount, customer asks about it
Flow message: "Hey! You left something in your cart. Use code SAVE10 for 10% off!"
Customer: "What was that code again?"
AI: "The code is SAVE10 for 10% off your order! Let me know if you need any help checking out."
Example: Available discount, customer is hesitant
Customer: "I'm not sure, it's a bit expensive"
AI: "I totally get it! I can offer you 15% off with code WELCOME15. That would bring your total down. Want to give it a try?"
Example: No discount configured, customer asks for one
Customer: "Do you have any discount codes?"
AI: "I don't have any active promotions to share right now, but I'd be happy to help you find the right products! Is there anything specific you're looking for?"
Note:
The agent will not make up a discount code. If no discount is configured on the flow, it lets the customer know honestly.
Discounts and Resolution Billing
When the AI offers a discount code and the customer engages with it, the session's discount_request intent is marked as resolved. This counts toward resolution billing just like any other resolved question.
Testing Discounts in the Playground
To test how the AI handles discounts:
Open the Playground tab
Click Set Test Scenario and select a flow that has a discount configured
Ask about discounts: "Do you have any deals?" or "Is there a coupon code?"
If you don't select a flow as your test scenario, the Playground will prompt you to set one when you ask about discounts. This is the same behavior as production: the agent only knows about discounts that are configured in the flow the customer is in.
Tips
Use flow-level discounts for cart recovery flows. If a customer is on the fence about completing their purchase, having a discount available gives the AI a tool to close the sale.
Don't configure discounts on every flow. If every conversation offers a discount, customers learn to wait for one. Use them strategically on flows where conversion matters most.
Match your discount to the flow's purpose. A percentage off works well for abandoned cart recovery. Free shipping works well for flows targeting customers who browsed but didn't add to cart.
Include discounts in your flow messages too. If a flow's sendMessage node already includes a discount code, the AI automatically knows about it and can reference it if the customer asks. You don't need to duplicate it as a flow-level discount.
Test in the Playground. After setting up a flow discount, select that flow in the Playground and ask about deals to see how the agent presents it.
💡Tip:
Still have questions?
Please feel free to reach out to our wonderful Support team at support@txtcart.ai or via Live Chat.

