> ## Documentation Index
> Fetch the complete documentation index at: https://sitegpt.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Playbook: Support operations

> An agent playbook for triaging conversations, leads, escalations, tags, and support follow-up with the SiteGPT CLI.

Use this playbook when an AI agent is helping a support team review SiteGPT conversations and maintain the support queue.

## Required access

Recommended scopes:

```bash theme={null}
sitegpt login \
  --profile support-agent \
  --scope account:read \
  --scope chatbots:read \
  --scope conversations:read \
  --scope conversations:write \
  --scope leads:read \
  --scope leads:write
```

Add these when the agent must manage tags or delete records:

```bash theme={null}
--scope conversations:delete --scope leads:delete
```

## 1. Establish context

```bash theme={null}
sitegpt whoami --json
sitegpt chatbots list --json
sitegpt tags list --json
```

Pick the chatbot:

```bash theme={null}
CHATBOT_ID=<chatbot-id>
```

## 2. Review the active support queue

```bash theme={null}
sitegpt conversations list --chatbot $CHATBOT_ID --status open --json
sitegpt conversations list --chatbot $CHATBOT_ID --escalated true --json
sitegpt conversations list --chatbot $CHATBOT_ID --important true --json
sitegpt conversations list --chatbot $CHATBOT_ID --read false --json
```

Prioritize:

1. Escalated conversations.
2. Important conversations.
3. Unread conversations.
4. Failed or negative-feedback conversations, if surfaced in the thread.

## 3. Inspect a thread

```bash theme={null}
sitegpt conversations get --chatbot $CHATBOT_ID <thread-id> --json
sitegpt messages list --chatbot $CHATBOT_ID <thread-id> --json
```

Summarize:

* Visitor goal
* Last user question
* Last AI answer
* Whether a human should take over
* Any missing knowledge that caused confusion
* Relevant lead/contact information

## 4. Apply tags and state

Create tags if needed:

```bash theme={null}
sitegpt tags add "Billing"
sitegpt tags add "Bug report"
sitegpt tags add "Sales"
```

Assign tags to a thread:

```bash theme={null}
sitegpt conversations update --chatbot $CHATBOT_ID <thread-id> --tag <tag-id> --tag <another-tag-id>
```

Mark important or resolved:

```bash theme={null}
sitegpt conversations star --chatbot $CHATBOT_ID <thread-id>
sitegpt conversations resolve --chatbot $CHATBOT_ID <thread-id>
sitegpt conversations read --chatbot $CHATBOT_ID <thread-id>
```

Escalate to human support:

```bash theme={null}
sitegpt conversations escalate --chatbot $CHATBOT_ID <thread-id> --message "A support teammate will follow up shortly."
```

Return to AI mode after a human support window:

```bash theme={null}
sitegpt conversations switch-to-ai --chatbot $CHATBOT_ID <thread-id> --message "The AI assistant is available again."
```

## 5. Maintain leads

List and inspect leads:

```bash theme={null}
sitegpt leads list --chatbot $CHATBOT_ID --status open --json
sitegpt leads get --chatbot $CHATBOT_ID <lead-id> --json
```

Update lead details:

```bash theme={null}
sitegpt leads update --chatbot $CHATBOT_ID <lead-id> --name "Jane Doe" --phone "+15551234567"
sitegpt leads star --chatbot $CHATBOT_ID <lead-id>
sitegpt leads archive --chatbot $CHATBOT_ID <lead-id>
```

Bulk archive handled leads:

```bash theme={null}
sitegpt leads bulk --chatbot $CHATBOT_ID --action archive <lead-id> <lead-id>
```

## 6. Use messages carefully

Start a new test conversation:

```bash theme={null}
sitegpt messages send --chatbot $CHATBOT_ID "What can you help with?" --json
```

Send a visitor-style message into an existing thread:

```bash theme={null}
sitegpt messages send --chatbot $CHATBOT_ID <thread-id> "Can I talk to support?" --json
```

The CLI sends visitor messages. It does not let you impersonate internal agent or system senders.

## 7. Identify knowledge gaps

When a conversation shows a weak or incorrect answer, capture:

* Thread ID
* User question
* Bot answer
* Missing or outdated source material
* Suggested new document, link, or Custom Response

Then hand off to the knowledge-maintenance workflow:

```bash theme={null}
sitegpt knowledge custom-responses add \
  --chatbot $CHATBOT_ID \
  --question "Exact question visitors are asking" \
  --answer "Approved answer"
```

## 8. Daily support report prompt

An agent can generate a daily report after running:

```bash theme={null}
sitegpt conversations list --chatbot $CHATBOT_ID --status open --json
sitegpt conversations list --chatbot $CHATBOT_ID --escalated true --json
sitegpt leads list --chatbot $CHATBOT_ID --status open --json
sitegpt tags list --json
```

Report format:

* Open conversations count
* Escalated conversations count
* Unread conversations count
* New or important leads
* Repeated topics
* Suggested Custom Responses or new knowledge documents
* Threads that need human review

## Safety rules for agents

* Do not delete conversations or leads unless explicitly asked.
* Prefer `resolve` over `delete` for completed support work.
* Use `--json` before making decisions that depend on IDs or nested fields.
* When updating tags, remember that repeated `--tag` values replace the assigned tag set.
* Do not claim a customer was contacted unless an external support system confirms it.
