Path briefing

Template: customer onboarding

  • Path goal: Run My Work, understand handoffs and exceptions, and know when to escalate.
  • Why this stop: Concrete example of an operations-aligned work pattern.
  • Do next: Map the template stages to your team's real handoffs.

Do next: Map the template stages to your team's real handoffs.

Source: path manifesto (offline-safe)

Stop 4 of 8·Open canonical page

Template: customer onboarding (Operations)

Document information
  • Canonical URL: /docs/12_workflows/40_template-customer-onboarding
  • Version: 2026-10-09
  • Tags: operations, processflow, template, guides

Copyable ProcessFlow pattern for a customer onboarding journey that feeds My Work. This is documentation for tenant admins and Trace — it does not insert demo requests into employee queues. Clone the steps in ProcessFlow, connect real integrations, then run with real or sandbox input you choose.

Outcome

An employee sees a My Work card, understands why they are involved, and Approves or Rejects a real process human gate. That decision is stored on the gate. CRM activation belongs in the continuation branch, not in the next sequential step after openApproval. Create the gate with continuation: {}. The new execution receives process_input.operations_continuation. Approved runs write CRM and call tf.operations.complete. Denied runs call openAction on the same external_id. Timeout runs call openException or complete. Failures before the gate open an Exception card with Retry when input was stored.

Process shape

StepKindOperations write
1. IntakeAutomaticupdateProgress — journey_beat: received
2. Enrich from CRMAutomaticupdateProgress — checks + system_refs
3. AI document skim (optional)AI-assistedupdateProgress with ai_summary
4. Credit / risk decisionHuman approvalcreateApprovalGate with continuation: {}, then openApproval with that human_request_id, owner_user_id, and details. Return.
5. After the decisionContinuation of this processBranch on process_input.operations_continuation. Approved: CRM write and complete. Denied: openAction. Timeout: openException or complete.
6. Failure handlerExceptionopenException
7. FinishAutomaticcomplete

Set process category to business.

Stable identity

const external_id = `crm-onboarding-${customer_id}`;

Reuse the same external_id on every upsert so My Work updates one card.

Step sketches

Progress after enrich

await tf.operations.updateProgress({
  external_id,
  subject: `Onboard ${customer_name}`,
  party: customer_name,
  process_name: "Customer onboarding",
  status: "open",
  attention: "info",
  journey_beat: "in_process",
  journey_stage_label: "Documents checked",
  checks: [
    { label: "Company registration", state: "verified" },
    { label: "Credit pack", state: "pending" }
  ],
  system_refs: [{ system: "CRM", label: "Account", external_ref: customer_id }]
});

Open approval

const gate = await tf.operations.createApprovalGate({
  idempotency_key: `onboarding-approval-${external_id}`,
  approver_user_id: approverUserId,
  prompt: `Approve onboarding for ${customer_name}?`,
  continuation: {},
  payload: { customer_id, customer_name }
});
if (gate.status !== "pending") {
  return { success: true, data: { status: gate.status, decision: gate.decision, human_request_id: gate.human_request_id } };
}
await tf.operations.openApproval({
  external_id,
  subject: `Approve onboarding for ${customer_name}`,
  party: customer_name,
  process_name: "Customer onboarding",
  human_request_id: gate.human_request_id,
  owner_user_id: approverUserId,
  details: [
    { label: "Customer", value: customer_name },
    { label: "Customer id", value: customer_id }
  ],
  why_visible: "You own customer activation for this region.",
  consequence: "Approving starts the next run, which writes CRM.",
  required_action: "Confirm credit pack and approve or reject.",
  journey_beat: "in_process",
  journey_stage_label: "Activation decision",
  actor_hint: "person"
});
return {
  success: true,
  data: { status: "pending_approval", human_request_id: gate.human_request_id, external_id },
  message: "Submitted for approval."
};

Exception

await tf.operations.openException({
  external_id,
  subject: `Onboarding blocked for ${customer_name}`,
  process_name: "Customer onboarding",
  required_action: "Fix the CRM write error, then Retry or Pass to Delivery.",
  why_visible: "Activation failed in CRM after approval.",
  journey_beat: "systems"
});

Complete

await tf.operations.complete({
  external_id,
  subject: `Onboarded ${customer_name}`,
  process_name: "Customer onboarding"
});

Verify before go-live

  1. tf.operations.validate({ … attention: "approval", human_request_id: gate.human_request_id }) while that gate is pending → approve_buttons_would_show: true
  2. Run once with a test account; open My Work as approver_user_id
  3. Confirm Approve sets the gate to answered / approved and the continuation run writes CRM
  4. Force a failure path and confirm Exception copy (no raw stack on the primary panel)

Related

Next stop