The problem with a plain “we’re closed” reply
When a chat lands outside business hours and the bot replies with a flat “we’re offline, try tomorrow,” you lose the user’s context. The first message is often just “hi” or “hello” — not enough for an agent to pick up the next morning and actually do something useful with.
The fix is to use the deflection moment to collect the question you wish the user had asked in the first place, log it against their profile, and surface it in the deflection report. The agent opens that report at 9am, sees a real question and a real email address, and can follow up directly.
How it works end-to-end
- The queue is configured to deflect chats based on the current time relative to its business hours.
- Instead of a plain text deflection message, the queue sends an Adaptive Card with a single-line input asking for the user’s question.
- Whatever the user types is stored alongside the standard deflection record — sender identity, email, timestamp, and the original first message.
- The next-day agent reviews the deflection report and either replies in Teams directly or files a ticket.
The business-hours check
The deflection logic is a small Razor snippet that compares the current time to your window. The example below treats anything outside 8am–5pm as deflectable:
@{
var now = DateTime.Now;
var open = new TimeSpan(8, 0, 0);
var close = new TimeSpan(17, 0, 0);
var withinHours = now.TimeOfDay >= open && now.TimeOfDay < close;
}
@if (!withinHours)
{
// ... render the deflection adaptive card ...
}In production you’ll want to respect holidays and the queue’s configured timezone — both are easy to layer on once the basic deflection is firing.
The adaptive card
The card itself is intentionally minimal: a short message that says we’re offline, a single Input.Text for the question, and a submit button. Anything more than that and users abandon before hitting submit.
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3",
"body": [
{
"type": "TextBlock",
"text": "We're outside business hours right now.",
"weight": "Bolder",
"size": "Medium"
},
{
"type": "TextBlock",
"text": "Leave your question below and we'll get back to you when we're back online.",
"wrap": true
},
{
"type": "Input.Text",
"id": "deflectedQuestion",
"placeholder": "Please enter your question here",
"isMultiline": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Send"
}
]
}Where the data shows up
Each submission gets logged against the user’s deflection record. Three places to look once they start arriving:
- Queue Dashboard › Details. Filter on the deflection state to see the live list, with the original question visible inline.
- Charts & Metrics. Counts and trends of deflections, which makes it easy to spot when out-of-hours volume justifies extending coverage.
- CSV export.Same data, dumpable to disk for downstream reporting — one row per deflected chat, including the captured question.
Why this beats “leave us your email”
Asking for the question instead of the email front-loads the useful information. You already have the user’s Teams identity from the chat itself — what you actually need is a first sentence that’s long enough to act on. Deflection capture closes that gap without forcing the user to write a full ticket.
