workthin
workthin
PricingBlogChangelogOverviewQuick StartConcepts

Chatbot IntegrationIncident ResponseToken Optimization

Docs for LLMs

llms.txtllms-full.txt
Guides

Overview

Connect workthin to your support chatbot. When a customer reports an issue, the chatbot checks workthin first. If matching knowledge exists, it resolves automatically — no human needed.

REST API Usage

async function handleCustomerMessage(message: string) {
  // Search workthin for matching knowledge
  const params = new URLSearchParams({
    q: message,
    scope: 'global',
    detail: 'summary',
  })

  const res = await fetch(
    `https://workthin.app/api/v1/search?${params}`,
    {
      headers: {
        'Authorization': 'Bearer ' + process.env.WORKTHIN_API_KEY,
      },
    }
  )

  const data = await res.json()

  if (data.data && data.data.length > 0) {
    return {
      resolved: true,
      response: data.data[0].title + ': ' + data.data[0].body,
    }
  }

  // No match — escalate to human agent
  return {
    resolved: false,
    response: 'Connecting you with a support agent...',
  }
}

Escalation Flow

Customer message
  → workthin search (summary)
    → Match found → Return solution (auto-resolve)
    → No match   → Escalate to human
                    → Human solves
                    → Create knowledge (vaccinate)

Projected Results

Projects using this pattern report (projected):

MetricBeforeAfter
Tickets escalated to humans100%~40% (projected)
Average resolution time4 hours12 seconds auto (projected)
Repeat issue rateHighDecreasing weekly (projected)

The more knowledge you create, the fewer tickets reach human agents.

Error Codes

Error response format and status codes for the workthin REST API.

Incident Response

Use workthin in your postmortem workflow with thought chaining.

On this page

OverviewREST API UsageEscalation FlowProjected Results