Skip to content
← All templates

Workflow starter · custom workers required

Human Handoff After Reply

Stop automated touches after a reply, assign an owner, preserve context, and enforce a response SLA.

Workflow sequence

  1. 01Receive reply event
  2. 02Cancel pending touches
  3. 03Classify reply
  4. 04Select owner
  5. 05Create CRM task
  6. 06Escalate missed SLA

Sequence definition

Use this sequence definition as a starting point. Set tenant_id to your tenant and use a fresh UUID for id before publishing. Implement the named business handlers in your workers; the JSON does not include provider integrations. Keep credentials in the credential store.

{
  "id": "7a6f205d-4c7d-5e73-b027-953a8d4c80a8",
  "tenant_id": "demo",
  "namespace": "default",
  "name": "human_handoff_after_reply_v1",
  "version": 1,
  "deprecated": false,
  "blocks": [
    {
      "type": "step",
      "id": "cancel_pending",
      "handler": "cancel_outreach",
      "params": {}
    },
    {
      "type": "step",
      "id": "classify",
      "handler": "classify_reply",
      "params": {}
    },
    {
      "type": "step",
      "id": "assign",
      "handler": "assign_owner",
      "params": {}
    },
    {
      "type": "step",
      "id": "create_task",
      "handler": "create_crm_task",
      "params": {}
    },
    {
      "type": "step",
      "id": "wait_for_owner",
      "handler": "human_review",
      "params": {},
      "wait_for_input": {
        "prompt": "Confirm owner response",
        "timeout": 14400000,
        "store_as": "owner_response",
        "choices": [
          {
            "label": "Responded",
            "value": "responded"
          },
          {
            "label": "Escalate",
            "value": "escalate"
          }
        ]
      }
    },
    {
      "type": "router",
      "id": "sla_gate",
      "routes": [
        {
          "condition": "context.data.owner_response == "escalate"",
          "blocks": [
            {
              "type": "step",
              "id": "escalate",
              "handler": "notify_manager",
              "params": {}
            }
          ]
        }
      ],
      "default": []
    }
  ],
  "created_at": "2026-09-05T00:00:00Z"
}

Handlers must validate required inputs and outputs. Quote extraction returns confidence; document validation returns needs_review; source archiving returns sha256. Guards read these values through outputs, and approval decisions through context.data.

Idempotency keys in params are a contract for your worker to enforce at the provider. They do not make an external write exactly-once automatically.

Steps with wait_for_input resume through an authorized human_input:{block_id} signal carrying a declared choice. A CRM or scheduling integration may supply a verified choice. Timeouts fail the wait; they do not select a follow-up or escalation branch automatically. Configure alerts and recovery for timed-out runs before production.

Review rejection skips the guarded publish or spreadsheet write. No write is authorized merely because the review step finished.

Production controls to keep

Stable idempotency keys around external writes

Explicit validation before the success state

Bounded retries with provider-aware backoff

Searchable source and destination identifiers

A named owner for exhausted retries

A replay test using duplicate input

Run this workflow

Install Orch8, connect the handlers, then test duplicate delivery and worker interruption before production.

Open the quickstart