Reply confidence gate

Decide whether a drafted reply ships on its own (≥ 0.85), goes to a review queue (0.4–0.85) or to a person (< 0.4), with the Reply Confidence Gate template.

Goal: auto-send the replies that are clearly fine, review the borderline ones and hand the rest to a person — with thresholds you can see and change.

Create the decision

Templates → Reply confidence gate → Create decision:

PartContent
Statecustomer_message, draft_reply (strings, required)
ready_to_sendprobability — can the draft go out without a human checking it?
answers_questionprobability — does it answer what the customer asked?
promises_somethingprobability — does it promise a refund, discount, deadline or exception?
Policiesready_to_send < 0.4 → escalate; promises_something ≥ 0.7 and ready_to_send < 0.95 → escalate; confidence of ready_to_send < 0.5 → escalate
Destinationsauto_send — sendReply at ≥ 0.85; review_queue — queueForReview from 0.4 to 0.85; hand_to_human — assignToHuman on escalate

Call it

curl -X POST https://api.dcision.io/v1/decisions/reply-confidence-gate \
  -H "Authorization: Bearer $DCISION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": {
      "customer_message": "How do I change the email on my account?",
      "draft_reply": "Go to Settings → Account, click Edit next to your email, confirm the code we send to the new address and you're done."
    }
  }'
200 OK (abridged)
{
  "schema": "reply-confidence-gate",
  "result": { "ready_to_send": 0.93, "answers_question": 0.96, "promises_something": 0.03 },
  "action": "continue",
  "destinations": [{ "key": "auto_send", "type": "function", "function": "sendReply", "params": { "reply": "Go to Settings → Account, …" } }]
}

Act on it

const handlers = { sendReply, queueForReview, assignToHuman };
for (const d of decision.destinations ?? []) if (d.type === "function") await handlers[d.function](d.params);

Tune it

  • Move the thresholds (0.85 and 0.4) in the destinations and the first rule; the Overview suggests calibrations from your history.
  • Swap the functions for a webhook or workflow to drop the review queue straight into n8n, Make or Zapier.
  • Add your policies to context so promises_something knows what your team may promise.

On this page